diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..798c634 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,6 @@ +* text=auto + +*.html.twig diff=html + +package-lock.json -diff +composer.lock -diff diff --git a/package-lock.json b/package-lock.json index f8987da..e036fca 100644 Binary files a/package-lock.json and b/package-lock.json differ diff --git a/package.json b/package.json index 329063b..a948bc8 100644 --- a/package.json +++ b/package.json @@ -1,36 +1,34 @@ { - "name": "reitanlage-oranienburg", - "version": "1.3.0", - "description": "The Reitanlage Oranienburg Theme for Grav CMS.", - "main": "index.js", - "scripts": { - "dev": "npm run development", - "development": "mix", - "watch": "mix watch", - "watch-poll": "mix watch -- --watch-options-poll=1000", - "hot": "mix watch --hot", - "prod": "npm run production", - "production": "mix --production" - }, - "repository": { - "type": "git", - "url": "https://git.serguzim.me/serguzim/reitanlage-oranienburg.git" - }, - "keywords": [], - "author": "", - "license": "Apache-2.0", - "devDependencies": { - "laravel-mix": "^6.0.25", - "resolve-url-loader": "^4.0.0", - "sass": "^1.35.1", - "sass-loader": "^12.1.0" - }, - "dependencies": { - "@fortawesome/fontawesome-pro": "^6.0.0", - "bootstrap": "^4.6.0", - "cross-env": "^7.0.3", - "jquery": "^3.6.0", - "photoswipe": "^4.1.3", - "popper.js": "^1.16.1" - } + "name": "reitanlage-oranienburg", + "version": "1.3.0", + "description": "The Reitanlage Oranienburg Theme for Grav CMS.", + "main": "index.js", + "scripts": { + "dev": "npm run development", + "development": "mix", + "watch": "mix watch", + "watch-poll": "mix watch -- --watch-options-poll=1000", + "hot": "mix watch --hot", + "prod": "npm run production", + "production": "mix --production" + }, + "repository": { + "type": "git", + "url": "https://git.serguzim.me/serguzim/reitanlage-oranienburg.git" + }, + "keywords": [], + "author": "", + "license": "Apache-2.0", + "dependencies": { + "@fortawesome/fontawesome-pro": "^6.2", + "@popperjs/core": "^2.11.6", + "autoprefixer": "^10.0", + "bootstrap": "^5.2", + "cross-env": "^7.0", + "laravel-mix": "^6.0", + "photoswipe": "^4", + "resolve-url-loader": "^5.0", + "sass": "^1.56", + "sass-loader": "^13.2" + } } diff --git a/src/js/app.js b/src/js/app.js index 879c51a..769cbc1 100644 --- a/src/js/app.js +++ b/src/js/app.js @@ -1,4 +1,4 @@ -require('./bootstrap'); +let bootstrap = require('bootstrap') import PhotoSwipe from 'photoswipe/dist/photoswipe' import PhotoSwipeDefaultUI from 'photoswipe/dist/photoswipe-ui-default' @@ -6,7 +6,7 @@ import PhotoSwipeDefaultUI from 'photoswipe/dist/photoswipe-ui-default' window.PhotoSwipe = PhotoSwipe; window.PhotoSwipeDefaultUI = PhotoSwipeDefaultUI; -$("#menu-toggle").click(function(e) { +document.querySelector("#menu-toggle").onclick = function(e) { e.preventDefault(); - $("#wrapper").toggleClass("toggled"); -}); + document.querySelector("#wrapper").classList.toggle("toggled"); +}; diff --git a/src/js/bootstrap.js b/src/js/bootstrap.js deleted file mode 100644 index 888e077..0000000 --- a/src/js/bootstrap.js +++ /dev/null @@ -1,14 +0,0 @@ -window._ = require('lodash'); - -/** - * We'll load jQuery and the Bootstrap jQuery plugin which provides support - * for JavaScript based Bootstrap features such as modals and tabs. This - * code may be modified to fit the specific needs of your application. - */ - -try { - window.Popper = require('popper.js').default; - window.$ = window.jQuery = require('jquery'); - - require('bootstrap'); -} catch (e) {} diff --git a/src/sass/app.scss b/src/sass/app.scss index 610dc4a..ff76856 100644 --- a/src/sass/app.scss +++ b/src/sass/app.scss @@ -1,7 +1,5 @@ // Bootstrap -$theme-colors: ( - "primary": #2b3bb4, -); +$primary: #2b3bb4; @import '~bootstrap/scss/bootstrap'; // FontAwesome @@ -11,5 +9,118 @@ $theme-colors: ( @import '~photoswipe/dist/photoswipe.css'; @import '~photoswipe/dist/default-skin/default-skin.css'; -@import './theme'; @import '../css/sidebar.css'; + +body, #wrapper +{ + min-height: 100vh; +} + +.flex-fill +{ + flex: 1 1 auto; +} + +.card-image img +{ + width: 100%; +} + +.card-columns img,video +{ + width: 100%; +} + +.card-columns +{ + column-gap: 1em; + column-count: 2; +} + +.card-columns.card +{ + margin-bottom: 1em; +} + +@media (min-width: 768px) +{ + .card-columns + { + column-count: 3; + } +} + +@media (min-width: 992px) +{ + .card-columns + { + column-count: 4; + } +} + +@media (min-width: 1200px) +{ + .card-columns + { + column-count: 6; + } +} + +.navbar-brand +{ + font-size: 1em; +} +.navbar-brand img +{ + height: 3em; +} + +header div.row-fixed-h, +header img +{ + height: 5rem; + overflow: hidden; +} + +.bg-ro +{ + background-color: #2b3bb4 !important; +} + +footer.bg-ro a +{ + color: #fff; + text-decoration: underline; +} + +.btn-facebook +{ + color: #fff; + background-color: #3b5998; + border-color: #3b5998; +} + +#home-carousel +{ + display: flex; + align-items: center; + height: 400px; +} + +#home-carousel img +{ + max-width: 100%; + max-height: 400px; +} + +table tbody tr:nth-of-type(2n+1) +{ + background: + #d0d6d3; +} + +table td, +table th +{ + padding: 0.6rem 0.4rem; +} diff --git a/src/sass/theme.scss b/src/sass/theme.scss deleted file mode 100644 index 6c848c0..0000000 --- a/src/sass/theme.scss +++ /dev/null @@ -1,113 +0,0 @@ -body, #wrapper -{ - min-height: 100vh; -} - -.flex-fill -{ - flex: 1 1 auto; -} - -.card-image img -{ - width: 100%; -} - -.card-columns img,video -{ - width: 100%; -} - -.card-columns -{ - column-gap: 1em; - column-count: 2; -} - -.card-columns.card -{ - margin-bottom: 1em; -} - -@media (min-width: 768px) -{ - .card-columns - { - column-count: 3; - } -} - -@media (min-width: 992px) -{ - .card-columns - { - column-count: 4; - } -} - -@media (min-width: 1200px) -{ - .card-columns - { - column-count: 6; - } -} - -.navbar-brand -{ - font-size: 1em; -} -.navbar-brand img -{ - height: 3em; -} - -header div.row-fixed-h, -header img -{ - height: 5rem; - overflow: hidden; -} - -.bg-ro -{ - background-color: #2b3bb4 !important; -} - -footer.bg-ro a -{ - color: #fff; - text-decoration: underline; -} - -.btn-facebook -{ - color: #fff; - background-color: #3b5998; - border-color: #3b5998; -} - -#home-carousel -{ - display: flex; - align-items: center; - height: 400px; -} - -#home-carousel img -{ - max-width: 100%; - max-height: 400px; -} - -table tbody tr:nth-of-type(2n+1) -{ - background: - #d0d6d3; -} - -table td, -table th -{ - padding: 0.6rem 0.4rem; -} diff --git a/templates/home.html.twig b/templates/home.html.twig index 43130fc..2ef67b9 100644 --- a/templates/home.html.twig +++ b/templates/home.html.twig @@ -13,7 +13,7 @@

