cleanups + optimizations

This commit is contained in:
Denys Konovalov 2023-01-03 11:09:20 +01:00
parent 9f7f344497
commit 0c2cb67a0b
29 changed files with 38 additions and 229 deletions

View File

@ -103,22 +103,6 @@
}); });
}); });
var containerEl = document.querySelector('.shuffle-wrapper');
if (containerEl) {
var Shuffle = window.Shuffle;
var myShuffle = new Shuffle(document.querySelector('.shuffle-wrapper'), {
itemSelector: '.shuffle-item',
buffer: 1
});
jQuery('input[name="shuffle-filter"]').on('change', function (evt) {
var input = evt.currentTarget;
if (input.checked) {
myShuffle.filter(input.value);
}
});
}
})(jQuery); })(jQuery);

View File

@ -1,138 +0,0 @@
(function ($) {
'use strict';
// Preloader js
$(window).on('load', function () {
$('.preloader').fadeOut(100);
});
// Sticky Menu
$(window).scroll(function () {
var height = $('.top-header').innerHeight();
if ($('header').offset().top > 10) {
$('.top-header').addClass('hide');
$('.navigation').addClass('nav-bg');
$('.navigation').css('margin-top','-'+height+'px');
} else {
$('.top-header').removeClass('hide');
$('.navigation').removeClass('nav-bg');
$('.navigation').css('margin-top','-'+0+'px');
}
});
// Background-media
$('[data-background]').each(function () {
$(this).css({
'background-image': 'url(' + $(this).data('background') + ')'
});
});
//Hero Slider
$('.hero-slider').slick({
autoplay: true,
autoplaySpeed: 7500,
pauseOnFocus: false,
pauseOnHover: false,
infinite: true,
arrows: true,
fade: true,
prevArrow: '<button type=\'button\' class=\'prevArrow\'><i class=\'fa-solid fa-angle-left\'></i></button>',
nextArrow: '<button type=\'button\' class=\'nextArrow\'><i class=\'fa-solid fa-angle-right\'></i></button>',
dots: true
});
$('.hero-slider').slickAnimation();
// venobox popup
$(document).ready(function () {
$('.venobox').venobox();
});
// filter
$(document).ready(function () {
var containerEl = document.querySelector('.filtr-container');
var filterizd;
if (containerEl) {
filterizd = $('.filtr-container').filterizr({});
}
//Active changer
$('.filter-controls li').on('click', function () {
$('.filter-controls li').removeClass('active');
$(this).addClass('active');
});
});
// Count Up
function counter() {
var oTop;
if ($('.count').length !== 0) {
oTop = $('.count').offset().top - window.innerHeight;
}
if ($(window).scrollTop() > oTop) {
$('.count').each(function () {
var $this = $(this),
countTo = $this.attr('data-count');
$({
countNum: $this.text()
}).animate({
countNum: countTo
}, {
duration: 1000,
easing: 'swing',
step: function () {
$this.text(Math.floor(this.countNum));
},
complete: function () {
$this.text(this.countNum);
}
});
});
}
}
$(window).on('scroll', function () {
counter();
});
// Animation
$(document).ready(function () {
$('.has-animation').each(function (index) {
$(this).delay($(this).data('delay')).queue(function () {
$(this).addClass('animate-in');
});
});
});
var containerEl = document.querySelector('.shuffle-wrapper');
if (containerEl) {
var Shuffle = window.Shuffle;
var myShuffle = new Shuffle(document.querySelector('.shuffle-wrapper'), {
itemSelector: '.shuffle-item',
buffer: 1
});
jQuery('input[name="shuffle-filter"]').on('change', function (evt) {
var input = evt.currentTarget;
if (input.checked) {
myShuffle.filter(input.value);
}
});
}
})(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";
}
});
}

View File

