CMS refactor

This commit is contained in:
Denys Konovalov 2023-05-29 16:22:34 +02:00
parent 09a33fd70c
commit b66a27e3b9
110 changed files with 4668 additions and 3736 deletions

@ -268,10 +268,11 @@ languages:
languageName: De languageName: De
languageCode: de-de languageCode: de-de
contentDir: content/german contentDir: content/german
weight: 2 weight: 1
home: Startseite
copyright: "Copyright © 2023 Georg-Cantor-Gymnasium Halle (Saale). Made copyright: "Copyright © 2023 Georg-Cantor-Gymnasium Halle (Saale). Made
with :heart: and [Hugo](https://gohugo.io)." with :heart: and [Hugo](https://gohugo.io)."
params:
home: Startseite
impressumURL: pages/impressum impressumURL: pages/impressum
dseURL: pages/datenschutz dseURL: pages/datenschutz
privacy: privacy:

@ -4,7 +4,8 @@ date: 2023-04-19T12:55:48.540+02:00
draft: false draft: false
description: "" description: ""
image: /media/wettbewerbe/bwfs.webp image: /media/wettbewerbe/bwfs.webp
author: Frau Berthelmann author:
- frau-berthelmann
categories: categories:
- Wettbewerbe - Wettbewerbe
- Fremdsprachen - Fremdsprachen

@ -4,7 +4,8 @@ date: 2022-10-24T14:40:47.927Z
draft: false draft: false
description: "" description: ""
image: /media/image.webp image: /media/image.webp
author: Schulleitung author:
- schulleitung
categories: categories:
- Veranstaltungen - Veranstaltungen
subjects: [] subjects: []

@ -4,7 +4,8 @@ date: 2023-03-03T00:00:00.000+01:00
draft: false draft: false
description: "" description: ""
image: /media/blog/2023/cantorpreis/cp23_01.webp image: /media/blog/2023/cantorpreis/cp23_01.webp
author: Herr Berger author:
- herr-berger
categories: categories:
- Traditionen - Traditionen
- Veranstaltungen - Veranstaltungen

@ -4,7 +4,8 @@ date: 2023-03-03T12:08:52+01:00
draft: false draft: false
description: "" description: ""
image: /media/blog/2023/modul-chemie-11.webp image: /media/blog/2023/modul-chemie-11.webp
author: Chiamaka Michelle Okoro author:
- chiamaka-michelle-okoro
categories: categories:
- Naturwissenschaften - Naturwissenschaften
subjects: subjects:

@ -4,7 +4,8 @@ date: 2023-02-23T17:01:33+01:00
draft: false draft: false
description: "" description: ""
image: /media/blog/2023/modul-chemie.webp image: /media/blog/2023/modul-chemie.webp
author: Erik Zschoche author:
- erik-zschoche
categories: categories:
- Naturwissenschaften - Naturwissenschaften
subjects: subjects:

@ -4,7 +4,8 @@ date: 2023-04-11T21:26:25.198+02:00
draft: false draft: false
description: "" description: ""
image: /media/image.webp image: /media/image.webp
author: Frau Henke author:
- frau-henke
categories: categories:
- Naturwissenschaften - Naturwissenschaften
- Wettbewerbe - Wettbewerbe

@ -4,7 +4,8 @@ date: 2023-03-13T22:02:51+01:00
draft: false draft: false
description: "" description: ""
image: /media/wettbewerbe/pho.webp image: /media/wettbewerbe/pho.webp
author: Denys Konovalov author:
- denys-konovalov
categories: categories:
- Naturwissenschaften - Naturwissenschaften
- Wettbewerbe - Wettbewerbe

@ -4,7 +4,8 @@ date: 2023-01-22T16:14:48+01:00
draft: false draft: false
description: "" description: ""
image: /media/blog/gypt.webp image: /media/blog/gypt.webp
author: Denys Konovalov author:
- denys-konovalov
categories: categories:
- Wettbewerbe - Wettbewerbe
- Naturwissenschaften - Naturwissenschaften

@ -4,7 +4,8 @@ date: 2023-02-03T07:48:30+01:00
draft: false draft: false
description: "" description: ""
image: /media/wettbewerbe/chemkids.webp image: /media/wettbewerbe/chemkids.webp
author: Herr Berger author:
- herr-berger
categories: categories:
- Wettbewerbe - Wettbewerbe
- Naturwissenschaften - Naturwissenschaften

@ -4,7 +4,8 @@ date: 2023-02-21T09:44:35+01:00
draft: false draft: false
description: "" description: ""
image: /media/wettbewerbe/icho.webp image: /media/wettbewerbe/icho.webp
author: Herr Berger author:
- herr-berger
categories: categories:
- Wettbewerbe - Wettbewerbe
- Naturwissenschaften - Naturwissenschaften

@ -4,7 +4,8 @@ date: 2023-02-14T21:49:04+01:00
draft: false draft: false
description: "" description: ""
image: /media/wettbewerbe/ipho.webp image: /media/wettbewerbe/ipho.webp
author: Frau Bachran author:
- frau-bachran
categories: categories:
- Naturwissenschaften - Naturwissenschaften
- Wettbewerbe - Wettbewerbe

@ -4,7 +4,8 @@ date: 2023-03-05T18:47:59+01:00
draft: false draft: false
description: "" description: ""
image: /media/blog/festwoche.webp image: /media/blog/festwoche.webp
author: Herr Berger author:
- herr-berger
categories: categories:
- Veranstaltungen - Veranstaltungen
- Traditionen - Traditionen

@ -4,7 +4,8 @@ date: 2022-10-19T16:04:15.580Z
draft: false draft: false
description: "" description: ""
image: /media/image.webp image: /media/image.webp
author: Frau Schapitz author:
- frau-schapitz
categories: categories:
- Sonstiges - Sonstiges
- Informatik/Technik - Informatik/Technik

@ -4,7 +4,8 @@ date: 2022-11-24T09:41:02.882Z
draft: false draft: false
description: "" description: ""
image: /media/image.webp image: /media/image.webp
author: Herr Berger author:
- herr-berger
categories: categories:
- Veranstaltungen - Veranstaltungen
subjects: [] subjects: []

@ -4,7 +4,8 @@ date: 2023-01-27T21:42:51+01:00
draft: false draft: false
description: "" description: ""
image: /media/wettbewerbe/biber.webp image: /media/wettbewerbe/biber.webp
author: Herr Berger author:
- herr-berger
categories: categories:
- Wettbewerbe - Wettbewerbe
- Informatik/Technik - Informatik/Technik

@ -4,7 +4,8 @@ date: 2023-05-21T17:34:47.943+02:00
draft: false draft: false
description: "" description: ""
image: /media/blog/2023/jufo_bundesfinale_bremen_23/jufo_bf23_01.webp image: /media/blog/2023/jufo_bundesfinale_bremen_23/jufo_bf23_01.webp
author: Frau Felke author:
- frau-felke
categories: categories:
- Wettbewerbe - Wettbewerbe
- Naturwissenschaften - Naturwissenschaften

@ -4,7 +4,8 @@ date: 2023-02-22T11:08:22+01:00
draft: false draft: false
description: "" description: ""
image: /media/wettbewerbe/jufo.webp image: /media/wettbewerbe/jufo.webp
author: Frau Felke author:
- frau-felke
categories: categories:
- Wettbewerbe - Wettbewerbe
- Naturwissenschaften - Naturwissenschaften

@ -4,7 +4,8 @@ date: 2023-03-31T09:42:39.466+02:00
draft: false draft: false
description: "" description: ""
image: /media/wettbewerbe/jufo.webp image: /media/wettbewerbe/jufo.webp
author: Frau Felke author:
- frau-felke
categories: categories:
- Wettbewerbe - Wettbewerbe
- Naturwissenschaften - Naturwissenschaften

@ -4,7 +4,8 @@ date: 2023-04-12T22:40:16.690+02:00
draft: false draft: false
description: "" description: ""
image: /media/wettbewerbe/kanguru.webp image: /media/wettbewerbe/kanguru.webp
author: Frau Jacob author:
- frau-jacob
categories: categories:
- Wettbewerbe - Wettbewerbe
- Mathematik - Mathematik

@ -4,7 +4,8 @@ date: 2023-05-03T07:53:14.221+02:00
draft: false draft: false
description: "" description: ""
image: /media/wettbewerbe/jugenddebattiert.webp image: /media/wettbewerbe/jugenddebattiert.webp
author: Herr Berger author:
- herr-berger
categories: categories:
- Deutsch - Deutsch
- Gesellschaftswissenschaften - Gesellschaftswissenschaften

@ -4,7 +4,8 @@ date: 2023-03-19T14:08:31+01:00
draft: false draft: false
description: "" description: ""
image: /media/blog/2023/lernfahrt_geschichte.webp image: /media/blog/2023/lernfahrt_geschichte.webp
author: Frau Krug author:
- frau-krug
categories: categories:
- Gesellschaftswissenschaften - Gesellschaftswissenschaften
subjects: subjects:

@ -5,7 +5,8 @@ draft: false
description: Der Schülerwettbewerb unter der Schirmherrschaft des description: Der Schülerwettbewerb unter der Schirmherrschaft des
Bildungsministeriums geht in die nächste Runde. Bildungsministeriums geht in die nächste Runde.
image: /media/blog/mia.webp image: /media/blog/mia.webp
author: Denys Konovalov author:
- denys-konovalov
categories: categories:
- Wettbewerbe - Wettbewerbe
- Mathematik - Mathematik

@ -4,7 +4,8 @@ date: 2023-02-28T22:44:44+01:00
draft: false draft: false
description: "" description: ""
image: /media/wettbewerbe/mo.webp image: /media/wettbewerbe/mo.webp
author: Herr Berger author:
- herr-berger
categories: categories:
- Wettbewerbe - Wettbewerbe
- Mathematik - Mathematik

@ -4,7 +4,8 @@ date: 2023-04-23T14:18:13.497+02:00
draft: false draft: false
description: "" description: ""
image: /media/blog/2023/abitag/04.webp image: /media/blog/2023/abitag/04.webp
author: Herr Berger author:
- herr-berger
categories: categories:
- Traditionen - Traditionen
tags: tags:

@ -4,7 +4,8 @@ date: 2023-01-24T08:18:02+01:00
draft: false draft: false
description: "" description: ""
image: /media/image.webp image: /media/image.webp
author: Herr Berger author:
- herr-berger
categories: categories:
- Musik - Musik
- Deutsch - Deutsch

@ -4,7 +4,8 @@ date: 2022-12-10T12:30:33+01:00
draft: false draft: false
description: "" description: ""
image: /media/image.webp image: /media/image.webp
author: Frau Krug author:
- frau-krug
categories: categories:
- Musik - Musik
- Traditionen - Traditionen

@ -4,7 +4,8 @@ date: 2023-03-15T09:05:16+01:00
draft: false draft: false
description: "" description: ""
image: /media/wettbewerbe/jugenddebattiert.webp image: /media/wettbewerbe/jugenddebattiert.webp
author: Frau Opel-Fritzlar author:
- frau-opel-fritzlar
categories: categories:
- Wettbewerbe - Wettbewerbe
- Deutsch - Deutsch

@ -4,7 +4,8 @@ date: 2023-03-21T07:56:46+01:00
draft: false draft: false
description: "" description: ""
image: /media/blog/rezi_wettstreit.webp image: /media/blog/rezi_wettstreit.webp
author: Herr Berger author:
- herr-berger
categories: categories:
- Wettbewerbe - Wettbewerbe
- Traditionen - Traditionen

@ -4,7 +4,8 @@ date: 2023-02-11T11:28:18+01:00
draft: false draft: false
description: "" description: ""
image: /media/wettbewerbe/jugenddebattiert.webp image: /media/wettbewerbe/jugenddebattiert.webp
author: Frau Schulz author:
- frau-schulz
categories: categories:
- Wettbewerbe - Wettbewerbe
- Gesellschaftswissenschaften - Gesellschaftswissenschaften

@ -4,7 +4,8 @@ date: 2023-02-21T20:09:03+01:00
draft: false draft: false
description: "" description: ""
image: /media/blog/2023/skilager.webp image: /media/blog/2023/skilager.webp
author: Frau Tuppack author:
- frau-tuppack
categories: categories:
- Traditionen - Traditionen
- Sport - Sport

@ -4,7 +4,8 @@ date: 2023-01-19T19:13:48+01:00
draft: false draft: false
description: "" description: ""
image: /media/blog/2023/spezilager/01.webp image: /media/blog/2023/spezilager/01.webp
author: Franziska Berner author:
- franziska-berner
categories: categories:
- Wettbewerbe - Wettbewerbe
- Mathematik - Mathematik

@ -4,7 +4,8 @@ date: 2023-05-16T21:40:40.773+02:00
draft: false draft: false
description: "" description: ""
image: /media/blog/2023/tdk.webp image: /media/blog/2023/tdk.webp
author: Herr Berger author:
- herr-berger
categories: categories:
- Traditionen - Traditionen
- Schülerrat - Schülerrat

@ -4,7 +4,8 @@ date: 2023-01-24T15:13:45+01:00
draft: false draft: false
description: "" description: ""
image: /media/wettbewerbe/toefl.webp image: /media/wettbewerbe/toefl.webp
author: Herr Berger author:
- herr-berger
categories: categories:
- Wettbewerbe - Wettbewerbe
- Fremdsprachen - Fremdsprachen

@ -4,7 +4,8 @@ date: 2023-05-03T16:11:27.148+02:00
draft: false draft: false
description: "" description: ""
image: /media/image.webp image: /media/image.webp
author: Denys Konovalov author:
- denys-konovalov
categories: categories:
- Schülerrat - Schülerrat
tags: tags:

@ -4,7 +4,8 @@ date: 2022-12-12T12:00:43.329Z
draft: false draft: false
description: "" description: ""
image: /media/blog/vlw.webp image: /media/blog/vlw.webp
author: Herr Berger author:
- herr-berger
categories: categories:
- Wettbewerbe - Wettbewerbe
- Deutsch - Deutsch

@ -4,7 +4,8 @@ date: 2022-12-20T20:40:32.790Z
draft: false draft: false
description: "" description: ""
image: /media/blog/weihnachten.webp image: /media/blog/weihnachten.webp
author: Herr Berger author:
- herr-berger
categories: categories:
- Traditionen - Traditionen
- Schülerrat - Schülerrat

@ -4,7 +4,8 @@ date: 2023-03-30T11:07:03.082+02:00
draft: false draft: false
description: "" description: ""
image: /media/image.webp image: /media/image.webp
author: Herr Berger author:
- herr-berger
categories: categories:
- Wettbewerbe - Wettbewerbe
- Naturwissenschaften - Naturwissenschaften

@ -1,6 +1,7 @@
enable: true enable: true
title: Ausblick auf die Woche title: Ausblick auf die Woche
author: Frau Felke author:
- frau-felke
image: /media/ausblick.webp image: /media/ausblick.webp
content: > content: >
Wir hoffen, dass alle erholt aus den Ferien kommen und frisch in die letzte Wir hoffen, dass alle erholt aus den Ferien kommen und frisch in die letzte

@ -99,11 +99,13 @@ about:
blog: blog:
enable: true enable: true
title: Aktuelles title: Aktuelles
number: 2
success_banner: success_banner:
enable: true enable: true
image: media/home/success_banner.webp image: media/home/success_banner.webp
feature_item: feature_item:
- name: Mathematik-Olympiade - type: image
name: Mathematik-Olympiade
content: > content: >
In der Landesrunde der [Mathematikolympiade In der Landesrunde der [Mathematikolympiade
2023](https://cantorgymnasium.de/blog/mathematik-olympiade-landesrunde-2023/) 2023](https://cantorgymnasium.de/blog/mathematik-olympiade-landesrunde-2023/)
@ -121,8 +123,8 @@ success_banner:
an Schüler unserer Schule verliehen. an Schüler unserer Schule verliehen.
image: media/home/mo.webp image: media/home/mo.webp
icon: "" - type: image
- name: Physikolympiade name: Physikolympiade
image: media/home/po.webp image: media/home/po.webp
content: > content: >
In der [Landesphysikolympiade In der [Landesphysikolympiade
@ -140,32 +142,36 @@ success_banner:
an Schüler unserer Schule verliehen. an Schüler unserer Schule verliehen.
icon: "" - type: image
- name: Chemieolympiade name: Chemieolympiade
image: media/home/icho.webp image: media/home/icho.webp
content: > content: >
Ein Schüler unserer Schule bekam die Bronzemedaille in der Ein Schüler unserer Schule bekam die Bronzemedaille in der
Internationalen Chemieolympiade 2020 verliehen. Ein weiterer Schüler Internationalen Chemieolympiade 2020 verliehen. Ein weiterer Schüler
unserer Schule wurde für die Nationalmannschaft für die IChO 2021 unserer Schule wurde für die Nationalmannschaft für die IChO 2021
ausgewählt. ausgewählt.
icon: "" - type: image
- content: > content: >
Ein Schüler unserer Schule bekam in der Endrunde von "Chemie - die Ein Schüler unserer Schule bekam in der Endrunde von "Chemie - die
stimmt!" 2021 den ersten Platz in drei Kategorien. stimmt!" 2021 den ersten Platz in drei Kategorien.
name: Chemie - die stimmt! name: Chemie - die stimmt!
image: media/home/cds.webp image: media/home/cds.webp
icon: "" - type: icon
- name: Und viel mehr ... name: Und viel mehr ...
icon: mdi mdi-trophy-outline icon: mdi mdi-trophy-outline
content: > content: >
Durch umfassende Begabtenförderungsangebote sind unsere Schüler bei Durch umfassende Begabtenförderungsangebote sind unsere Schüler bei
vielen Wettbewerben erfolgreich. Diese umfassen erweiterte Stoffgebiete, vielen Wettbewerben erfolgreich. Diese umfassen erweiterte Stoffgebiete,
Spezialistenlager und begabtenfördernde Ganztagsangebote. Spezialistenlager und begabtenfördernde Ganztagsangebote.
img: false - type: image
image: "" name: uztr
image: /media/logo_lg_blue.webp
content: |
ttttt
ganztagsangebote: ganztagsangebote:
enable: true enable: true
title: Unsere Ganztagsangebote title: Unsere Ganztagsangebote
number: 6
cta: cta:
enable: true enable: true
title: Interessiert ? title: Interessiert ?
@ -195,6 +201,7 @@ info:
termine: termine:
enable: true enable: true
title: Anstehende Termine title: Anstehende Termine
number: 1
digitalpakt: digitalpakt:
enable: true enable: true
title: DigitalPakt Schule title: DigitalPakt Schule

@ -5,7 +5,8 @@
<div class="col-6"><i class="mdi mdi-calendar-today me-2"></i>{{ time.Format "02. Jan 2006" .PublishDate }}</div> <div class="col-6"><i class="mdi mdi-calendar-today me-2"></i>{{ time.Format "02. Jan 2006" .PublishDate }}</div>
<div class="col-6 text-truncate"> <div class="col-6 text-truncate">
<i class="mdi mdi-fountain-pen-tip me-2"></i> <i class="mdi mdi-fountain-pen-tip me-2"></i>
{{ range where (where .Site.RegularPages "Type" "author") "Title" .Params.author }} {{ range $index, $elements := where (where .Site.RegularPages "Type" "author") "File.BaseFileName" "in" .Params.author }}
{{ if ne $index 0 }}, {{ end }}
{{ if .Params.simplified }} {{ if .Params.simplified }}
{{ .Title }} {{ .Title }}
{{ else }} {{ else }}

@ -12,7 +12,8 @@
<div class="row mb-3"> <div class="row mb-3">
<div class="col-6 mb-md-0 text-light"> <div class="col-6 mb-md-0 text-light">
<span class="fw-bold me-1">{{ i18n "posted_by" }}:</span> <span class="fw-bold me-1">{{ i18n "posted_by" }}:</span>
{{ range where (where .Site.RegularPages "Type" "author") "Title" .Params.author }} {{ range $index, $elements := where (where .Site.RegularPages "Type" "author") "File.BaseFileName" "in" .Params.author }}
{{ if ne $index 0 }}, {{ end }}
{{ if .Params.simplified }} {{ if .Params.simplified }}
{{ .Title }} {{ .Title }}
{{ else }} {{ else }}
@ -28,7 +29,7 @@
<div class="row"> <div class="row">
<div class="col-12 mb-md-0 text-light"> <div class="col-12 mb-md-0 text-light">
<span class="fw-bold me-1">{{ i18n "category" }}:</span> <span class="fw-bold me-1">{{ i18n "category" }}:</span>
{{ range $index, $elements:= .Params.categories }} {{ range $index, $elements := .Params.categories }}
{{ if ne $index 0 }}, {{ end }} {{ if ne $index 0 }}, {{ end }}
<a href="{{ `categories/` | relLangURL }}{{ . | urlize | lower }}">{{ . | title }}</a> <a href="{{ `categories/` | relLangURL }}{{ . | urlize | lower }}">{{ . | title }}</a>
{{ end }} {{ end }}

@ -122,9 +122,10 @@
<img class="card-img-top rounded-0" src="{{ $data.ausblick.image | relURL }}" alt="{{ $data.ausblick.title }}" onclick="$('#{{ md5 $data.ausblick.title }}').modal('show');"> <img class="card-img-top rounded-0" src="{{ $data.ausblick.image | relURL }}" alt="{{ $data.ausblick.title }}" onclick="$('#{{ md5 $data.ausblick.title }}').modal('show');">
<div class="card-body d-flex flex-column"> <div class="card-body d-flex flex-column">
<div class="row mb-2"> <div class="row mb-2">
<div class="col-6"> <div class="col-12">
<i class="mdi mdi-fountain-pen-tip me-2"></i> <i class="mdi mdi-fountain-pen-tip me-2"></i>
{{ range where (where .Site.RegularPages "Type" "author") "Title" $data.ausblick.author }} {{ range $index, $elements := where (where .Site.RegularPages "Type" "author") "File.BaseFileName" "in" $data.ausblick.author }}
{{ if ne $index 0 }}, {{ end }}
{{ if .Params.simplified }} {{ if .Params.simplified }}
{{ .Title }} {{ .Title }}
{{ else }} {{ else }}
@ -140,7 +141,7 @@
</div> </div>
</div> </div>
</div> </div>
{{ range first 2 (where .Site.RegularPages "Type" "post")}} {{ range first (int $data.homepage.blog.number) (where .Site.RegularPages "Type" "post")}}
<div class="col-lg-4 col-sm-6 mb-4 mb-lg-0 d-flex align-items-stretch"> <div class="col-lg-4 col-sm-6 mb-4 mb-lg-0 d-flex align-items-stretch">
{{ .Render "card" }} {{ .Render "card" }}
</div> </div>
@ -194,7 +195,7 @@
</div> </div>
</div> </div>
<div class="row justify-content-center"> <div class="row justify-content-center">
{{ range first 6 (where .Site.RegularPages "Type" "ganztagsangebote" | shuffle)}} {{ range first (int $data.homepage.ganztagsangebote.number) (where .Site.RegularPages "Type" "ganztagsangebote" | shuffle)}}
<div class="col-lg-4 col-sm-6"> <div class="col-lg-4 col-sm-6">
{{ .Render "ganztag" }} {{ .Render "ganztag" }}
</div> </div>
@ -258,7 +259,7 @@
{{ end }} {{ end }}
{{ end }} {{ end }}
{{ range first 3 $events }} {{ range first (int $data.homepage.termine.number) $events }}
{{ partial "termin" . }} {{ partial "termin" . }}
{{ end }} {{ end }}

File diff suppressed because it is too large Load Diff

@ -5,25 +5,27 @@ const AbiturientenCollection = {
name: "abiturienten", name: "abiturienten",
label: "Abiturienten", label: "Abiturienten",
label_singular: "Abiturjahrgang", label_singular: "Abiturjahrgang",
description: "Hier kann die Übersicht der Abiturjahrgänge bearbeitet werden. Dieser Bereich wird von der Schulchronik verwaltet.", description:
"Hier kann die Übersicht der Abiturjahrgänge bearbeitet werden. Dieser Bereich wird von der Schulchronik verwaltet.",
icon: "graduation-cap", icon: "graduation-cap",
folder: "content/german/abiturienten", folder: "content/german/abiturienten",
filter: { filter: {
field: "type", field: "type",
value: "abiturienten" value: "abiturienten",
}, },
create: true, create: true,
editor: { editor: {
preview: true, preview: true,
frame: true frame: true,
size: "half",
}, },
summary_fields: ["title", "draft"], summary_fields: ["title", "draft"],
sortable_fields: { sortable_fields: {
fields: ["title"], fields: ["title"],
default: { default: {
field: "title", field: "title",
direction: "Descending" direction: "Descending",
} },
}, },
fields: [ fields: [
Title(false), Title(false),
@ -33,22 +35,22 @@ const AbiturientenCollection = {
label: "Bild", label: "Bild",
widget: "image", widget: "image",
default: "/media/image.webp", default: "/media/image.webp",
required: false required: false,
}, },
{ {
name: "type", name: "type",
label: "Typ", label: "Typ",
widget: "hidden", widget: "hidden",
default: "abiturienten" default: "abiturienten",
}, },
{ {
name: "body", name: "body",
label: "Text", label: "Text",
widget: "markdown", widget: "markdown",
required: false, required: false,
...MarkdownProps ...MarkdownProps,
} },
] ],
}; };
export default AbiturientenCollection; export default AbiturientenCollection;

@ -0,0 +1,100 @@
import { MarkdownProps, PatternEmail } from "../props.js";
import { DescriptionText } from "./widgets.js";
const AuthorCollection = {
name: "author",
label: "Autoren",
label_singular: "Autor",
description:
"Autoren können einem Blogartikel zugewiesen werden. Wir unterscheiden in aktive und inaktive sowie vereinfachte Autoren, welche nur mit dem Namen angezeigt werden, und erweiterte Autoren, für die eine Übersichtsseite angelegt wird.Autoren können einem Blogartikel zugewiesen werden.",
icon: "user",
folder: "content/german/author",
create: true,
editor: {
preview: true,
frame: true,
size: "half",
},
filter: {
field: "type",
value: "author",
},
view_filters: [
{
label: "aktiv",
field: "active",
pattern: true,
},
{
label: "inaktiv",
field: "active",
pattern: false,
},
{
label: "einfach",
field: "simplified",
pattern: true,
},
{
label: "erweitert",
field: "simplified",
pattern: false,
},
],
view_groups: [
{
label: "vereinfacht",
field: "simplified",
},
{
label: "aktiv",
field: "active",
},
],
summary_fields: ["title", "active", "simplified", "body"],
fields: [
{
name: "title",
label: "Name",
widget: "string",
required: true,
},
DescriptionText,
{
name: "email",
label: "E-Mail-Adresse",
widget: "string",
required: false,
...PatternEmail,
},
{
name: "image",
label: "Bild",
widget: "image",
required: false,
default: "/media/authors/gcg.webp",
},
{
name: "simplified",
label: "vereinfacht",
widget: "boolean",
required: false,
},
{
name: "active",
label: "aktiv",
widget: "boolean",
required: false,
default: true,
},
{
name: "body",
label: "Beschreibung",
widget: "markdown",
required: false,
...MarkdownProps,
},
],
};
export default AuthorCollection;

@ -0,0 +1,62 @@
import { MarkdownProps } from "../props.js";
import { DescriptionText, DraftBoolean, Title } from "./widgets.js";
const BegabteCollection = {
name: "begabte",
label: "Begabtenförderung",
label_singular: "Begabtenförderungsangebot",
description:
"Hier kann die Übersicht der Begabtenförderungsangebote bearbeitet werden.",
icon: "pi",
folder: "content/german/begabte",
create: true,
editor: {
preview: true,
frame: true,
size: "half",
},
filter: {
field: "type",
value: "begabte",
},
summary_fields: ["title", "draft", "body"],
fields: [
Title(false),
DraftBoolean,
DescriptionText,
{
name: "image",
label: "Titelbild",
widget: "image",
required: true,
default: "/media/image.webp",
},
{
name: "class",
label: "Klassenstufe(n)",
widget: "string",
required: true,
},
{
name: "web_url",
label: "Website",
widget: "string",
required: false,
},
{
name: "type",
label: "Typ",
widget: "hidden",
default: "begabte",
},
{
name: "body",
label: "Inhalt",
widget: "markdown",
required: true,
...MarkdownProps,
},
],
};
export default BegabteCollection;

@ -0,0 +1,114 @@
import { DateFormat, MarkdownProps } from "../props.js";
import { DescriptionText, DraftBoolean, Title } from "./widgets.js";
const BlogCollection = {
name: "blog",
label: "Aktuelles",
label_singular: "Artikel",
description:
'Diese Artikel werden im Bereich "Aktuelles" auf der Schulhomepage angezeigt. Sie können sowohl direkt veröffentlicht, als auch als Entwurf gespeichert werden.',
icon: "news",
folder: "content/german/blog",
create: true,
editor: {
preview: true,
frame: true,
size: "half",
},
filter: {
field: "type",
value: "post",
},
view_groups: [
{
label: "Entwurf",
field: "draft",
},
],
sortable_fields: {
fields: ["date", "title"],
default: {
field: "date",
direction: "Descending",
},
},
summary_fields: ["date", "title", "draft", "author", "body"],
fields: [
Title(false),
{
name: "date",
label: "Datum",
widget: "datetime",
required: true,
...DateFormat,
},
DraftBoolean,
DescriptionText,
{
name: "image",
label: "Titelbild",
widget: "image",
required: true,
default: "/media/image.webp",
},
{
name: "author",
label: "Autor(en)",
hint: "Verwaltet im Autoren-Bereich. Mehrere Autoren werden in alphabetischer Reihenfolge aufgelistet.",
widget: "relation",
collection: "author",
value_field: "{{slug}}",
search_fields: ["{{title}}"],
display_fields: ["{{title}}"],
multiple: true,
required: true,
},
{
name: "categories",
label: "Kategorien",
hint: "Verwaltet in den Einstellungen",
widget: "relation",
collection: "settings",
file: "data-categories",
value_field: "blog.*",
search_fields: ["blog.*"],
display_fields: ["blog.*"],
multiple: true,
required: true,
},
{
name: "subjects",
label: "Fächer",
hint: "Verwaltet in den Einstellungen",
widget: "relation",
collection: "settings",
file: "data-categories",
value_field: "subjects.*",
search_fields: ["subjects.*"],
display_fields: ["subjects.*"],
multiple: true,
required: true,
},
{
name: "tags",
label: "Tags",
widget: "list",
delimiter: ",",
},
{
name: "type",
label: "Typ",
widget: "hidden",
default: "post",
},
{
name: "body",
label: "Inhalt",
widget: "markdown",
required: true,
...MarkdownProps,
},
],
};
export default BlogCollection;

@ -5,31 +5,33 @@ const CantorforaCollection = {
name: "cantorfora", name: "cantorfora",
label: "Cantorfora", label: "Cantorfora",
label_singular: "Cantorforum", label_singular: "Cantorforum",
description: "Hier kann die Übersicht der Cantorfora bearbeitet werden. Dieser Bereich wird von der Schulchronik verwaltet.", description:
"Hier kann die Übersicht der Cantorfora bearbeitet werden. Dieser Bereich wird von der Schulchronik verwaltet.",
icon: "presentation", icon: "presentation",
folder: "content/german/cantorfora", folder: "content/german/cantorfora",
filter: { filter: {
field: "type", field: "type",
value: "cantorfora" value: "cantorfora",
}, },
create: true, create: true,
editor: { editor: {
preview: true, preview: true,
frame: true frame: true,
size: "half",
}, },
view_groups: [ view_groups: [
{ {
label: "Entwürfe", label: "Entwürfe",
field: "draft" field: "draft",
} },
], ],
summary_fields: ["title", "draft", "description"], summary_fields: ["title", "draft", "description"],
sortable_fields: { sortable_fields: {
fields: ['index', 'title'], fields: ["index", "title"],
default: { default: {
field: "index", field: "index",
direction: "Descending" direction: "Descending",
} },
}, },
fields: [ fields: [
Title(false), Title(false),
@ -41,7 +43,7 @@ const CantorforaCollection = {
value_type: "int", value_type: "int",
min: 1, min: 1,
step: 1, step: 1,
required: true required: true,
}, },
DraftBoolean, DraftBoolean,
DescriptionText, DescriptionText,
@ -50,22 +52,22 @@ const CantorforaCollection = {
label: "Titelbild", label: "Titelbild",
widget: "image", widget: "image",
default: "/media/image.webp", default: "/media/image.webp",
required: true required: true,
}, },
{ {
name: "type", name: "type",
label: "Typ", label: "Typ",
widget: "hidden", widget: "hidden",
default: "cantorfora" default: "cantorfora",
}, },
{ {
name: "body", name: "body",
label: "Text", label: "Text",
widget: "markdown", widget: "markdown",
required: true, required: true,
...MarkdownProps ...MarkdownProps,
} },
] ],
}; };
export default CantorforaCollection; export default CantorforaCollection;

