From 61250c137d5dc084a49532383cb1d6fff74dfea7 Mon Sep 17 00:00:00 2001 From: Denys Konovalov Date: Sun, 23 Apr 2023 14:14:40 +0200 Subject: [PATCH] style updates, mailmap --- .gitea/workflows/dev.yaml | 5 +- .gitea/workflows/prod.yaml | 7 -- assets/js/script.js | 29 ++---- assets/scss/_buttons.scss | 9 -- assets/scss/_common.scss | 137 ++++++++++++++++++++----- assets/scss/_variables.scss | 2 +- assets/scss/style.scss | 6 +- assets/scss/templates/_otherspage.scss | 26 ----- assets/scss/templates/_slider.scss | 72 ------------- layouts/404.html | 2 +- layouts/abiturienten/single.html | 2 +- layouts/kontakt/list.html | 20 +++- layouts/partials/collapsible.html | 6 +- layouts/schulchronik/single.html | 13 ++- static/js/map.js | 15 --- 15 files changed, 152 insertions(+), 199 deletions(-) delete mode 100644 assets/scss/templates/_otherspage.scss delete mode 100644 assets/scss/templates/_slider.scss delete mode 100644 static/js/map.js diff --git a/.gitea/workflows/dev.yaml b/.gitea/workflows/dev.yaml index 1f01d64d..9e3435a7 100644 --- a/.gitea/workflows/dev.yaml +++ b/.gitea/workflows/dev.yaml @@ -11,22 +11,19 @@ concurrency: jobs: dev-build: - if: gitea.repository == 'gcg/gcg-website' && gitea.event_name == 'push' + if: gitea.repository == 'gcg/gcg-website' runs-on: act-runner-user timeout-minutes: 5 steps: - name: clone uses: actions/checkout@v3 - - name: build run: hugo --minify --gc --baseURL "https://dev.cantorgymnasium.de/" --buildDrafts --buildFuture -d dev - - name: deploy run: | cd dev pagefind --source=. rsync -azr --delete ./ /opt/data/webdata/gcg-website-dev/ - - name: notification uses: actions/telegram-action@main if: always() diff --git a/.gitea/workflows/prod.yaml b/.gitea/workflows/prod.yaml index f2150c42..39089571 100644 --- a/.gitea/workflows/prod.yaml +++ b/.gitea/workflows/prod.yaml @@ -19,16 +19,13 @@ jobs: steps: - name: clone uses: actions/checkout@v3 - - name: build run: hugo --minify --gc --baseURL "https://cantorgymnasium.de/" - - name: deploy run: | cd public pagefind --source=. rsync -azr --delete ./ /opt/data/webdata/gcg-website/ - - name: notification uses: actions/telegram-action@main if: always() @@ -43,10 +40,8 @@ jobs: steps: - name: clone uses: actions/checkout@v3 - - name: build run: hugo --minify --gc --baseURL "https://test.cantorgymnasium.de/" --buildDrafts --buildFuture -d test - - name: deploy run: | cd test @@ -59,10 +54,8 @@ jobs: steps: - name: clone uses: actions/checkout@v3 - - name: build run: hugo --minify --gc --baseURL "https://cantorgymnasium.de/" - - name: deploy run: | cd public diff --git a/assets/js/script.js b/assets/js/script.js index 0810dc37..8dec63cb 100644 --- a/assets/js/script.js +++ b/assets/js/script.js @@ -1,6 +1,7 @@ (function ($) { 'use strict'; + // adapt header to height function adaptHeight () { var height = $('.top-header').innerHeight(); if ($('header').offset().top > 10) { @@ -16,7 +17,7 @@ } } - // Preloader js + // load scripts $(window).on('load', function () { $('.preloader').fadeOut(100); adaptHeight(); @@ -25,23 +26,22 @@ $('.hero-section').addClass('hs-banner'); $('.page-title-section').addClass('pts-banner'); } else { - $('.navigation').removeClass('nav-bg'); $('.hero-section').removeClass('hs-banner'); $('.page-title-section').removeClass('pts-banner'); } }); - // Sticky Menu + // sticky menu $(window).scroll(adaptHeight); - // Background-media + // background image $('[data-background]').each(function () { $(this).css({ 'background-image': 'url(' + $(this).data('background') + ')' }); }); - //Hero Slider + // hero slider $('.hero-slider').slick({ autoplay: true, autoplaySpeed: 5000, @@ -82,14 +82,14 @@ } ); } - //Active changer + // active changer $('.filter-controls li').on('click', function () { $('.filter-controls li').removeClass('active'); $(this).addClass('active'); }); }); - // Count Up + // count up function counter() { var oTop; if ($('.count').length !== 0) { @@ -121,18 +121,3 @@ }); })(jQuery); - -var acc = document.getElementsByClassName("accordion"); -var i; - -for (i = 0; i < acc.length; i++) { - acc[i].addEventListener("click", function() { - this.classList.toggle("active"); - var panel = this.nextElementSibling; - if (panel.style.maxHeight) { - panel.style.maxHeight = null; - } else { - panel.style.maxHeight = panel.scrollHeight + "px"; - } - }, {passive: true}); -} diff --git a/assets/scss/_buttons.scss b/assets/scss/_buttons.scss index 095eddf3..14bb2dd6 100644 --- a/assets/scss/_buttons.scss +++ b/assets/scss/_buttons.scss @@ -48,11 +48,6 @@ padding: 10px 35px; } -.btn-xs { - font-size: 12px; - padding: 5px 15px; -} - .btn-primary { background: $primary-color; color: $white; @@ -125,7 +120,3 @@ color: $white; } } - -.input { - border: 100px; -} diff --git a/assets/scss/_common.scss b/assets/scss/_common.scss index ba3520e8..bfdc814d 100644 --- a/assets/scss/_common.scss +++ b/assets/scss/_common.scss @@ -174,15 +174,10 @@ a h4 { font-size: 36px; } -/* page title */ .page-title-section { padding: 200px 0 80px; } - - -/* /page title */ - .list-styled { padding-left: 25px; @@ -214,6 +209,7 @@ textarea.form-control { /* pagination */ + .pagination { justify-content: center; @@ -269,7 +265,7 @@ textarea.form-control { &::before { position: absolute; content: "\f0B2A"; - font-family: "Material Design Icons"; + font-family: $icon-font; font-size: 14px; left: 0; top: 1px; @@ -289,6 +285,7 @@ textarea.form-control { max-width: 100%; margin-bottom: 1rem; border: 1px solid #dee2e6; + table-layout: fixed; th, td { @@ -312,13 +309,13 @@ textarea.form-control { blockquote { - border-left: 3px solid $primary-color; - border-top: 1px solid $primary-color; - border-bottom: 1px solid $primary-color; + border: 1px solid $border-color; + border-left: 5px solid $primary-color; padding: 20px; + padding-left: 40px; background-color: $light; + p { - margin-bottom: 0; color: $text-color; font-style: italic !important; } @@ -327,26 +324,15 @@ textarea.form-control { } } - - - pre { padding: 10px 20px; background: $light; } } -.person-thumb-sm { - height: 85px; - width: 85px; - object-fit: cover; -} - summary { font-weight: 900; - margin: -.5em -.5em 0; - padding: .5em; - font-size: 20px; + font-size: 22px; color: $secondary-color; &.hover { @@ -357,6 +343,7 @@ summary { details[open] { padding: .5em; + padding-bottom: 0; } details[open] summary { @@ -370,6 +357,83 @@ details[open] summary { } } +/* hero */ + +.hero-section { + padding: 250px 0 200px; +} + +.hs-banner { + padding: 50px 0 200px; +} + +.hero-slider { + + .prevArrow, + .nextArrow { + position: absolute; + bottom: -123px; + z-index: 9; + padding: 15px; + color: rgba($color: $white, $alpha: .5); + border: 0; + font-size: 30px; + transition: all linear .2s; + background: transparent; + + &:focus { + outline: 0; + } + + &:hover { + color: $primary-color; + } + } + + .prevArrow { + right: 60px; + } + + .nextArrow { + right: 0; + } + + .arrowIcon { + font-size: 40px; + } + + .slick-dots { + position: absolute; + left: 0; + bottom: -100px; + padding-left: 0; + + li { + display: inline-block; + margin: 0 6px; + + &.slick-active { + button { + background: $primary-color; + } + } + + button { + color: transparent; + padding: 0; + overflow: hidden; + height: 10px; + width: 10px; + background: rgba($color: $white, $alpha: .5); + border: 0; + outline: 0; + } + } + } +} + +/* /hero */ + .top-banner { padding-top: 160px !important; } @@ -396,4 +460,31 @@ details[open] summary { .wc-canvas { width: 100%; height: 600px; -} \ No newline at end of file +} + +.filter-controls{ + li{ + cursor: pointer; + transition: .1s ease; + &.active{ + font-weight: 600; + color: $primary-color; + } + &:hover{ + color: $primary-color; + } + } +} + +.tag-list{ + a{ + display: block; + padding: 5px 10px; + background: $light; + color: $text-color; + &:hover{ + background-color: $primary-color; + color: $white; + } + } +} diff --git a/assets/scss/_variables.scss b/assets/scss/_variables.scss index 2c691d82..b7d6887d 100644 --- a/assets/scss/_variables.scss +++ b/assets/scss/_variables.scss @@ -12,6 +12,6 @@ $light: #f8f9fe; $gray: #f8f8f8; // Font Variables -$primary-font: 'Fira Sans', sans-serif; +$primary-font: 'Rubik', sans-serif; $secondary-font: 'Fira Sans', sans-serif; $icon-font: 'Material Design Icons'; \ No newline at end of file diff --git a/assets/scss/style.scss b/assets/scss/style.scss index 12ff6d81..136fb779 100644 --- a/assets/scss/style.scss +++ b/assets/scss/style.scss @@ -10,8 +10,4 @@ @import 'templates/navigation'; -@import 'templates/slider'; - -@import 'templates/homepage'; - -@import 'templates/otherspage'; \ No newline at end of file +@import 'templates/homepage'; \ No newline at end of file diff --git a/assets/scss/templates/_otherspage.scss b/assets/scss/templates/_otherspage.scss deleted file mode 100644 index 6c53ffdc..00000000 --- a/assets/scss/templates/_otherspage.scss +++ /dev/null @@ -1,26 +0,0 @@ -.filter-controls{ - li{ - cursor: pointer; - transition: .1s ease; - &.active{ - font-weight: 600; - color: $primary-color; - } - &:hover{ - color: $primary-color; - } - } -} - -.tag-list{ - a{ - display: block; - padding: 5px 10px; - background: $light; - color: $text-color; - &:hover{ - background-color: $primary-color; - color: $white; - } - } -} diff --git a/assets/scss/templates/_slider.scss b/assets/scss/templates/_slider.scss deleted file mode 100644 index 666550a4..00000000 --- a/assets/scss/templates/_slider.scss +++ /dev/null @@ -1,72 +0,0 @@ -.hero-section { - padding: 250px 0 200px; -} - -.hs-banner { - padding: 50px 0 200px; -} - -.hero-slider { - - .prevArrow, - .nextArrow { - position: absolute; - bottom: -123px; - z-index: 9; - padding: 15px; - color: rgba($color: $white, $alpha: .5); - border: 0; - font-size: 30px; - transition: all linear .2s; - background: transparent; - - &:focus { - outline: 0; - } - - &:hover { - color: $primary-color; - } - } - - .prevArrow { - right: 60px; - } - - .nextArrow { - right: 0; - } - - .arrowIcon { - font-size: 40px; - } - - .slick-dots { - position: absolute; - left: 0; - bottom: -100px; - padding-left: 0; - - li { - display: inline-block; - margin: 0 6px; - - &.slick-active { - button { - background: $primary-color; - } - } - - button { - color: transparent; - padding: 0; - overflow: hidden; - height: 10px; - width: 10px; - background: rgba($color: $white, $alpha: .5); - border: 0; - outline: 0; - } - } - } -} diff --git a/layouts/404.html b/layouts/404.html index 62146903..73c6b979 100644 --- a/layouts/404.html +++ b/layouts/404.html @@ -1,6 +1,6 @@ {{ define "main" }} -
+
diff --git a/layouts/abiturienten/single.html b/layouts/abiturienten/single.html index 6406a47d..35f35628 100644 --- a/layouts/abiturienten/single.html +++ b/layouts/abiturienten/single.html @@ -1,6 +1,6 @@ {{ define "main" }} -
+
diff --git a/layouts/kontakt/list.html b/layouts/kontakt/list.html index 97a27ff0..efbe9472 100644 --- a/layouts/kontakt/list.html +++ b/layouts/kontakt/list.html @@ -8,7 +8,7 @@ crossorigin=""/> integrity="sha512-XQoYMqMTK8LvdxXYG3nZ448hOEQiglfqkJs1NOQV44cWnUrBc8PkAOcXy20w0vlaXaVUearIOBhiXZ5V3ynxwA==" crossorigin=""> -
+
@@ -48,11 +48,25 @@ crossorigin=""/>
-
+
- +
diff --git a/layouts/partials/collapsible.html b/layouts/partials/collapsible.html index fb6959cf..0bbdd7fd 100644 --- a/layouts/partials/collapsible.html +++ b/layouts/partials/collapsible.html @@ -1,8 +1,8 @@
-
- {{ .title }} -
{{ .content | markdownify }}
+
+ {{ .title }} +
{{ .content | markdownify }}
\ No newline at end of file diff --git a/layouts/schulchronik/single.html b/layouts/schulchronik/single.html index 520ffd48..a67f17d0 100644 --- a/layouts/schulchronik/single.html +++ b/layouts/schulchronik/single.html @@ -50,18 +50,17 @@
{{ $topics := slice }} {{ if .Params.pretext }} - {{ $topics = $topics | append (slice (slice .Params.Title 200 (md5 .Title))) }} + {{ $topics = $topics | append (slice (slice .Params.Title 200 (md5 .Title))) }} {{ else }} - {{ $topics = $topics | append (slice (slice .Params.Title 200)) }} + {{ $topics = $topics | append (slice (slice .Params.Title 200)) }} {{ end }} {{ range .Params.topics }} {{ if .superhaufen.enable }} - {{ $topics = $topics | append (slice (slice .title 30 (.superhaufen.link | urlize) "superhaufen" )) }} + {{ $topics = $topics | append (slice (slice .title 30 (.superhaufen.link | urlize) "superhaufen" )) }} {{ else }} - {{ $topics = $topics | append (slice (slice .title 30 (md5 .title) )) }} + {{ $topics = $topics | append (slice (slice .title 30 (md5 .title) )) }} {{ end }} {{ end }} - {{ $topics = $topics | jsonify }}