@ -1,6 +1,6 @@
baseURL: https://cantorgymnasium.de/ baseURL: https://cantorgymnasium.de/
title: Georg-Cantor-Gymnasium title: Georg-Cantor-Gymnasium
paginate: 5 paginate: 6
summaryLength: "10" summaryLength: "10"
defaultContentLanguageInSubdir: false defaultContentLanguageInSubdir: false
defaultContentLanguage: de defaultContentLanguage: de
@ -30,7 +30,7 @@ params:
css: css:
- link: plugins/bootstrap/bootstrap.min.css - link: plugins/bootstrap/bootstrap.min.css
- link: plugins/slick/slick.css - link: plugins/slick/slick.css
- link: plugins/animate/animate.css - link: plugins/animate/animate.min.css
- link: plugins/venobox/venobox.css - link: plugins/venobox/venobox.css
- link: plugins/fontawesome/css/all.css - link: plugins/fontawesome/css/all.css
- link: plugins/fira/fira.css - link: plugins/fira/fira.css
@ -38,7 +38,6 @@ params:
- link: plugins/jQuery/jquery.min.js - link: plugins/jQuery/jquery.min.js
- link: plugins/bootstrap/bootstrap.min.js - link: plugins/bootstrap/bootstrap.min.js
- link: plugins/slick/slick.min.js - link: plugins/slick/slick.min.js
- link: plugins/shuffle/shuffle.min.js
- link: plugins/venobox/venobox.min.js - link: plugins/venobox/venobox.min.js
- link: plugins/filterizr/jquery.filterizr.min.js - link: plugins/filterizr/jquery.filterizr.min.js
social: social:

View File

@ -4,8 +4,7 @@ date: 2022-04-01T13:28:14.429Z
draft: "false" draft: "false"
bg_image: /media/backgrounds/page-title.png bg_image: /media/backgrounds/page-title.png
image: /media/ganztagsangebote/band.webp image: /media/ganztagsangebote/band.webp
categories_ag: category: Musik
- Musik
duration: flexibel duration: flexibel
weekly: Mittwoch, 9. Stunde weekly: Mittwoch, 9. Stunde
class: alle Klassenstufen class: alle Klassenstufen

View File

@ -5,8 +5,7 @@ draft: "false"
bg_image: /media/backgrounds/page-title.png bg_image: /media/backgrounds/page-title.png
description: "" description: ""
image: /media/ganztagsangebote/biologie.webp image: /media/ganztagsangebote/biologie.webp
categories_ag: category: Naturwissenschaften
- Naturwissenschaften
duration: 1. Stunde (14-tägig) duration: 1. Stunde (14-tägig)
weekly: Montag, 13:20 bis 14:50 Uhr weekly: Montag, 13:20 bis 14:50 Uhr
class: 5. Klasse class: 5. Klasse

View File

@ -4,8 +4,7 @@ date: 2022-10-15T16:21:22.895Z
draft: "false" draft: "false"
bg_image: /media/backgrounds/page-title.png bg_image: /media/backgrounds/page-title.png
image: /media/ganztagsangebote/bw.webp image: /media/ganztagsangebote/bw.webp
categories_ag: category: Gesellschaft
- Gesellschaft
duration: nach Vereinbarung duration: nach Vereinbarung
weekly: ab November weekly: ab November
class: alle Klassenstufen class: alle Klassenstufen

View File

@ -5,9 +5,7 @@ draft: false
bg_image: /media/backgrounds/page-title.png bg_image: /media/backgrounds/page-title.png
description: "" description: ""
image: /media/ganztagsangebote/cantortechnik.webp image: /media/ganztagsangebote/cantortechnik.webp
categories_ag: category: Technik
- Technik
- Naturwissenschaften
duration: 2 Stunden duration: 2 Stunden
weekly: "Donnerstag, 8.-9. Stunde " weekly: "Donnerstag, 8.-9. Stunde "
class: alle Klassenstufen class: alle Klassenstufen

View File