@ -4,25 +4,27 @@ import { DescriptionText, DraftBoolean } from "./widgets.js";
const CantorpreisCollection = { const CantorpreisCollection = {
name: "cantorpreis", name: "cantorpreis",
label: "Cantorpreisträger", label: "Cantorpreisträger",
description: "Hier sind alle Cantorpreisträger aufgelistet. Dieser Bereich wird von der Schulchronik verwaltet.", description:
"Hier sind alle Cantorpreisträger aufgelistet. Dieser Bereich wird von der Schulchronik verwaltet.",
icon: "award", icon: "award",
folder: "content/german/cantorpreis", folder: "content/german/cantorpreis",
filter: { filter: {
field: "type", field: "type",
value: "cantorpreis" value: "cantorpreis",
}, },
sortable_fields: { sortable_fields: {
fields: ['title', 'name'], fields: ["title", "name"],
default: { default: {
field: "title", field: "title",
direction: "Descending" direction: "Descending",
} },
}, },
summary: "{{title}} - {{name}}", summary: "{{title}} - {{name}}",
create: true, create: true,
editor: { editor: {
preview: true, preview: true,
frame: true frame: true,
size: "half",
}, },
summary_fields: ["title", "name", "draft", "body"], summary_fields: ["title", "name", "draft", "body"],
fields: [ fields: [
@ -30,13 +32,13 @@ const CantorpreisCollection = {
name: "title", name: "title",
label: "Jahr", label: "Jahr",
widget: "string", widget: "string",
required: true required: true,
}, },
{ {
name: "name", name: "name",
label: "Name", label: "Name",
widget: "string", widget: "string",
required: true required: true,
}, },
DraftBoolean, DraftBoolean,
DescriptionText, DescriptionText,
@ -45,22 +47,22 @@ const CantorpreisCollection = {
label: "Bild", label: "Bild",
widget: "image", widget: "image",
default: "/media/image.webp", default: "/media/image.webp",
required: false required: false,
}, },
{ {
name: "type", name: "type",
label: "Typ", label: "Typ",
widget: "hidden", widget: "hidden",
default: "cantorpreis" default: "cantorpreis",
}, },
{ {
name: "body", name: "body",
label: "Text", label: "Text",
widget: "markdown", widget: "markdown",
required: false, required: false,
...MarkdownProps ...MarkdownProps,
} },
] ],
}; };
export default CantorpreisCollection; export default CantorpreisCollection;