{% include 'partials/osm.html.twig' %}
- Kontakt + Kontakt {% include 'partials/socialmedia.html.twig' %}
diff --git a/templates/partials/base.html.twig b/templates/partials/base.html.twig index a78b9fb..170975f 100644 --- a/templates/partials/base.html.twig +++ b/templates/partials/base.html.twig @@ -68,7 +68,7 @@ {% block footer %} {% endblock %} diff --git a/templates/partials/osm.html.twig b/templates/partials/osm.html.twig index 99d2875..2842cc9 100644 --- a/templates/partials/osm.html.twig +++ b/templates/partials/osm.html.twig @@ -1,10 +1,19 @@
- Diese Karte zeigt unseren Hof + - + Auf OpenStreetMaps öffnen - + Auf Google Maps öffnen diff --git a/webpack.mix.js b/webpack.mix.js index 27d2d2d..87ee394 100644 --- a/webpack.mix.js +++ b/webpack.mix.js @@ -2,8 +2,9 @@ let mix = require('laravel-mix'); -mix.setPublicPath('dist'); -mix.setResourceRoot('/user/themes/reitanlage-oranienburg/dist/'); - -mix.js('src/js/app.js', 'dist'); -mix.sass('src/sass/app.scss', 'dist'); +mix.setPublicPath('dist') + .setResourceRoot('/user/themes/reitanlage-oranienburg/dist/') + .js('src/js/app.js', 'dist') + .sass('src/sass/app.scss', 'dist') + .sourceMaps(false) + .version();