@ -4,8 +4,7 @@ date: 2022-04-01T13:28:14.429Z
draft: "false" draft: "false"
bg_image: /media/backgrounds/page-title.png bg_image: /media/backgrounds/page-title.png
image: /media/ganztagsangebote/chor.webp image: /media/ganztagsangebote/chor.webp
categories_ag: category: Musik
- Musik
duration: 45 Minuten duration: 45 Minuten
weekly: Mittwoch, 8. / 9. Stunde weekly: Mittwoch, 8. / 9. Stunde
class: alle Klassenstufen class: alle Klassenstufen

View File

@ -5,8 +5,7 @@ draft: "false"
bg_image: /media/backgrounds/page-title.png bg_image: /media/backgrounds/page-title.png
description: "Zurück in die Zukunft: Unser GCG im Wandel der Zeit" description: "Zurück in die Zukunft: Unser GCG im Wandel der Zeit"
image: /media/ganztagsangebote/chronik.webp image: /media/ganztagsangebote/chronik.webp
categories_ag: category: Gesellschaft
- Gesellschaft
duration: 2. Stunden duration: 2. Stunden
weekly: Donnerstag, 9. - 10. Stunde weekly: Donnerstag, 9. - 10. Stunde
class: 8. - 12. Klasse class: 8. - 12. Klasse

View File

@ -4,8 +4,7 @@ date: 2022-10-15T16:21:22.895Z
draft: "false" draft: "false"
bg_image: /media/backgrounds/page-title.png bg_image: /media/backgrounds/page-title.png
image: /media/ganztagsangebote/keramik.webp image: /media/ganztagsangebote/keramik.webp
categories_ag: category: Kunst
- Kunst
duration: 2. Stunden duration: 2. Stunden
weekly: Dienstag, 7./8. Stunde weekly: Dienstag, 7./8. Stunde
class: 5. - 8. Klasse class: 5. - 8. Klasse

View File

@ -4,8 +4,7 @@ date: 2022-10-15T16:21:22.895Z
draft: "false" draft: "false"
bg_image: /media/backgrounds/page-title.png bg_image: /media/backgrounds/page-title.png
image: /media/ganztagsangebote/kb.webp image: /media/ganztagsangebote/kb.webp
categories_ag: category: Musik
- Musik
duration: 1. Stunde duration: 1. Stunde
weekly: Mittwoch, 7./8. Stunde weekly: Mittwoch, 7./8. Stunde
class: alle Klassenstufen class: alle Klassenstufen

View File

@ -4,8 +4,7 @@ date: 2022-10-15T16:21:22.895Z
draft: "false" draft: "false"
bg_image: /media/backgrounds/page-title.png bg_image: /media/backgrounds/page-title.png
image: /media/ganztagsangebote/kunst.webp image: /media/ganztagsangebote/kunst.webp
categories_ag: category: Kunst
- Kunst
duration: nach Vereinbarung duration: nach Vereinbarung
weekly: Freitag, ab 7. Stunde weekly: Freitag, ab 7. Stunde
class: 5. - 7. Klasse class: 5. - 7. Klasse

View File

@ -4,9 +4,7 @@ date: 2022-10-15T16:32:26.371Z
draft: "false" draft: "false"
bg_image: /media/backgrounds/page-title.png bg_image: /media/backgrounds/page-title.png
image: /media/ganztagsangebote/lego.webp image: /media/ganztagsangebote/lego.webp
categories_ag: category: Technik
- Naturwissenschaften
- Technik
duration: nach Vereinbarung duration: nach Vereinbarung
weekly: Mittwoch, 8. Stunde weekly: Mittwoch, 8. Stunde
class: 6. Klasse class: 6. Klasse

View File

