Implementierung Fachbereichsseiten (#305)
All checks were successful
Website Prod/Test / Produktivumgebung (push) Successful in 19s
Website Prod/Test / Testumgebung (push) Successful in 8s

Schließt #182

Basis-Implementierung der Fachbereichsseiten mit Layout/Menüeinbindung, Inhalt aller Fächer, WoU-Seiten, Umstrukturierung der Begabtenförderung

Co-authored-by: GCG.Admin (Automatisiert) <admin@cantor-gymnasium.de>
Reviewed-on: #305
This commit is contained in:
2024-11-22 09:01:19 +01:00
parent 9eaa1f0a4d
commit 14b1cce75f
114 changed files with 1355 additions and 168 deletions

View File

@ -0,0 +1,23 @@
{{ $emojis := dict
"danger" "alert-octagram"
"info" "information-outline"
"warning" "alert-outline"
}}
{{ if eq .Type "alert" }}
<div class="alert alert-{{ .AlertType }}" role="alert">
<h4 class="alert-heading">
{{ partial "mdi" (index $emojis .AlertType) }}
{{ with .AlertTitle }}
{{ . }}
{{ else }}
{{ or (i18n .AlertType) (title .AlertType) }}
{{ end }}
</h4>
{{ .Text }}
</div>
{{ else }}
<blockquote>
{{ .Text }}
</blockquote>
{{ end }}

View File

@ -2,10 +2,8 @@
<section class="section">
<div class="container">
<div class="row">
{{ range .Pages }}
{{ partial "card-btn" . }}
{{ end }}
<div class="content">
{{ .Content }}
</div>
</div>
</section>

View File

@ -1,16 +0,0 @@
{{ define "main" }}
{{ partial "header-contest" . }}
<section class="section pt-0">
<div class="container">
<h2 class="mb-4">Weitere Begabtenförderungsangebote</h2>
<div class="row" data-pagefind-ignore="all">
{{ range partial "data/related" . }}
{{ partial "card-btn" . }}
{{ end }}
</div>
</div>
</section>
{{ end }}

View File

@ -0,0 +1,13 @@
{{ define "main" }}
<section class="section pb-0">
<div class="container">
<div class="row">
{{ range .Data.Pages }}
{{ partial "card-btn" . }}
{{ end }}
</div>
</div>
</section>
{{ end }}

View File

@ -0,0 +1,9 @@
{{ define "main" }}
{{ partial "tile-modals" . }}
{{ if not (eq .Params.news false) }}
{{ partial "news" (dict "param" ".Params.subjects" "cond" (slice .Title) "title" (print "dem Fach " .Title) "Site" .Site) }}
{{ end }}
{{ end }}

View File

@ -0,0 +1,24 @@
<section class="section pt-0">
<div class="container">
<div class="d-flex align-items-center mb-4 justify-content-between">
<h2 class="section-title">Aktuelles aus {{ .title }}</h3>
{{ with .link }}
<div>
<a href="{{ . | absURL }}" class="btn btn-sm btn-primary ms-sm-3 d-none d-sm-block">Alle anzeigen</a>
</div>
{{ end }}
</div>
<div class="row">
{{ $news := (where .Site.RegularPages "Type" "post") | intersect (where .Site.RegularPages .param
"intersect" .cond) }}
{{ range first 3 $news }}
<div class="col-lg-4 col-sm-6 mb-4 mb-lg-0 d-flex align-items-stretch">
{{ partial "card-article" .}}
</div>
{{ end }}
{{ if eq (len $news) 0 }}
<p>Leider wurden noch keine Artikel zu {{ .title }} veröffentlicht. Folgen Sie dem Georg-Cantor-Gymnasium über eines der Informationskanäle, um stets auf dem neusten Stand zu bleiben!</p>
{{ end }}
</div>
</div>
</section>

View File

@ -6,11 +6,11 @@
</div>
<div class="container">
{{ partial "filter-controls" . }}
<div class="filter-container row">
<div class="filter-container row justify-content-center">
{{ range .Params.tiles }}
{{ partial "modal" . }}
<div class="col-lg-4 col-sm-6 filter-item" data-groups="{{ .category | urlize }}">
<div class="card border-primary rounded-0 hover-shadow mb-4">
<div class="card border-primary rounded-0 hover-shadow mb-2">
{{ if and .image (ne .image "/media/image.webp") }}
<img class="card-img-top rounded-0" src="{{ .image | relURL }}">
{{ else }}
@ -18,9 +18,13 @@
<span class="fb-tile-icon" style="color: {{ .font_color }}">{{ partial "mdi" .icon }}</span>
</div>
{{ end }}
<div class="card-body">
<div class="card-body d-flex flex-column">
<h4 class="card-title text-truncate">{{ .title }}</h4>
<button type="button" class="btn btn-primary btn-sm" onclick="$('#{{ md5 .title }}').modal('show');" data-pagefind-ignore>Mehr anzeigen</button>
{{ if .external.enable }}
<a href="{{ .external.link | absURL }}" class="btn btn-primary btn-sm mt-auto align-self-start">Mehr anzeigen</a>
{{ else }}
<button type="button" class="btn btn-primary btn-sm mt-auto align-self-start" onclick="$('#{{ md5 .title }}').modal('show');" data-pagefind-ignore>Mehr anzeigen</button>
{{ end }}
</div>
</div>
</div>

View File

@ -2,7 +2,9 @@
<section class="section">
<div class="container">
{{ .Content }}
<div class="content">
{{ .Content }}
</div>
</div>
{{ if .Params.infocard.enable }}
{{ with .Params.infocard }}

View File

@ -1,10 +0,0 @@
{{ $pc := .Page.Site.Config.Privacy.YouTube }}
{{ if not $pc.Disable }}
{{ $ytHost := cond $pc.PrivacyEnhanced "piped.kavin.rocks" "www.youtube.com" }}
{{ $id := .Get "id" | default (.Get 0) }}
{{ $class := .Get "class" | default (.Get 1) }}
{{ $title := .Get "title" | default "YouTube Video" }}
<div {{ with $class }}class="shortcode {{ . }}" {{ else }} style="position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden;"{{ end }}>
<iframe src="https://{{ $ytHost }}/embed/{{ $id }}{{ with .Get "autoplay" }}{{ if eq . "true" }}?autoplay=1{{ end }}{{ end }}" {{ if not $class }}style="position: absolute; top: 0; left: 0; width: 100%; height: 100%; border:0;" {{ end }}allowfullscreen title="{{ $title }}"></iframe>
</div>
{{ end }}

18
layouts/wou/list.html Normal file
View File

@ -0,0 +1,18 @@
{{ define "main" }}
<section class="section pb-0">
<div class="container">
<div class="content">
{{ .Content }}
</div>
</div>
<div class="container">
<div class="row">
{{ range .Pages }}
{{ partial "card-btn" . }}
{{ end }}
</div>
</div>
</section>
{{ end }}

15
layouts/wou/single.html Normal file
View File

@ -0,0 +1,15 @@
{{ define "main" }}
<section class="section" data-pagefind-body>
<div class="container">
<div class="content text-justify">
{{ .Content }}
</div>
</div>
</section>
{{ with .Params.news }}
{{ partial "news" (merge . (dict "Site" $.Site)) }}
{{ end }}
{{ end }}