@ -3,39 +3,41 @@ import { DraftBoolean, EnableBoolean } from "./widgets.js";
const ChronikjahreCollection = { const ChronikjahreCollection = {
name: "chronikjahre", name: "chronikjahre",
description: "Hier können die Chronikjahre bearbeitet werden. Dieser Bereich wird von der Schulchronik verwaltet.", description:
"Hier können die Chronikjahre bearbeitet werden. Dieser Bereich wird von der Schulchronik verwaltet.",
icon: "schulchronik", icon: "schulchronik",
label: "Chronikjahre", label: "Chronikjahre",
label_singular: "Chronikjahr", label_singular: "Chronikjahr",
folder: "content/german/schulchronik", folder: "content/german/schulchronik",
filter: { filter: {
field: "type", field: "type",
value: "schulchronik" value: "schulchronik",
}, },
create: true, create: true,
editor: { editor: {
preview: false preview: false,
size: "half",
}, },
summary_fields: ["title", "draft", "cantorpreisträger", "topics"], summary_fields: ["title", "draft", "cantorpreisträger", "topics"],
sortable_fields: { sortable_fields: {
fields: ['title'], fields: ["title"],
default: { default: {
field: "title", field: "title",
direction: "Descending" direction: "Descending",
} },
}, },
fields: [ fields: [
{ {
name: "title", name: "title",
label: "Jahr", label: "Jahr",
widget: "string" widget: "string",
}, },
DraftBoolean, DraftBoolean,
{ {
name: "type", name: "type",
label: "Typ", label: "Typ",
widget: "hidden", widget: "hidden",
default: "schulchronik" default: "schulchronik",
}, },
{ {
name: "pretext", name: "pretext",
@ -43,7 +45,7 @@ const ChronikjahreCollection = {
hint: "Text für die Jahreszahl", hint: "Text für die Jahreszahl",
widget: "markdown", widget: "markdown",
required: false, required: false,
...MarkdownProps ...MarkdownProps,
}, },
{ {
name: "topics", name: "topics",
@ -64,7 +66,7 @@ const ChronikjahreCollection = {
label: "Inhalt", label: "Inhalt",
widget: "markdown", widget: "markdown",
required: false, required: false,
...MarkdownProps ...MarkdownProps,
}, },
{ {
name: "superhaufen", name: "superhaufen",
@ -81,11 +83,11 @@ const ChronikjahreCollection = {
search_fields: ["title"], search_fields: ["title"],
value_field: "title", value_field: "title",
required: false, required: false,
collapsed: true collapsed: true,
} },
] ],
} },
] ],
}, },
{ {
name: "cantorpreisträger", name: "cantorpreisträger",
@ -94,7 +96,7 @@ const ChronikjahreCollection = {
collection: "cantorpreis", collection: "cantorpreis",
search_fields: ["jahr", "name"], search_fields: ["jahr", "name"],
value_field: "name", value_field: "name",
required: false required: false,
}, },
{ {
name: "body", name: "body",
@ -102,10 +104,9 @@ const ChronikjahreCollection = {
hint: "Erscheint zusätzlich zu den Kreativen Haufen", hint: "Erscheint zusätzlich zu den Kreativen Haufen",
widget: "markdown", widget: "markdown",
required: false, required: false,
...MarkdownProps ...MarkdownProps,
} },
],
] };
}
export default ChronikjahreCollection; export default ChronikjahreCollection;