@ -5,9 +5,7 @@ draft: false
bg_image: /media/bild_titelbild.jpg bg_image: /media/bild_titelbild.jpg
description: Förderung für begabte Schülerinnen und Schüler in Mathematik. description: Förderung für begabte Schülerinnen und Schüler in Mathematik.
image: /media/ganztagsangebote/mathematik.webp image: /media/ganztagsangebote/mathematik.webp
categories_ag: category: Mathematik
- Mathematik
- Naturwissenschaften
duration: 1. Stunde duration: 1. Stunde
weekly: Dienstag, 7. Stunde weekly: Dienstag, 7. Stunde
class: 5. Klasse class: 5. Klasse

View File

@ -5,9 +5,7 @@ draft: false
bg_image: /media/bild_titelbild.jpg bg_image: /media/bild_titelbild.jpg
description: Förderung für begabte Schülerinnen und Schüler in Mathematik description: Förderung für begabte Schülerinnen und Schüler in Mathematik
image: /media/ganztagsangebote/mathematik.webp image: /media/ganztagsangebote/mathematik.webp
categories_ag: category: Mathematik
- Mathematik
- Naturwissenschaften
duration: 1. Stunde duration: 1. Stunde
weekly: Montag, 7. Stunde weekly: Montag, 7. Stunde
class: 6. Klasse class: 6. Klasse

View File

@ -5,8 +5,7 @@ draft: false
bg_image: /media/bild_titelbild.jpg bg_image: /media/bild_titelbild.jpg
description: Begabtenförderung in Biologie, Chemie und Physik description: Begabtenförderung in Biologie, Chemie und Physik
image: /media/ganztagsangebote/nawigator.webp image: /media/ganztagsangebote/nawigator.webp
categories_ag: category: Naturwissenschaften
- Naturwissenschaften
duration: nach Vereinbarung duration: nach Vereinbarung
weekly: ab November weekly: ab November
class: alle Klassenstufen class: alle Klassenstufen

View File

@ -4,8 +4,7 @@ date: 2022-10-15T16:38:35.662Z
draft: "false" draft: "false"
bg_image: /media/backgrounds/page-title.png bg_image: /media/backgrounds/page-title.png
image: /media/ganztagsangebote/pen-paper.webp image: /media/ganztagsangebote/pen-paper.webp
categories_ag: category: Gesellschaft
- Gesellschaft
duration: nach Vereinbarung duration: nach Vereinbarung
weekly: siehe Tabelle weekly: siehe Tabelle
class: alle Klassenstufen class: alle Klassenstufen

View File

@ -4,8 +4,7 @@ date: 2022-10-15T16:21:22.895Z
draft: "false" draft: "false"
bg_image: /media/backgrounds/page-title.png bg_image: /media/backgrounds/page-title.png
image: /media/ganztagsangebote/schach.webp image: /media/ganztagsangebote/schach.webp
categories_ag: category: Naturwissenschaften
- Naturwissenschaften
duration: nach Vereinbarung duration: nach Vereinbarung
weekly: ab November weekly: ab November
class: alle Klassenstufen class: alle Klassenstufen

View File

@ -4,8 +4,7 @@ date: 2022-10-15T17:01:15.900Z
draft: "false" draft: "false"
bg_image: /media/backgrounds/page-title.png bg_image: /media/backgrounds/page-title.png
image: /media/ganztagsangebote/sz.webp image: /media/ganztagsangebote/sz.webp
categories_ag: category: Gesellschaft
- Gesellschaft
duration: nach Vereinbarung duration: nach Vereinbarung
weekly: nach Vereinbarung weekly: nach Vereinbarung
class: alle Klassenstufen class: alle Klassenstufen

View File

@ -4,8 +4,7 @@ date: 2022-10-15T16:21:22.895Z
draft: "false" draft: "false"
bg_image: /media/backgrounds/page-title.png bg_image: /media/backgrounds/page-title.png
image: /media/ganztagsangebote/sport.webp image: /media/ganztagsangebote/sport.webp
categories_ag: category: Sport
- Sport
duration: 1. Stunde duration: 1. Stunde
weekly: Freitag, 7. Stunde weekly: Freitag, 7. Stunde
class: 5. - 6. Klasse class: 5. - 6. Klasse

