diff --git a/.gitignore b/.gitignore index b5f1ff9..7e5ef76 100644 --- a/.gitignore +++ b/.gitignore @@ -13,4 +13,5 @@ /node_modules/ /.idea/ /public/* -!/public/index.php \ No newline at end of file +!/public/index.php +!/public/manifest.json \ No newline at end of file diff --git a/composer.json b/composer.json index 6902cf1..c101081 100644 --- a/composer.json +++ b/composer.json @@ -10,6 +10,7 @@ "nesbot/carbon": "^1.33", "ocramius/proxy-manager": "^2.0", "sensio/framework-extra-bundle": "^5.2", + "symfony/asset": "*", "symfony/console": "*", "symfony/flex": "^1.1", "symfony/framework-bundle": "*", diff --git a/composer.lock b/composer.lock index bd7714e..712adcc 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "de3f41fd3a5d7ba89450529bd34919b6", + "content-hash": "83d13f949e679cb8fda8394956353d73", "packages": [ { "name": "doctrine/annotations", @@ -1884,6 +1884,62 @@ ], "time": "2018-05-12T09:37:42+00:00" }, + { + "name": "symfony/asset", + "version": "v4.1.4", + "source": { + "type": "git", + "url": "https://github.com/symfony/asset.git", + "reference": "7bec13dad0df8146ee6ba9350203fcc832814bfe" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/asset/zipball/7bec13dad0df8146ee6ba9350203fcc832814bfe", + "reference": "7bec13dad0df8146ee6ba9350203fcc832814bfe", + "shasum": "" + }, + "require": { + "php": "^7.1.3" + }, + "require-dev": { + "symfony/http-foundation": "~3.4|~4.0", + "symfony/http-kernel": "~3.4|~4.0" + }, + "suggest": { + "symfony/http-foundation": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.1-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Asset\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Asset Component", + "homepage": "https://symfony.com", + "time": "2018-07-26T09:10:45+00:00" + }, { "name": "symfony/cache", "version": "v4.1.4", diff --git a/config/packages/framework.yaml b/config/packages/framework.yaml index 8b24418..abc9ce8 100644 --- a/config/packages/framework.yaml +++ b/config/packages/framework.yaml @@ -14,6 +14,9 @@ framework: php_errors: log: true + assets: + version_strategy: 'assets.modified_time_version_strategy' + cache: # Put the unique name of your app here: the prefix seed # is used to compute stable namespaces for cache keys. diff --git a/config/services.yaml b/config/services.yaml index 4ee12b9..78fc17e 100644 --- a/config/services.yaml +++ b/config/services.yaml @@ -38,6 +38,10 @@ services: # add more service definitions when explicit configuration is needed # please note that last definitions always *replace* previous ones + #assets + assets.modified_time_version_strategy: + class: App\Asset\ModifiedTimeVersionStrategy + #proxy configuration proxy.locator: class: 'ProxyManager\FileLocator\FileLocator' diff --git a/package.json b/package.json index fc378f8..b779597 100644 --- a/package.json +++ b/package.json @@ -35,6 +35,8 @@ }, "dependencies": { "babel-minify-webpack-plugin": "^0.3.1", + "copy-webpack-plugin": "^4.5.2", + "imagemin-webpack-plugin": "^2.3.0", "mini-css-extract-plugin": "^0.4.2", "vue2-leaflet": "^1.0.2" } diff --git a/public/manifest.json b/public/manifest.json new file mode 100644 index 0000000..e10c9bb --- /dev/null +++ b/public/manifest.json @@ -0,0 +1,15 @@ +{ + "name": "Czy Dojadę?", + "short_name": "Czy Dojadę", + "orientation": "portrait", + "lang": "pl_PL", + "start_url": ".", + "display": "fullscreen", + "background_color": "#fff", + "theme_color": "white", + "description": "Odpowiedź na odwieczne pytanie ludzkości - czy tramwaje jeżdżą?", + "icons": [{ + "src": "images/icon.svg", + "sizes": "256x256" + }] +} \ No newline at end of file diff --git a/resources/images/icon.svg b/resources/images/icon.svg new file mode 100644 index 0000000..a58230e --- /dev/null +++ b/resources/images/icon.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/resources/images/kadet-net-logo.png b/resources/images/kadet-net-logo.png new file mode 100644 index 0000000..37f1c8b Binary files /dev/null and b/resources/images/kadet-net-logo.png differ diff --git a/resources/styles/_common.scss b/resources/styles/_common.scss index 06bb866..0bf12fd 100644 --- a/resources/styles/_common.scss +++ b/resources/styles/_common.scss @@ -71,12 +71,6 @@ } } -#app { - margin-top: $grid-gutter-width / 2; +svg.svg-inline--fa { + transform: rotate(360deg) } - -@include media-breakpoint-up('md') { - #app { - margin-top: 4rem; - } -} \ No newline at end of file diff --git a/resources/styles/main.scss b/resources/styles/main.scss index 8fb025e..fd9cf75 100644 --- a/resources/styles/main.scss +++ b/resources/styles/main.scss @@ -31,4 +31,41 @@ $container-max-widths: map-merge($container-max-widths, ( xl: 1320px )); @import "controls"; @import "popper"; -svg.svg-inline--fa { transform: rotate(360deg) } \ No newline at end of file +body { + min-height: 100vh; + display: flex; + flex-direction: column; + + main { + flex: 1 1 auto; + } + + footer { + @extend .flex; + border-top: 2px solid black; + padding: $alert-padding-y $alert-padding-y; + transition: all .5s ease; + opacity: .06; + filter: grayscale(100%); + + &:hover { + opacity: 1; + filter: grayscale(0%); + } + + img { + height: 1.5rem; + } + } +} + +#app { + margin-top: $grid-gutter-width / 2; +} + +@include media-breakpoint-up('md') { + #app { + margin-top: 4rem; + } +} + diff --git a/src/Asset/ModifiedTimeVersionStrategy.php b/src/Asset/ModifiedTimeVersionStrategy.php new file mode 100644 index 0000000..c7446d0 --- /dev/null +++ b/src/Asset/ModifiedTimeVersionStrategy.php @@ -0,0 +1,32 @@ +getVersion($path)); + } +} \ No newline at end of file diff --git a/symfony.lock b/symfony.lock index 44c2d9b..14c3814 100644 --- a/symfony.lock +++ b/symfony.lock @@ -113,6 +113,9 @@ "ref": "fb7e19da7f013d0d422fa9bce16f5c510e27609b" } }, + "symfony/asset": { + "version": "v4.1.4" + }, "symfony/cache": { "version": "v4.1.3" }, diff --git a/templates/base.html.twig b/templates/base.html.twig index 31bee37..b4d17f5 100644 --- a/templates/base.html.twig +++ b/templates/base.html.twig @@ -3,7 +3,8 @@
- + +