@ -5,17 +5,19 @@ const ChronikseitenCollection = {
name: "chronikseiten", name: "chronikseiten",
label: "Chronikseiten", label: "Chronikseiten",
label_singular: "Zusatzseite (Chronik)", label_singular: "Zusatzseite (Chronik)",
description: "Chronikseiten entsprechen von der Funktionalität herkömmlichen Zusatzseiten, sind allerdings der Schulchronik vorbehalten.", description:
"Chronikseiten entsprechen von der Funktionalität herkömmlichen Zusatzseiten, sind allerdings der Schulchronik vorbehalten.",
icon: "page-add", icon: "page-add",
folder: "content/german/chronikseiten", folder: "content/german/chronikseiten",
create: true, create: true,
editor: { editor: {
preview: true, preview: true,
frame: true frame: true,
size: "half",
}, },
filter: { filter: {
field: "type", field: "type",
value: "pages" value: "pages",
}, },
summary_fields: ["title", "draft", "aliases", "body"], summary_fields: ["title", "draft", "aliases", "body"],
fields: [ fields: [
@ -26,7 +28,7 @@ const ChronikseitenCollection = {
name: "type", name: "type",
label: "Typ", label: "Typ",
widget: "hidden", widget: "hidden",
default: "pages" default: "pages",
}, },
{ {
name: "aliases", name: "aliases",
@ -39,18 +41,18 @@ const ChronikseitenCollection = {
{ {
name: "alias", name: "alias",
label: "Alias", label: "Alias",
widget: "string" widget: "string",
} },
] ],
}, },
{ {
name: "body", name: "body",
label: "Text", label: "Inhalt",
widget: "markdown", widget: "markdown",
required: false, required: false,
...MarkdownProps ...MarkdownProps,
} },
] ],
} };
export default ChronikseitenCollection; export default ChronikseitenCollection;