View File

@ -5,8 +5,7 @@ draft: "false"
bg_image: /media/backgrounds/page-title.png bg_image: /media/backgrounds/page-title.png
description: "" description: ""
image: /media/ganztagsangebote/theater.webp image: /media/ganztagsangebote/theater.webp
categories_ag: category: Gesellschaft
- Gesellschaft
duration: 2. Stunden duration: 2. Stunden
weekly: Dienstag/Freitag 7./8.-9. Stunde weekly: Dienstag/Freitag 7./8.-9. Stunde
class: alle Klassenstufen class: alle Klassenstufen

View File

@ -4,8 +4,7 @@ date: 2022-10-15T16:21:22.895Z
draft: "false" draft: "false"
bg_image: /media/backgrounds/page-title.png bg_image: /media/backgrounds/page-title.png
image: /media/ganztagsangebote/volleyball.webp image: /media/ganztagsangebote/volleyball.webp
categories_ag: category: Sport
- Sport
duration: 2. Stunden duration: 2. Stunden
weekly: Freitag, 8. - 9. Stunde weekly: Freitag, 8. - 9. Stunde
class: 6. - 10. Klasse class: 6. - 10. Klasse

View File

@ -4,8 +4,7 @@ date: 2022-10-15T16:21:22.895Z
draft: "false" draft: "false"
bg_image: /media/backgrounds/page-title.png bg_image: /media/backgrounds/page-title.png
image: /media/ganztagsangebote/wasserball.webp image: /media/ganztagsangebote/wasserball.webp
categories_ag: category: Sport
- Sport
duration: 2. Stunden duration: 2. Stunden
weekly: Dienstag, 17.00 - 18.30 Uhr weekly: Dienstag, 17.00 - 18.30 Uhr
class: 5. - 8. Klasse class: 5. - 8. Klasse

View File

@ -19,7 +19,7 @@
href="{{ `author/` | relLangURL }}{{ .Params.Author | urlize }}">{{ .Params.Author | title }}</a> href="{{ `author/` | relLangURL }}{{ .Params.Author | urlize }}">{{ .Params.Author | title }}</a>
</li> </li>
</ul> </ul>
<h4 class="card-title"><a href="{{ .Permalink }}">{{ .Title }}</a></h4> <h4 class="card-title"><a href="{{ .Permalink }}">{{ .Title | truncate 20 }}</a></h4>
<p class="card-text">{{ .Summary | truncate 100 }}</p> <p class="card-text">{{ .Summary | truncate 100 }}</p>
<a href="{{ .Permalink }}" class="btn btn-primary btn-sm">{{ i18n "read_more" }}</a> <a href="{{ .Permalink }}" class="btn btn-primary btn-sm">{{ i18n "read_more" }}</a>
</div> </div>

View File

@ -27,11 +27,6 @@
<div class="col-12 my-4"> <div class="col-12 my-4">
<div class="border-bottom"></div> <div class="border-bottom"></div>
</div> </div>
<div class="content">
<aside>
{{ .TableOfContents }}
</aside>
</div>
<div class="col-12 mb-5 content"> <div class="col-12 mb-5 content">
{{ .Content }} {{ .Content }}
</div> </div>

View File