@ -0,0 +1,65 @@
import { MarkdownProps } from "../props.js";
import { DescriptionText, DraftBoolean, Title } from "./widgets.js";
const FormsCollection = {
name: "forms",
label: "Dokumente",
label_singular: "Dokument",
description:
"Hier sind Formulare, Vorlagen und andere Dokumente zu hinterlegen.",
icon: "document",
folder: "content/german/forms",
create: true,
editor: {
preview: true,
frame: true,
size: "half",
},
filter: {
field: "type",
value: "forms",
},
summary_fields: ["title", "draft"],
fields: [
Title(false),
DraftBoolean,
DescriptionText,
{
name: "files",
label: "Dateien",
label_singular: "Datei",
widget: "list",
required: false,
collapsed: true,
fields: [
{
name: "title",
label: "Bezeichnung",
widget: "string",
required: true,
},
{
name: "link",
label: "Datei",
widget: "file",
required: true,
},
],
},
{
name: "type",
label: "Typ",
widget: "hidden",
default: "forms",
},
{
name: "body",
label: "Inhalt",
widget: "markdown",
required: false,
...MarkdownProps,
},
],
};
export default FormsCollection;

@ -0,0 +1,92 @@
import { MarkdownProps } from "../props.js";
import { Title, DescriptionText, DraftBoolean } from "./widgets.js";
const GanztagCollection = {
name: "ganztagsangebote",
label: "Ganztag",
label_singular: "Arbeitsgemeinschaft",
description:
"Hier kann die Übersicht der Ganztagsangebote bearbeitet werden.",
icon: "group",
folder: "content/german/ganztagsangebote",
create: true,
editor: {
preview: true,
frame: true,
size: "half",
},
filter: {
field: "type",
value: "ganztagsangebote",
},
summary_fields: ["title", "draft", "category", "schedule", "room"],
fields: [
Title(false),
DraftBoolean,
DescriptionText,
{
name: "image",
label: "Titelbild",
widget: "image",
default: "/media/ganztagsangebote/image.webp",
required: true,
},
{
name: "category",
label: "Themebereich",
hint: "Verwaltet in den Einstellungen",
widget: "relation",
collection: "settings",
file: "data-categories",
value_field: "ganztag.*",
search_fields: ["ganztag.*"],
display_fields: ["ganztag.*"],
required: true,
},
{
name: "duration",
label: "Dauer",
widget: "string",
required: true,
},
{
name: "schedule",
label: "Tag/Stunden",
widget: "string",
required: true,
},
{
name: "class",
label: "Klassenstufen(n)",
widget: "string",
required: true,
},
{
name: "room",
label: "Raum",
widget: "string",
required: true,
},
{
name: "apply_url",
label: "Anmeldelink",
widget: "hidden",
default: "https://moodle.bildung-lsa.de/gcg/mod/choice/view.php?id=828",
},
{
name: "type",
label: "Typ",
widget: "hidden",
default: "ganztagsangebote",
},
{
name: "body",
label: "Inhalt",
widget: "markdown",
required: false,
...MarkdownProps,
},
],
};
export default GanztagCollection;

@ -0,0 +1,347 @@
import {
DataObject,
DateFormat,
MarkdownProps,
PatternEmail,
} from "../props.js";
import { DescriptionText, EnableBoolean, Title } from "./widgets.js";
const IndexPagesCollection = {
name: "index-pages",
label: "Hauptseiten",
label_singular: "Hauptseite",
description:
"Hauptseiten können nur manuell durch den Administrator angelegt und in die Website eingebunden werden. Über diesen Bereich ist die Änderung der Inhalte möglich.",
icon: "page",
editor: {
preview: true,
frame: true,
size: "half",
},
summary_fields: ["title", "description"],
files: [
{
name: "blog-index",
label: "Aktuelles",
file: "content/german/blog/_index.md",
fields: [Title(false), DescriptionText],
},
{
name: "about-index",
label: "Über die Schule",
file: "content/german/about/_index.md",
fields: [
Title(false),
DescriptionText,
{
name: "image",
label: "Bild",
widget: "image",
required: false,
},
{
name: "stats",
label: "Statistik",
...DataObject,
fields: [
EnableBoolean,
{
name: "zahlen",
label: "Elemente",
label_singular: "Element",
widget: "list",
required: false,
collapsed: false,
fields: [
{
name: "name",
label: "Bezeichnung",
widget: "string",
required: true,
},
{
name: "count",
label: "Zahl",
widget: "number",
value_type: "int",
min: 0,
step: 1,
required: true,
},
],
},
],
},
{
name: "body",
label: "Inhalt",
widget: "markdown",
required: false,
...MarkdownProps,
},
],
},
{
name: "anmeldung-index",
label: "Aufnahmeverfahren",
file: "content/german/anmeldung/_index.md",
fields: [
Title(false),
DescriptionText,
{
name: "body",
label: "Inhalt",
widget: "markdown",
required: false,
...MarkdownProps,
},
{
name: "elements",
label: "Abschnitte",
label_singular: "Abschnitt",
widget: "list",
required: false,
collapsed: true,
fields: [
Title(false),
{
name: "content",
label: "Inhalt",
widget: "markdown",
required: true,
...MarkdownProps,
},
],
},
],
},
{
name: "author-index",
label: "Autoren",
file: "content/german/author/_index.md",
fields: [Title(false), DescriptionText],
},
{
name: "anmeldeformular",
label: "Anmeldeformular",
file: "content/german/anmeldeformular/_index.md",
fields: [
Title(false),
DescriptionText,
{
name: "body",
label: "Inhalt",
widget: "markdown",
required: false,
...MarkdownProps,
},
],
},
{
name: "cantorpreis-index",
label: "Cantorpreis",
file: "content/german/cantorpreis/_index.md",
fields: [Title(false), DescriptionText],
},
{
name: "kontakt",
label: "Kontakt",
file: "content/german/kontakt/_index.md",
fields: [
Title(false),
DescriptionText,
{
name: "kontaktdaten",
label: "Kontaktdaten",
widget: "list",
required: true,
collapsed: true,
fields: [
{
name: "name",
label: "Name",
widget: "string",
required: true,
},
{
name: "position",
label: "Berufsbezeichnung",
widget: "string",
required: true,
},
{
name: "email",
label: "E-Mail-Adresse",
widget: "string",
required: true,
...PatternEmail,
},
],
},
],
},
{
name: "termine",
label: "Termine",
file: "content/german/termine/_index.md",
fields: [
Title(false),
DescriptionText,
{
name: "events",
label: "Termine",
label_singular: "Termin",
widget: "list",
required: true,
collapsed: true,
fields: [
{
name: "title",
label: "Bezeichnung",
widget: "string",
required: true,
},
{
name: "date",
label: "Datum/Startdatum",
widget: "datetime",
required: true,
...DateFormat,
},
{
name: "enddate",
label: "Enddatum",
hint: "Für mehrtägige Veanstaltungen, nur sichtbar wenn eingestellt",
widget: "datetime",
required: false,
...DateFormat,
},
{
name: "location",
label: "Ort",
widget: "string",
required: false,
},
],
},
],
},
{
name: "forms-index",
label: "Dokumente und Formulare",
file: "content/german/forms/_index.md",
fields: [Title(false), DescriptionText],
},
{
name: "ganztagsangebote-index",
label: "Unser Ganztagsbereich",
file: "content/german/ganztagsangebote/_index.md",
fields: [Title(false), DescriptionText],
},
{
name: "projektwoche-index",
label: "Projektwoche",
file: "content/german/projektwoche/_index.md",
fields: [Title(false), DescriptionText],
},
{
name: "wettbewerbe-index",
label: "Wettbewerbe",
file: "content/german/wettbewerbe/_index.md",
fields: [Title(false), DescriptionText],
},
{
name: "begabte-index",
label: "Begabtenförderung",
file: "content/german/begabte/_index.md",
fields: [Title(false), DescriptionText],
},
{
name: "abiturienten-index",
label: "Abiturienten",
file: "content/german/abiturienten/_index.md",
fields: [Title(false), DescriptionText],
},
{
name: "cantorfora-index",
label: "Cantorfora",
file: "content/german/cantorfora/_index.md",
fields: [
Title(false),
DescriptionText,
{
name: "body",
label: "Inhalt",
widget: "markdown",
required: false,
...MarkdownProps,
},
],
},
{
name: "schulchronik-index",
label: "Schulchronik",
file: "content/german/schulchronik/_index.md",
fields: [
Title(false),
DescriptionText,
{
name: "body",
label: "Inhalt",
widget: "markdown",
required: false,
...MarkdownProps,
},
{
name: "infocard",
label: "Zitatkarte",
...DataObject,
fields: [
EnableBoolean,
{
name: "image",
label: "Bild",
widget: "image",
required: false,
},
{
name: "quote",
label: "Zitat",
widget: "text",
required: false,
},
{
name: "author",
label: "Autor",
widget: "string",
required: false,
},
],
},
{
name: "links",
label: "Informationsseiten",
widget: "list",
required: false,
collapsed: true,
fields: [
{
name: "title",
label: "Bezeichnung",
widget: "string",
required: true,
},
{
name: "link",
label: "Link",
widget: "string",
required: true,
},
],
},
],
},
],
};
export default IndexPagesCollection;

@ -1,9 +1,37 @@
import SettingsCollection from "./settings-collection.js"; import SettingsCollection from "./settings-collection.js";
import IndexPagesCollection from "./index-pages.js";
import PagesCollection from "./pages.js";
import AuthorCollection from "./author.js";
import BlogCollection from "./blog.js";
import FormsCollection from "./forms.js";
import GanztagCollection from "./ganztag.js";
import WettbewerbeCollection from "./wettbewerbe.js";
import BegabteCollection from "./begabte.js";
import ProjektwocheCollection from "./projektwoche.js";
import ChronikjahreCollection from "./chronikjahre.js"; import ChronikjahreCollection from "./chronikjahre.js";
import SuperhaufenCollection from "./superhaufen.js"; import SuperhaufenCollection from "./superhaufen.js";
import CantorpreisCollection from "./cantorpreis.js"; import CantorpreisCollection from "./cantorpreis.js";
import AbiturientenCollection from "./abiturienten.js"; import AbiturientenCollection from "./abiturienten.js";
import CantorforaCollection from "./cantorfora.js"; import CantorforaCollection from "./cantorfora.js";
import ChronikseitenCollection from "./chronikseiten.js"; import ChronikseitenCollection from "./chronikseiten.js";
import StatsCollection from "./stats.js";
export { SettingsCollection, ChronikjahreCollection, SuperhaufenCollection, CantorpreisCollection, AbiturientenCollection, CantorforaCollection, ChronikseitenCollection }; export {
SettingsCollection,
IndexPagesCollection,
PagesCollection,
AuthorCollection,
BlogCollection,
FormsCollection,
GanztagCollection,
WettbewerbeCollection,
BegabteCollection,
ProjektwocheCollection,
ChronikjahreCollection,
SuperhaufenCollection,
CantorpreisCollection,
AbiturientenCollection,
CantorforaCollection,
ChronikseitenCollection,
StatsCollection,
};

@ -0,0 +1,58 @@
import { MarkdownProps } from "../props.js";
import { DescriptionText, DraftBoolean, Title } from "./widgets.js";
const PagesCollection = {
name: "pages",
label: "Zusatzseiten",
label_singular: "Zusatzseite",
description:
"Zusatzseiten können direkt aus der grafischen Oberfläche heraus erstellt werden und sind unter https://cantorgymnasium.de/pages/[SEITENTITEL] einsehbar. Sie bestehen immer aus einem Titel, einer Metabeschreibung (kurzer Einstiegstext) und dem eigentlichen Inhalt. Einer Zusatzseite kann auch ein Alias, also eine alternative URL zugewiesen werden.",
icon: "page-add",
folder: "content/german/pages",
create: true,
editor: {
preview: true,
frame: true,
size: "half",
},
filter: {
field: "type",
value: "pages",
},
summary_fields: ["title", "draft", "aliases", "description"],
fields: [
Title(false),
DraftBoolean,
DescriptionText,
{
name: "type",
label: "Typ",
widget: "hidden",
default: "pages",
},
{
name: "aliases",
label: "Aliase",
label_singular: "Alias",
widget: "list",
collapsed: true,
required: false,
fields: [
{
name: "alias",
label: "Alias",
widget: "string",
},
],
},
{
name: "body",
label: "Inhalt",
widget: "markdown",
required: false,
...MarkdownProps,
},
],
};
export default PagesCollection;

@ -0,0 +1,73 @@
import { MarkdownProps } from "../props.js";
import { DescriptionText, DraftBoolean, IconList, Title } from "./widgets.js";
const ProjektwocheCollection = {
name: "projektwoche",
label: "Projektwochen",
label_singular: "Projektwoche",
description: "Hier kann die Übersicht der Projektwochen bearbeitet werden.",
icon: "projektwoche",
folder: "content/german/projektwoche",
filter: {
field: "type",
value: "projektwoche",
},
create: true,
editor: {
preview: true,
frame: true,
size: "half",
},
summary_fields: ["title", "draft", "tiles", "description"],
fields: [
Title(false),
DraftBoolean,
DescriptionText,
{
name: "type",
label: "Typ",
widget: "hidden",
default: "projektwoche",
},
{
name: "body",
label: "Inhalt",
widget: "markdown",
required: false,
...MarkdownProps,
},
{
name: "tiles",
label: "Kacheln",
hint: "Die Vorschau zeigt nur die generierten Symbolkarten, NICHT die Inhalte.",
widget: "list",
required: false,
collapsed: true,
fields: [
Title(false),
{
name: "bg_color",
label: "Hintergrundfarbe",
widget: "color",
required: true,
},
IconList,
{
name: "font_color",
label: "Symbolfarbe",
widget: "color",
required: true,
},
{
name: "content",
label: "Inhalt",
widget: "markdown",
required: true,
...MarkdownProps,
},
],
},
],
};
export default ProjektwocheCollection;

File diff suppressed because it is too large Load Diff

@ -1,78 +0,0 @@
const StatistikCollection = {
name: "statistik",
label: "Statistik",
description: "Hier können statistische Daten bearbeitet werden. Dieser Bereich wird von der Schulchronik verwaltet.",
icon: "stats",
editor: {
preview: false
},
files: [
{
name: "abiturdurchschnitte",
label: "Abiturdurchschnitte",
file: "static/data/abiturdurchschnitte.json",
fields: [
{
name: "abiturdurchschnitte",
label: "Abiturdurchschnitte",
label_singular: "Abiturdurchschnitt",
widget: "list",
required: false,
fields: [
{
name: "jahr",
label: "Jahr",
widget: "number",
value_type: "int",
step: 1,
required: true
},
{
name: "schnitt",
label: "Schnitt",
widget: "number",
value_type: "float",
step: 0.01,
required: true
}
]
},
{
name: "schuelerzahlen",
label: "Schülerzahlen",
file: "static/data/schuelerzahlen.json",
fields: [
{
name: "schuelerzahlen",
label: "Schülerzahlen",
widget: "list",
required: false,
fields: [
{
name: "year",
label: "Jahr",
widget: "number",
required: true
},
{
name: "all",
label: "Gesamt",
widget: "number",
required: true
},
{
name: "girls",
label: "davon Mädchen",
widget: "number",
required: true
}
]
}
]
}
]
}
]
}
export default StatistikCollection;

@ -0,0 +1,83 @@
const StatsCollection = {
name: "statistik",
label: "Statistik",
description:
"Hier können statistische Daten bearbeitet werden. Dieser Bereich wird von der Schulchronik verwaltet.",
icon: "stats",
editor: {
preview: false,
size: "half",
},
files: [
{
name: "abiturdurchschnitte",
label: "Abiturdurchschnitte",
file: "static/data/abiturdurchschnitte.json",
fields: [
{
name: "abiturdurchschnitte",
label: "Abiturdurchschnitte",
label_singular: "Jahr",
widget: "list",
required: false,
fields: [
{
name: "jahr",
label: "Jahr",
widget: "number",
value_type: "int",
required: true,
},
{
name: "schnitt",
label: "Schnitt",
widget: "number",
value_type: "float",
step: 0.01,
required: true,
},
],
},
],
},
{
name: "schuelerzahlen",
label: "Schülerzahlen",
file: "static/data/schuelerzahlen.json",
fields: [
{
name: "schuelerzahlen",
label: "Schülerzahlen",
label_singular: "Jahr",
widget: "list",
required: false,
fields: [
{
name: "year",
label: "Jahr",
widget: "number",
value_type: "int",
required: true,
},
{
name: "all",
label: "Gesamtzahl",
widget: "number",
value_type: "int",
required: true,
},
{
name: "girls",
label: "davon Mädchen",
widget: "number",
value_type: "int",
required: true,
},
],
},
],
},
],
};
export default StatsCollection;

@ -4,17 +4,19 @@ import { DraftBoolean, EnableBoolean, Title } from "./widgets.js";
const SuperhaufenCollection = { const SuperhaufenCollection = {
name: "superhaufen", name: "superhaufen",
label: "Superhaufen", label: "Superhaufen",
description: "\"Superhaufen\" sind ein besonderer Bereich der Schulchronik, um besonders ausführliche Ereignisse darzustellen. Dieser Bereich wird von der Schulchronik verwaltet.", description:
'"Superhaufen" sind ein besonderer Bereich der Schulchronik, um besonders ausführliche Ereignisse darzustellen. Dieser Bereich wird von der Schulchronik verwaltet.',
icon: "superhaufen", icon: "superhaufen",
folder: "content/german/superhaufen", folder: "content/german/superhaufen",
filter: { filter: {
field: "type", field: "type",
value: "superhaufen" value: "superhaufen",
}, },
create: true, create: true,
editor: { editor: {
preview: true, preview: true,
frame: true, frame: true,
size: "half",
}, },
summary_fields: ["title", "draft", "tiles"], summary_fields: ["title", "draft", "tiles"],
fields: [ fields: [
@ -24,7 +26,7 @@ const SuperhaufenCollection = {
name: "type", name: "type",
label: "Typ", label: "Typ",
widget: "hidden", widget: "hidden",
default: "superhaufen" default: "superhaufen",
}, },
{ {
name: "previous", name: "previous",
@ -38,9 +40,9 @@ const SuperhaufenCollection = {
name: "link", name: "link",
label: "Link", label: "Link",
widget: "string", widget: "string",
required: true required: true,
} },
] ],
}, },
{ {
name: "tiles", name: "tiles",
@ -74,7 +76,7 @@ const SuperhaufenCollection = {
label: "Inhalt", label: "Inhalt",
widget: "markdown", widget: "markdown",
required: true, required: true,
...MarkdownProps ...MarkdownProps,
}, },
{ {
name: "unterhaufen", name: "unterhaufen",
@ -89,13 +91,13 @@ const SuperhaufenCollection = {
label: "Inhalt", label: "Inhalt",
widget: "markdown", widget: "markdown",
required: true, required: true,
...MarkdownProps ...MarkdownProps,
} },
] ],
} },
] ],
} },
] ],
} };
export default SuperhaufenCollection; export default SuperhaufenCollection;