@ -1,26 +1,19 @@
{{ define "main" }} {{ define "main" }}
<section class="section" id="portfolio"> <section class="section">
<div class="container"> <div class="container">
<div class="row gta-cat"> <div class="row gta-cat">
<div class="col-lg-12"> <div class="col-lg-12">
<div class="btn-group portfolio-filter btn-group-toggle justify-content-center d-flex flex-wrap" <ul class="list-inline text-center filter-controls mb-5">
data-toggle="buttons"> <li class="list-inline-item m-3 text-uppercase active" data-filter="all">{{ i18n "all" }}</li>
<label class="btn btn-primary-outline active">
<input type="radio" name="shuffle-filter" value="all" checked="checked" />{{ i18n "all"}}
</label>
{{ $categories := slice }} {{ $categories := slice }}
{{ range .Data.Pages }} {{ range .Data.Pages }}
{{ range .Params.Categories_ag }} {{ $categories = $categories | append .Params.Category }}
{{ $categories = $categories | append . }}
{{ end }}
{{ end }} {{ end }}
{{ range ( $categories | uniq ) }} {{ range ( $categories | uniq ) }}
<label class="btn btn-primary-outline"> <li class="list-inline-item m-3 text-uppercase" data-filter="{{ . | urlize }}">{{ . | humanize }}</li>
<input type="radio" name="shuffle-filter" value="{{ . | urlize }}" />{{ . }}
</label>
{{ end }} {{ end }}
</div> </ul>
</div> </div>
</div> </div>
<noscript> <noscript>
@ -30,13 +23,9 @@
} }
</style> </style>
</noscript> </noscript>
<div class="row filtr-container">
<br>
<div class="row shuffle-wrapper justify-content-center">
{{ range .Data.Pages }} {{ range .Data.Pages }}
<div class="col-lg-4 shuffle-item" <div data-category="{{ .Params.Category | urlize }}" class="col-lg-4 col-sm-6 mb-5 filtr-item">
data-groups="[{{range $index, $element:= .Params.Categories_ag }}{{if ne $index 0}},{{end}}&quot;{{. | urlize}}&quot;{{ end }}]">
{{ .Render "ganztagsangebote" }} {{ .Render "ganztagsangebote" }}
</div> </div>
{{ end }} {{ end }}

View File

@ -105,7 +105,7 @@ h6, .h6 {
background: #ffab08; background: #ffab08;
color: #ffbc3b; } color: #ffbc3b; }
.btn-primary.active:not(:disabled):not(.disabled), .btn-primary:not(:disabled):not(.disabled).active,
.btn-primary:not(:disabled):not(.disabled):active, .btn-primary:not(:disabled):not(.disabled):active,
.show > .btn-primary.dropdown-toggle { .show > .btn-primary.dropdown-toggle {
color: #fff; color: #fff;
@ -461,6 +461,10 @@ details[open] summary {
.termin-tc { .termin-tc {
width: 25%; } } width: 25%; } }
#wc-canvas {
width: 100%;
height: 600px; }
.top-header { .top-header {
font-size: 12px; font-size: 12px;
transition: transform .2s ease; transition: transform .2s ease;

View File

@ -201,7 +201,7 @@ CMS.registerEditorComponent({
<script> <script>
CMS.registerPreviewStyle("https://cantorgymnasium.de/plugins/bootstrap/bootstrap.min.css"); CMS.registerPreviewStyle("https://cantorgymnasium.de/plugins/bootstrap/bootstrap.min.css");
CMS.registerPreviewStyle("https://cantorgymnasium.de/plugins/slick/slick.css"); CMS.registerPreviewStyle("https://cantorgymnasium.de/plugins/slick/slick.css");
CMS.registerPreviewStyle("https://cantorgymnasium.de/plugins/animate/animate.css"); CMS.registerPreviewStyle("https://cantorgymnasium.de/plugins/animate/animate.min.css");
CMS.registerPreviewStyle("https://cantorgymnasium.de/plugins/venobox/venobox.css"); CMS.registerPreviewStyle("https://cantorgymnasium.de/plugins/venobox/venobox.css");
CMS.registerPreviewStyle("https://cantorgymnasium.de/plugins/fontawesome/css/all.css"); CMS.registerPreviewStyle("https://cantorgymnasium.de/plugins/fontawesome/css/all.css");
CMS.registerPreviewStyle("https://cantorgymnasium.de/plugins/fira/fira.css"); CMS.registerPreviewStyle("https://cantorgymnasium.de/plugins/fira/fira.css");