@ -0,0 +1,73 @@
import { MarkdownProps } from "../props.js";
import { DescriptionText, DraftBoolean, Title } from "./widgets.js";
const WettbewerbeCollection = {
name: "wettbewerbe",
label: "Wettbewerbe",
label_singular: "Wettbewerb",
description: "Hier kann die Übersicht der Wettbewerbe bearbeitet werden.",
icon: "trophy",
folder: "content/german/wettbewerbe",
create: true,
editor: {
preview: true,
frame: true,
size: "half",
},
filter: {
field: "type",
value: "wettbewerbe",
},
summary_fields: ["title", "draft", "category"],
fields: [
Title(false),
DraftBoolean,
DescriptionText,
{
name: "image",
label: "Titelbild",
widget: "image",
required: true,
default: "/media/image.webp",
},
{
name: "category",
label: "Fach",
hint: "Verwaltet in den Einstellungen",
widget: "relation",
collection: "settings",
file: "data-categories",
value_field: "contests.*",
search_fields: ["contests.*"],
display_fields: ["contests.*"],
required: true,
},
{
name: "class",
label: "Klassenstufe(n)",
widget: "string",
required: true,
},
{
name: "web_url",
label: "Website",
widget: "string",
required: false,
},
{
name: "type",
label: "Typ",
widget: "hidden",
default: "wettbewerbe",
},
{
name: "body",
label: "Inhalt",
widget: "markdown",
required: true,
...MarkdownProps,
},
],
};
export default WettbewerbeCollection;

@ -1,8 +1,17 @@
import { DataObject } from "../props.js";
const EnableBoolean = { const EnableBoolean = {
name: "enable", name: "enable",
label: "Aktivieren", label: "Aktivieren",
widget: "boolean", widget: "boolean",
required: false required: false,
};
const DisableBoolean = {
name: "disable",
label: "Deaktivieren",
widget: "boolean",
required: false,
}; };
const DraftBoolean = { const DraftBoolean = {
@ -10,21 +19,70 @@ const DraftBoolean = {
label: "Entwurf", label: "Entwurf",
widget: "boolean", widget: "boolean",
default: false, default: false,
required: false required: false,
} };
const Title = (optional = false) => ({ const Title = (optional = false) => ({
name: "title", name: "title",
label: "Titel", label: "Titel",
widget: "string", widget: "string",
required: !optional required: !optional,
}); });
const DescriptionText = { const DescriptionText = {
name: "description", name: "description",
label: "Beschreibung", label: "Beschreibung",
widget: "text", widget: "text",
required: false required: false,
}; };
export { EnableBoolean, DraftBoolean, Title, DescriptionText }; const IconList = {
name: "icon",
label: "Symbol",
widget: "string",
required: false,
hint: "Liste unter https://assets.cantorgymnasium.de/fonts/mdi/v7/preview.html",
};
const PreviewNumber = {
name: "number",
label: "Anzahl",
hint: "Anzahl der Elemente, die auf der Startseite angezeigt werden sollen.",
widget: "number",
value_type: "int",
min: 0,
step: 1,
required: true,
};
const ButtonObject = {
name: "button",
label: "Button",
...DataObject,
fields: [
EnableBoolean,
{
name: "label",
label: "Aufschrift",
widget: "string",
required: false,
},
{
name: "link",
label: "Link",
widget: "string",
required: false,
},
],
};
export {
EnableBoolean,
DisableBoolean,
DraftBoolean,
Title,
DescriptionText,
IconList,
PreviewNumber,
ButtonObject,
};

@ -1,4 +1,22 @@
import { SettingsCollection } from "./collections/index.js"; import {
AbiturientenCollection,
AuthorCollection,
BegabteCollection,
BlogCollection,
CantorforaCollection,
CantorpreisCollection,
ChronikjahreCollection,
ChronikseitenCollection,
FormsCollection,
GanztagCollection,
IndexPagesCollection,
PagesCollection,
ProjektwocheCollection,
SettingsCollection,
StatsCollection,
SuperhaufenCollection,
WettbewerbeCollection,
} from "./collections/index.js";
const config = { const config = {
backend: { backend: {
@ -12,26 +30,42 @@ const config = {
update: "{{collection}} {{slug}} aktualisiert", update: "{{collection}} {{slug}} aktualisiert",
delete: "{{collection}} {{slug}} gelöscht", delete: "{{collection}} {{slug}} gelöscht",
updateMedia: "{{path}} hochgeladen", updateMedia: "{{path}} hochgeladen",
deleteMedia: "{{path}} gelöscht" deleteMedia: "{{path}} gelöscht",
} },
}, },
local_backend: true, local_backend: true,
media_folder: "/static/media", media_folder: "/static/media",
public_folder: "/media", public_folder: "/media",
media_library: { media_library: {
max_file_size: 10240000, max_file_size: 10240000,
folder_support: true folder_support: true,
}, },
site_url: "https://cantorgymnasium.de", site_url: "https://cantorgymnasium.de",
locale: "de", locale: "de",
slug: { slug: {
encoding: "ascii", encoding: "ascii",
clean_accents: true, clean_accents: true,
sanitize_replacement: "-" sanitize_replacement: "-",
}, },
collections: [ collections: [
SettingsCollection SettingsCollection,
] IndexPagesCollection,
PagesCollection,
AuthorCollection,
BlogCollection,
FormsCollection,
GanztagCollection,
WettbewerbeCollection,
BegabteCollection,
ProjektwocheCollection,
ChronikjahreCollection,
SuperhaufenCollection,
CantorpreisCollection,
AbiturientenCollection,
CantorforaCollection,
ChronikseitenCollection,
StatsCollection,
],
}; };
export default config; export default config;

@ -1,56 +1,77 @@
const MarkdownProps = { const MarkdownProps = {
toolbar_buttons: { toolbar_buttons: {
main: [ main: [
'bold', "bold",
'italic', "italic",
'strikethrough', "strikethrough",
'code', "code",
'font', "font",
'unordered-list', "unordered-list",
'ordered-list', "ordered-list",
'decrease-indent', "decrease-indent",
'increase-indent', "increase-indent",
'insert-table', "insert-table",
'blockquote', "blockquote",
'file-link', "file-link",
'code-block', "code-block",
'shortcode', "shortcode",
], ],
empty: [], empty: [],
selection: ['bold', 'italic', 'strikethrough', 'code', 'font', 'file-link', 'blockquote'], selection: [
"bold",
"italic",
"strikethrough",
"code",
"font",
"file-link",
"blockquote",
],
table_empty: [ table_empty: [
'bold', "bold",
'italic', "italic",
'strikethrough', "strikethrough",
'code', "code",
'insert-row', "insert-row",
'delete-row', "delete-row",
'insert-column', "insert-column",
'delete-column', "delete-column",
'delete-table', "delete-table",
'file-link', "file-link",
'shortcode', "shortcode",
], ],
table_selection: [ table_selection: [
'bold', "bold",
'italic', "italic",
'strikethrough', "strikethrough",
'code', "code",
'insert-row', "insert-row",
'delete-row', "delete-row",
'insert-column', "insert-column",
'delete-column', "delete-column",
'delete-table', "delete-table",
'file-link', "file-link",
'shortcode', "shortcode",
] ],
} },
}; };
const DateFormat = { const DateFormat = {
date_format: "dd.MM.yyyy", date_format: "dd.MM.yyyy",
time_format: false, time_format: false,
format: "yyyy-MM-dd'T'HH:mm:ss.SSSXXX" format: "yyyy-MM-dd'T'HH:mm:ss.SSSXXX",
}; };
export { MarkdownProps, DateFormat }; const DataObject = {
widget: "object",
collapsed: true,
summary: "{{fields.enable | ternary('aktiv', 'inaktiv')}}",
};
const PatternEmail = {
pattern: [
"^\\w+([-+.']\\w+)*@\\w+([-.]\\w+)*\\.\\w+([-.]\\w+)*$",
"name@domain.tld",
],
};
export { MarkdownProps, DateFormat, DataObject, PatternEmail };

@ -1,5 +1,12 @@
import { AbiturientenCollection, CantorforaCollection, CantorpreisCollection, ChronikjahreCollection, ChronikseitenCollection, SuperhaufenCollection } from "./collections/index.js"; import {
AbiturientenCollection,
CantorforaCollection,
CantorpreisCollection,
ChronikjahreCollection,
ChronikseitenCollection,
StatsCollection,
SuperhaufenCollection,
} from "./collections/index.js";
const config = { const config = {
backend: { backend: {
@ -13,22 +20,22 @@ const config = {
update: "{{collection}} {{slug}} aktualisiert", update: "{{collection}} {{slug}} aktualisiert",
delete: "{{collection}} {{slug}} gelöscht", delete: "{{collection}} {{slug}} gelöscht",
updateMedia: "{{path}} hochgeladen", updateMedia: "{{path}} hochgeladen",
deleteMedia: "{{path}} gelöscht" deleteMedia: "{{path}} gelöscht",
} },
}, },
local_backend: true, local_backend: true,
media_folder: "/static/media", media_folder: "/static/media",
public_folder: "/media", public_folder: "/media",
media_library: { media_library: {
max_file_size: 10240000, max_file_size: 10240000,
folder_support: true folder_support: true,
}, },
site_url: "https://cantorgymnasium.de/schulchronik/", site_url: "https://cantorgymnasium.de/schulchronik/",
locale: "de", locale: "de",
slug: { slug: {
encoding: "ascii", encoding: "ascii",
clean_accents: true, clean_accents: true,
sanitize_replacement: "-" sanitize_replacement: "-",
}, },
collections: [ collections: [
ChronikjahreCollection, ChronikjahreCollection,
@ -36,8 +43,9 @@ const config = {
CantorpreisCollection, CantorpreisCollection,
AbiturientenCollection, AbiturientenCollection,
CantorforaCollection, CantorforaCollection,
ChronikseitenCollection ChronikseitenCollection,
] StatsCollection,
],
}; };
export default config; export default config;

@ -17,11 +17,11 @@ const IconNames = {
projektwoche: "mdi mdi-calendar-range-outline", projektwoche: "mdi mdi-calendar-range-outline",
superhaufen: "mdi mdi-view-dashboard", superhaufen: "mdi mdi-view-dashboard",
stats: "mdi mdi-chart-bar", stats: "mdi mdi-chart-bar",
}; };
let Icons = []; let Icons = [];
for (let [name, icon] of Object.entries(IconNames)) { for (let [name, icon] of Object.entries(IconNames)) {
Icons.push({ Icons.push({
name, name,
icon: () => icon: () =>
@ -31,7 +31,6 @@ const IconNames = {
h("i", { className: icon, style: { fontSize: "1.5rem" } }) h("i", { className: icon, style: { fontSize: "1.5rem" } })
), ),
}); });
} }
export default Icons;
export default Icons;

@ -3,8 +3,14 @@
<head> <head>
<meta charset="utf-8" /> <meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" href="https://assets.cantorgymnasium.de/fonts/mdi/v7/css/materialdesignicons.min.css"> <link
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@staticcms/app@^2.0.0/dist/main.css" /> rel="stylesheet"
href="https://assets.cantorgymnasium.de/fonts/mdi/v7/css/materialdesignicons.min.css"
/>
<link
rel="stylesheet"
href="https://cdn.jsdelivr.net/npm/@staticcms/app@^2.0.0/dist/main.css"
/>
<title>Static CMS</title> <title>Static CMS</title>
</head> </head>
<body> <body>
@ -52,15 +58,15 @@
import Icons from "./icons.js"; import Icons from "./icons.js";
// cms initialization // cms initialization
CMS.init(); CMS.init({ config });
// preview templates // preview templates
CMS.registerPreviewTemplate("about-index", AboutPreview); CMS.registerPreviewTemplate("about-index", AboutPreview);
CMS.registerPreviewTemplate("blog", BlogPreview); CMS.registerPreviewTemplate("blog", BlogPreview);
CMS.registerPreviewTemplate("wettbewerbe", ContestPreview); CMS.registerPreviewTemplate("wettbewerbe", ContestPreview);
CMS.registerPreviewTemplate("ganztagsangebote", GanztagPreview); CMS.registerPreviewTemplate("ganztagsangebote", GanztagPreview);
CMS.registerPreviewTemplate("contact-index", KontaktPreview); CMS.registerPreviewTemplate("kontakt", KontaktPreview);
CMS.registerPreviewTemplate("event-index", EventPreview); CMS.registerPreviewTemplate("termine", EventPreview);
CMS.registerPreviewTemplate("anmeldung-index", AnmeldungPreview); CMS.registerPreviewTemplate("anmeldung-index", AnmeldungPreview);
CMS.registerPreviewTemplate("chronikjahre", ChronikPreview); CMS.registerPreviewTemplate("chronikjahre", ChronikPreview);
CMS.registerPreviewTemplate("anmeldeformular", AnmeldeformularPreview); CMS.registerPreviewTemplate("anmeldeformular", AnmeldeformularPreview);
@ -116,7 +122,6 @@
Icons.forEach((i) => CMS.registerIcon(i.name, i.icon)); Icons.forEach((i) => CMS.registerIcon(i.name, i.icon));
// field previews // field previews
CMS.registerFieldPreview("author", "active", BooleanPreview); CMS.registerFieldPreview("author", "active", BooleanPreview);
CMS.registerFieldPreview("author", "simplified", BooleanPreview); CMS.registerFieldPreview("author", "simplified", BooleanPreview);
CMS.registerFieldPreview("blog", "date", DatePreview); CMS.registerFieldPreview("blog", "date", DatePreview);
@ -141,8 +146,15 @@
].forEach((collection) => ].forEach((collection) =>
CMS.registerFieldPreview(collection, "draft", DraftPreview) CMS.registerFieldPreview(collection, "draft", DraftPreview)
); );
["blog", "author", "chronikseiten", "pages", "cantorpreis", "begabte"].forEach( [
(collection) => CMS.registerFieldPreview(collection, "body", BodyPreview) "blog",
"author",
"chronikseiten",
"pages",
"cantorpreis",
"begabte",
].forEach((collection) =>
CMS.registerFieldPreview(collection, "body", BodyPreview)
); );
[ [
"cantorpreis-index", "cantorpreis-index",
@ -154,8 +166,8 @@
"blog-index", "blog-index",
"about-index", "about-index",
"anmeldung-index", "anmeldung-index",
"contact-index", "kontakt",
"event-index", "termine",
"forms-index", "forms-index",
"ganztagsangebote-index", "ganztagsangebote-index",
"begabte-index", "begabte-index",
@ -166,6 +178,27 @@
["chronikseiten", "blog"].forEach((collection) => ["chronikseiten", "blog"].forEach((collection) =>
CMS.registerFieldPreview(collection, "title", BodyPreview) CMS.registerFieldPreview(collection, "title", BodyPreview)
); );
// access control
CMS.registerEventListener({
name: "login",
handler: ({ login }) => {
const adminUsers = [
"fberger",
"denyskon",
"gfelke",
"lberthold",
"cschapitz",
"bgorsler",
];
if (login && !adminUsers.includes(login)) {
alert(
"Sie sind nicht berechtigt, diese Seite aufzurufen. Sie werden nun auf die Startseite weitergeleitet."
);
location.href = "/";
}
},
});
</script> </script>
</body> </body>
</html> </html>

@ -4,10 +4,4 @@ import CountPreview from "./count-preview.js";
import BodyPreview from "./body-preview.js"; import BodyPreview from "./body-preview.js";
import DatePreview from "./date-preview.js"; import DatePreview from "./date-preview.js";
export { export { BooleanPreview, DraftPreview, CountPreview, BodyPreview, DatePreview };
BooleanPreview,
DraftPreview,
CountPreview,
BodyPreview,
DatePreview,
};

@ -36,7 +36,7 @@ const BlogPreview = ({ widgetFor, entry, fields, collection }) => {
"div", "div",
{ className: "col-6 mb-md-0 text-light" }, { className: "col-6 mb-md-0 text-light" },
h("span", { className: "fw-bold me-1" }, "Geschrieben von:"), h("span", { className: "fw-bold me-1" }, "Geschrieben von:"),
entry.data.author widgetFor("author")
), ),
h( h(
"div", "div",

@ -15,8 +15,7 @@ const ContestPreview = ({ widgetFor, entry, fields, collection }) => {
PageHeader(entry), PageHeader(entry),
Section( Section(
Container([ Container([
entry.data.image && entry.data.image && entry.data.image != "/media/image.webp"
entry.data.image != "/media/image.webp"
? Row( ? Row(
h( h(
"div", "div",

@ -3,7 +3,7 @@ const Card = (child, opts = { vertical: false }) =>
"span", "span",
{ {
className: className:
"relative flex border border-slate-400 focus-within:border-blue-800 dark:focus-within:border-blue-100 focus-within:bg-slate-100 dark:focus-within:bg-slate-800 hover:bg-slate-100 dark:hover:bg-slate-800 pb-3 cursor-text group/active" + "relative flex border border-slate-400 focus-within:border-blue-800 dark:focus-within:border-blue-100 focus-within:bg-slate-100 dark:focus-within:bg-slate-800 hover:bg-slate-100 dark:hover:bg-slate-800 pb-3 cursor-text group/active top-3 bottom-3" +
(opts.vertical ? " flex-col" : ""), (opts.vertical ? " flex-col" : ""),
}, },
child child

@ -3,8 +3,14 @@
<head> <head>
<meta charset="utf-8" /> <meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" href="https://assets.cantorgymnasium.de/fonts/mdi/v7/css/materialdesignicons.min.css"> <link
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@staticcms/app@^2.0.0/dist/main.css" /> rel="stylesheet"
href="https://assets.cantorgymnasium.de/fonts/mdi/v7/css/materialdesignicons.min.css"
/>
<link
rel="stylesheet"
href="https://cdn.jsdelivr.net/npm/@staticcms/app@^2.0.0/dist/main.css"
/>
<title>Chronikverwaltung</title> <title>Chronikverwaltung</title>
</head> </head>
<body> <body>
@ -52,10 +58,9 @@
["abiturienten", "cantorfora"].forEach((page) => ["abiturienten", "cantorfora"].forEach((page) =>
CMS.registerPreviewTemplate(page, AbiturientenPreview) CMS.registerPreviewTemplate(page, AbiturientenPreview)
); );
[ ["cantorpreis-index", "abiturienten-index"].forEach((page) =>
"cantorpreis-index", CMS.registerPreviewTemplate(page, HeaderPreview)
"abiturienten-index", );
].forEach((page) => CMS.registerPreviewTemplate(page, HeaderPreview));
[ [
"abiturienten", "abiturienten",
"cantorfora-index", "cantorfora-index",
@ -96,14 +101,11 @@
].forEach((collection) => ].forEach((collection) =>
CMS.registerFieldPreview(collection, "draft", DraftPreview) CMS.registerFieldPreview(collection, "draft", DraftPreview)
); );
["chronikseiten", "cantorpreis"].forEach( ["chronikseiten", "cantorpreis"].forEach((collection) =>
(collection) => CMS.registerFieldPreview(collection, "body", BodyPreview) CMS.registerFieldPreview(collection, "body", BodyPreview)
); );
[ ["cantorpreis-index", "abiturienten-index", "cantorfora"].forEach(
"cantorpreis-index", (collection) =>
"abiturienten-index",
"cantorfora",
].forEach((collection) =>
CMS.registerFieldPreview(collection, "description", BodyPreview) CMS.registerFieldPreview(collection, "description", BodyPreview)
); );
CMS.registerFieldPreview("chronikseiten", "title", BodyPreview); CMS.registerFieldPreview("chronikseiten", "title", BodyPreview);