CMS refactor
All checks were successful
website-main / prod-build (push) Successful in 2m2s
website-main / test-build (push) Successful in 2m2s
website-main / auto-rebuild (push) Has been skipped

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,12 +268,13 @@ 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)."
impressumURL: pages/impressum params:
dseURL: pages/datenschutz home: Startseite
impressumURL: pages/impressum
dseURL: pages/datenschutz
privacy: privacy:
disqus: disqus:
disable: true disable: true

@ -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

@ -2,53 +2,55 @@ import { MarkdownProps } from "../props.js";
import { DraftBoolean, Title } from "./widgets.js"; import { DraftBoolean, Title } from "./widgets.js";
const AbiturientenCollection = { 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:
icon: "graduation-cap", "Hier kann die Übersicht der Abiturjahrgänge bearbeitet werden. Dieser Bereich wird von der Schulchronik verwaltet.",
folder: "content/german/abiturienten", icon: "graduation-cap",
filter: { folder: "content/german/abiturienten",
field: "type", filter: {
value: "abiturienten" field: "type",
value: "abiturienten",
},
create: true,
editor: {
preview: true,
frame: true,
size: "half",
},
summary_fields: ["title", "draft"],
sortable_fields: {
fields: ["title"],
default: {
field: "title",
direction: "Descending",
}, },
create: true, },
editor: { fields: [
preview: true, Title(false),
frame: true DraftBoolean,
{
name: "image",
label: "Bild",
widget: "image",
default: "/media/image.webp",
required: false,
}, },
summary_fields: ["title", "draft"], {
sortable_fields: { name: "type",
fields: ["title"], label: "Typ",
default: { widget: "hidden",
field: "title", default: "abiturienten",
direction: "Descending"
}
}, },
fields: [ {
Title(false), name: "body",
DraftBoolean, label: "Text",
{ widget: "markdown",
name: "image", required: false,
label: "Bild", ...MarkdownProps,
widget: "image", },
default: "/media/image.webp", ],
required: false
},
{
name: "type",
label: "Typ",
widget: "hidden",
default: "abiturienten"
},
{
name: "body",
label: "Text",
widget: "markdown",
required: false,
...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;

@ -2,70 +2,72 @@ import { MarkdownProps } from "../props.js";
import { DescriptionText, DraftBoolean, Title } from "./widgets.js"; import { DescriptionText, DraftBoolean, Title } from "./widgets.js";
const CantorforaCollection = { 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:
icon: "presentation", "Hier kann die Übersicht der Cantorfora bearbeitet werden. Dieser Bereich wird von der Schulchronik verwaltet.",
folder: "content/german/cantorfora", icon: "presentation",
filter: { folder: "content/german/cantorfora",
field: "type", filter: {
value: "cantorfora" field: "type",
value: "cantorfora",
},
create: true,
editor: {
preview: true,
frame: true,
size: "half",
},
view_groups: [
{
label: "Entwürfe",
field: "draft",
}, },
create: true, ],
editor: { summary_fields: ["title", "draft", "description"],
preview: true, sortable_fields: {
frame: true fields: ["index", "title"],
default: {
field: "index",
direction: "Descending",
}, },
view_groups: [ },
{ fields: [
label: "Entwürfe", Title(false),
field: "draft" {
} name: "index",
], label: "Laufindex",
summary_fields: ["title", "draft", "description"], hint: "Nummer des Cantorforums",
sortable_fields: { widget: "number",
fields: ['index', 'title'], value_type: "int",
default: { min: 1,
field: "index", step: 1,
direction: "Descending" required: true,
}
}, },
fields: [ DraftBoolean,
Title(false), DescriptionText,
{ {
name: "index", name: "image",
label: "Laufindex", label: "Titelbild",
hint: "Nummer des Cantorforums", widget: "image",
widget: "number", default: "/media/image.webp",
value_type: "int", required: true,
min: 1, },
step: 1, {
required: true name: "type",
}, label: "Typ",
DraftBoolean, widget: "hidden",
DescriptionText, default: "cantorfora",
{ },
name: "image", {
label: "Titelbild", name: "body",
widget: "image", label: "Text",
default: "/media/image.webp", widget: "markdown",
required: true required: true,
}, ...MarkdownProps,
{ },
name: "type", ],
label: "Typ",
widget: "hidden",
default: "cantorfora"
},
{
name: "body",
label: "Text",
widget: "markdown",
required: true,
...MarkdownProps
}
]
}; };
export default CantorforaCollection; export default CantorforaCollection;

@ -2,65 +2,67 @@ import { MarkdownProps } from "../props.js";
import { DescriptionText, DraftBoolean } from "./widgets.js"; 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:
icon: "award", "Hier sind alle Cantorpreisträger aufgelistet. Dieser Bereich wird von der Schulchronik verwaltet.",
folder: "content/german/cantorpreis", icon: "award",
filter: { folder: "content/german/cantorpreis",
field: "type", filter: {
value: "cantorpreis" field: "type",
value: "cantorpreis",
},
sortable_fields: {
fields: ["title", "name"],
default: {
field: "title",
direction: "Descending",
}, },
sortable_fields: { },
fields: ['title', 'name'], summary: "{{title}} - {{name}}",
default: { create: true,
field: "title", editor: {
direction: "Descending" preview: true,
} frame: true,
size: "half",
},
summary_fields: ["title", "name", "draft", "body"],
fields: [
{
name: "title",
label: "Jahr",
widget: "string",
required: true,
}, },
summary: "{{title}} - {{name}}", {
create: true, name: "name",
editor: { label: "Name",
preview: true, widget: "string",
frame: true required: true,
}, },
summary_fields: ["title", "name", "draft", "body"], DraftBoolean,
fields: [ DescriptionText,
{ {
name: "title", name: "image",
label: "Jahr", label: "Bild",
widget: "string", widget: "image",
required: true default: "/media/image.webp",
}, required: false,
{ },
name: "name", {
label: "Name", name: "type",
widget: "string", label: "Typ",
required: true widget: "hidden",
}, default: "cantorpreis",
DraftBoolean, },
DescriptionText, {
{ name: "body",
name: "image", label: "Text",
label: "Bild", widget: "markdown",
widget: "image", required: false,
default: "/media/image.webp", ...MarkdownProps,
required: false },
}, ],
{
name: "type",
label: "Typ",
widget: "hidden",
default: "cantorpreis"
},
{
name: "body",
label: "Text",
widget: "markdown",
required: false,
...MarkdownProps
}
]
}; };
export default CantorpreisCollection; export default CantorpreisCollection;

@ -2,110 +2,111 @@ import { MarkdownProps } from "../props.js";
import { DraftBoolean, EnableBoolean } from "./widgets.js"; 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:
icon: "schulchronik", "Hier können die Chronikjahre bearbeitet werden. Dieser Bereich wird von der Schulchronik verwaltet.",
label: "Chronikjahre", icon: "schulchronik",
label_singular: "Chronikjahr", label: "Chronikjahre",
folder: "content/german/schulchronik", label_singular: "Chronikjahr",
filter: { folder: "content/german/schulchronik",
field: "type", filter: {
value: "schulchronik" field: "type",
value: "schulchronik",
},
create: true,
editor: {
preview: false,
size: "half",
},
summary_fields: ["title", "draft", "cantorpreisträger", "topics"],
sortable_fields: {
fields: ["title"],
default: {
field: "title",
direction: "Descending",
}, },
create: true, },
editor: { fields: [
preview: false {
name: "title",
label: "Jahr",
widget: "string",
}, },
summary_fields: ["title", "draft", "cantorpreisträger", "topics"], DraftBoolean,
sortable_fields: { {
fields: ['title'], name: "type",
default: { label: "Typ",
field: "title", widget: "hidden",
direction: "Descending" default: "schulchronik",
}
}, },
fields: [ {
name: "pretext",
label: "Einleitung",
hint: "Text für die Jahreszahl",
widget: "markdown",
required: false,
...MarkdownProps,
},
{
name: "topics",
label: "Kreative Haufen",
label_singular: "Haufen",
widget: "list",
required: false,
collapsed: true,
fields: [
{ {
name: "title", name: "title",
label: "Jahr", label: "Titel",
widget: "string" widget: "string",
}, required: true,
DraftBoolean,
{
name: "type",
label: "Typ",
widget: "hidden",
default: "schulchronik"
}, },
{ {
name: "pretext", name: "content",
label: "Einleitung", label: "Inhalt",
hint: "Text für die Jahreszahl", widget: "markdown",
widget: "markdown", required: false,
required: false, ...MarkdownProps,
...MarkdownProps
}, },
{ {
name: "topics", name: "superhaufen",
label: "Kreative Haufen", label: "Superhaufen",
label_singular: "Haufen", widget: "object",
widget: "list", required: false,
required: false, fields: [
collapsed: true, EnableBoolean,
fields: [ {
{ name: "link",
name: "title", label: "Superhaufen",
label: "Titel", widget: "relation",
widget: "string", collection: "superhaufen",
required: true, search_fields: ["title"],
}, value_field: "title",
{ required: false,
name: "content", collapsed: true,
label: "Inhalt", },
widget: "markdown", ],
required: false,
...MarkdownProps
},
{
name: "superhaufen",
label: "Superhaufen",
widget: "object",
required: false,
fields: [
EnableBoolean,
{
name: "link",
label: "Superhaufen",
widget: "relation",
collection: "superhaufen",
search_fields: ["title"],
value_field: "title",
required: false,
collapsed: true
}
]
}
]
}, },
{ ],
name: "cantorpreisträger", },
label: "Cantorpreisträger", {
widget: "relation", name: "cantorpreisträger",
collection: "cantorpreis", label: "Cantorpreisträger",
search_fields: ["jahr", "name"], widget: "relation",
value_field: "name", collection: "cantorpreis",
required: false search_fields: ["jahr", "name"],
}, value_field: "name",
{ required: false,
name: "body", },
label: "Text", {
hint: "Erscheint zusätzlich zu den Kreativen Haufen", name: "body",
widget: "markdown", label: "Text",
required: false, hint: "Erscheint zusätzlich zu den Kreativen Haufen",
...MarkdownProps widget: "markdown",
} required: false,
...MarkdownProps,
},
],
};
] export default ChronikjahreCollection;
}
export default ChronikjahreCollection;

@ -2,55 +2,57 @@ import { MarkdownProps } from "../props.js";
import { DescriptionText, DraftBoolean, Title } from "./widgets.js"; import { DescriptionText, DraftBoolean, Title } from "./widgets.js";
const ChronikseitenCollection = { 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:
icon: "page-add", "Chronikseiten entsprechen von der Funktionalität herkömmlichen Zusatzseiten, sind allerdings der Schulchronik vorbehalten.",
folder: "content/german/chronikseiten", icon: "page-add",
create: true, folder: "content/german/chronikseiten",
editor: { create: true,
preview: true, editor: {
frame: true preview: true,
frame: true,
size: "half",
},
filter: {
field: "type",
value: "pages",
},
summary_fields: ["title", "draft", "aliases", "body"],
fields: [
Title(false),
DraftBoolean,
DescriptionText,
{
name: "type",
label: "Typ",
widget: "hidden",
default: "pages",
}, },
filter: { {
field: "type", name: "aliases",
value: "pages" label: "Aliase",
label_singular: "Alias",
widget: "list",
collapsed: true,
required: false,
fields: [
{
name: "alias",
label: "Alias",
widget: "string",
},
],
}, },
summary_fields: ["title", "draft", "aliases", "body"], {
fields: [ name: "body",
Title(false), label: "Inhalt",
DraftBoolean, widget: "markdown",
DescriptionText, required: false,
{ ...MarkdownProps,
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: "Text",
widget: "markdown",
required: false,
...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;

@ -2,100 +2,102 @@ import { MarkdownProps } from "../props.js";
import { DraftBoolean, EnableBoolean, Title } from "./widgets.js"; 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:
icon: "superhaufen", '"Superhaufen" sind ein besonderer Bereich der Schulchronik, um besonders ausführliche Ereignisse darzustellen. Dieser Bereich wird von der Schulchronik verwaltet.',
folder: "content/german/superhaufen", icon: "superhaufen",
filter: { folder: "content/german/superhaufen",
field: "type", filter: {
value: "superhaufen" field: "type",
value: "superhaufen",
},
create: true,
editor: {
preview: true,
frame: true,
size: "half",
},
summary_fields: ["title", "draft", "tiles"],
fields: [
Title(false),
DraftBoolean,
{
name: "type",
label: "Typ",
widget: "hidden",
default: "superhaufen",
}, },
create: true, {
editor: { name: "previous",
preview: true, label: "Rückverlinkung",
frame: true, widget: "object",
}, collapsed: true,
summary_fields: ["title", "draft", "tiles"], fields: [
fields: [ EnableBoolean,
Title(false), Title(false),
DraftBoolean,
{ {
name: "type", name: "link",
label: "Typ", label: "Link",
widget: "hidden", widget: "string",
default: "superhaufen" required: true,
},
],
},
{
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,
}, },
{ {
name: "previous", name: "icon",
label: "Rückverlinkung", label: "Symbol",
widget: "object", widget: "string",
collapsed: true, required: true,
fields: [
EnableBoolean,
Title(false),
{
name: "link",
label: "Link",
widget: "string",
required: true
}
]
}, },
{ {
name: "tiles", name: "font_color",
label: "Kacheln", label: "Symbolfarbe",
hint: "Die Vorschau zeigt nur die generierten Symbolkarten, NICHT die Inhalte.", widget: "color",
widget: "list", required: true,
required: false, },
collapsed: true, {
fields: [ name: "content",
Title(false), label: "Inhalt",
{ widget: "markdown",
name: "bg_color", required: true,
label: "Hintergrundfarbe", ...MarkdownProps,
widget: "color", },
required: true, {
}, name: "unterhaufen",
{ label: "Unterhaufen",
name: "icon", widget: "list",
label: "Symbol", required: false,
widget: "string", collapsed: true,
required: true, fields: [
}, Title(false),
{ {
name: "font_color", name: "content",
label: "Symbolfarbe", label: "Inhalt",
widget: "color", widget: "markdown",
required: true, required: true,
}, ...MarkdownProps,
{ },
name: "content", ],
label: "Inhalt", },
widget: "markdown", ],
required: true, },
...MarkdownProps ],
}, };
{
name: "unterhaufen",
label: "Unterhaufen",
widget: "list",
required: false,
collapsed: true,
fields: [
Title(false),
{
name: "content",
label: "Inhalt",
widget: "markdown",
required: true,
...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,30 +1,88 @@
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 = {
name: "draft", name: "draft",
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,37 +1,71 @@
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: {
name: "gitea", name: "gitea",
repo: "gcg/gcg-website", repo: "gcg/gcg-website",
branch: "master", branch: "master",
api_root: "https://git.cantorgymnasium.de/api/v1", api_root: "https://git.cantorgymnasium.de/api/v1",
base_url: "https://oauth.cantorgymnasium.de", base_url: "https://oauth.cantorgymnasium.de",
commit_messages: { commit_messages: {
create: "{{collection}} {{slug}} erstellt", create: "{{collection}} {{slug}} erstellt",
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, },
media_folder: "/static/media", local_backend: true,
public_folder: "/media", media_folder: "/static/media",
media_library: { public_folder: "/media",
max_file_size: 10240000, media_library: {
folder_support: true max_file_size: 10240000,
}, folder_support: true,
site_url: "https://cantorgymnasium.de", },
locale: "de", site_url: "https://cantorgymnasium.de",
slug: { locale: "de",
encoding: "ascii", slug: {
clean_accents: true, encoding: "ascii",
sanitize_replacement: "-" clean_accents: true,
}, sanitize_replacement: "-",
collections: [ },
SettingsCollection collections: [
] 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: [
table_empty: [ "bold",
'bold', "italic",
'italic', "strikethrough",
'strikethrough', "code",
'code', "font",
'insert-row', "file-link",
'delete-row', "blockquote",
'insert-column', ],
'delete-column', table_empty: [
'delete-table', "bold",
'file-link', "italic",
'shortcode', "strikethrough",
], "code",
table_selection: [ "insert-row",
'bold', "delete-row",
'italic', "insert-column",
'strikethrough', "delete-column",
'code', "delete-table",
'insert-row', "file-link",
'delete-row', "shortcode",
'insert-column', ],
'delete-column', table_selection: [
'delete-table', "bold",
'file-link', "italic",
'shortcode', "strikethrough",
] "code",
} "insert-row",
"delete-row",
"insert-column",
"delete-column",
"delete-table",
"file-link",
"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,43 +1,51 @@
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: {
name: "gitea", name: "gitea",
repo: "gcg/gcg-website", repo: "gcg/gcg-website",
branch: "master", branch: "master",
api_root: "https://git.cantorgymnasium.de/api/v1", api_root: "https://git.cantorgymnasium.de/api/v1",
base_url: "https://oauth.cantorgymnasium.de", base_url: "https://oauth.cantorgymnasium.de",
commit_messages: { commit_messages: {
create: "{{collection}} {{slug}} erstellt", create: "{{collection}} {{slug}} erstellt",
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, },
media_folder: "/static/media", local_backend: true,
public_folder: "/media", media_folder: "/static/media",
media_library: { public_folder: "/media",
max_file_size: 10240000, media_library: {
folder_support: true max_file_size: 10240000,
}, folder_support: true,
site_url: "https://cantorgymnasium.de/schulchronik/", },
locale: "de", site_url: "https://cantorgymnasium.de/schulchronik/",
slug: { locale: "de",
encoding: "ascii", slug: {
clean_accents: true, encoding: "ascii",
sanitize_replacement: "-" clean_accents: true,
}, sanitize_replacement: "-",
collections: [ },
ChronikjahreCollection, collections: [
SuperhaufenCollection, ChronikjahreCollection,
CantorpreisCollection, SuperhaufenCollection,
AbiturientenCollection, CantorpreisCollection,
CantorforaCollection, AbiturientenCollection,
ChronikseitenCollection CantorforaCollection,
] ChronikseitenCollection,
StatsCollection,
],
}; };
export default config; export default config;

@ -1,37 +1,36 @@
const IconNames = { const IconNames = {
settings: "mdi mdi-cog-outline", settings: "mdi mdi-cog-outline",
user: "mdi mdi-fountain-pen-tip", user: "mdi mdi-fountain-pen-tip",
page: "mdi mdi-file-document-outline", page: "mdi mdi-file-document-outline",
"page-add": "mdi mdi-file-document-plus-outline", "page-add": "mdi mdi-file-document-plus-outline",
document: "mdi mdi-file-document-multiple-outline", document: "mdi mdi-file-document-multiple-outline",
news: "mdi mdi-newspaper", news: "mdi mdi-newspaper",
award: "mdi mdi-seal-variant", award: "mdi mdi-seal-variant",
group: "mdi mdi-crowd", group: "mdi mdi-crowd",
trophy: "mdi mdi-trophy-outline", trophy: "mdi mdi-trophy-outline",
pi: "mdi mdi-pi-box", pi: "mdi mdi-pi-box",
schulchronik: "mdi mdi-pillar", schulchronik: "mdi mdi-pillar",
"graduation-cap": "mdi mdi-school-outline", "graduation-cap": "mdi mdi-school-outline",
help: "mdi mdi-lifebuoy", help: "mdi mdi-lifebuoy",
dash: "mdi mdi-monitor-dashboard", dash: "mdi mdi-monitor-dashboard",
presentation: "mdi mdi-presentation", presentation: "mdi mdi-presentation",
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: () =>
h( h(
"div", "div",
{ className: "flex items-center" }, { className: "flex items-center" },
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>

@ -2,4 +2,4 @@ import StatusPage from "./status.js";
import WikiLink from "./wiki.js"; import WikiLink from "./wiki.js";
export { StatusPage, WikiLink }; export { StatusPage, WikiLink };

@ -1,17 +1,17 @@
const StatusPage = { const StatusPage = {
id: "status", id: "status",
title: "Status", title: "Status",
data: () => data: () =>
h("iframe", { h("iframe", {
src: "https://grafana.cantorgymnasium.de/d/ni-7T-J4z/status?orgId=2&refresh=5s&kiosk", src: "https://grafana.cantorgymnasium.de/d/ni-7T-J4z/status?orgId=2&refresh=5s&kiosk",
style: { style: {
width: "100%", width: "100%",
height: "90vh", height: "90vh",
}, },
}), }),
options: { options: {
icon: "dash", icon: "dash",
}, },
}; };
export default StatusPage; export default StatusPage;

@ -1,10 +1,10 @@
const WikiLink = { const WikiLink = {
id: "wiki", id: "wiki",
title: "GCG.Wiki", title: "GCG.Wiki",
data: "https://wiki.cantorgymnasium.de", data: "https://wiki.cantorgymnasium.de",
options: { options: {
icon: "help", icon: "help",
}, },
}; };
export default WikiLink; export default WikiLink;

@ -1,6 +1,6 @@
const BooleanPreview = ({ value }) => const BooleanPreview = ({ value }) =>
h("i", { h("i", {
className: value ? "mdi mdi-check" : "mdi mdi-close", className: value ? "mdi mdi-check" : "mdi mdi-close",
}); });
export default BooleanPreview; export default BooleanPreview;

@ -1,9 +1,9 @@
function truncate(str, num) { function truncate(str, num) {
if (str.length > num) { if (str.length > num) {
return str.slice(0, num) + "..."; return str.slice(0, num) + "...";
} else { } else {
return str; return str;
} }
} }
export default truncate; export default truncate;

@ -1,13 +1,13 @@
const DatePreview = ({ value }) => const DatePreview = ({ value }) =>
h( h(
"p", "p",
{}, {},
new Intl.DateTimeFormat("de-DE", { new Intl.DateTimeFormat("de-DE", {
year: "numeric", year: "numeric",
month: "2-digit", month: "2-digit",
day: "2-digit", day: "2-digit",
hour12: false, hour12: false,
}).format(new Date(value)) }).format(new Date(value))
); );
export default DatePreview; export default DatePreview;

@ -1,21 +1,21 @@
const DraftPreview = ({ value }) => const DraftPreview = ({ value }) =>
h( h(
"div", "div",
{ {
style: { style: {
backgroundColor: value === true ? "rgb(37 99 235)" : "rgb(22 163 74)", backgroundColor: value === true ? "rgb(37 99 235)" : "rgb(22 163 74)",
color: "white", color: "white",
border: "none", border: "none",
padding: "2px 6px", padding: "2px 6px",
textAlign: "center", textAlign: "center",
textDecoration: "none", textDecoration: "none",
display: "inline-block", display: "inline-block",
cursor: "pointer", cursor: "pointer",
borderRadius: "4px", borderRadius: "4px",
fontSize: "14px", fontSize: "14px",
}, },
}, },
value ? "Entwurf" : "Veröffentlicht" value ? "Entwurf" : "Veröffentlicht"
); );
export default DraftPreview; export default DraftPreview;

@ -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,
};

@ -1,32 +1,32 @@
import { Container, PageHeader, Section, Row } from "./components/index.js"; import { Container, PageHeader, Section, Row } from "./components/index.js";
const AbiturientenPreview = ({ widgetFor, entry, collection, fields }) => { const AbiturientenPreview = ({ widgetFor, entry, collection, fields }) => {
const imageField = useMemo( const imageField = useMemo(
() => fields.find((field) => field.name === "image"), () => fields.find((field) => field.name === "image"),
[fields] [fields]
); );
const imageUrl = useMediaAsset( const imageUrl = useMediaAsset(
entry.data.image, entry.data.image,
collection, collection,
imageField, imageField,
entry entry
); );
return [ return [
PageHeader(entry), PageHeader(entry),
Section( Section(
Container( Container(
Row([ Row([
h( h(
"div", "div",
{ className: "col-12 mb-4" }, { className: "col-12 mb-4" },
h("img", { className: "img-fluid w-100", src: imageUrl }) h("img", { className: "img-fluid w-100", src: imageUrl })
), ),
h("div", { className: "col-12 content" }, widgetFor("body")), h("div", { className: "col-12 content" }, widgetFor("body")),
]) ])
) )
), ),
]; ];
}; };
export default AbiturientenPreview; export default AbiturientenPreview;

@ -1,64 +1,64 @@
import { PageHeader } from "./components/index.js"; import { PageHeader } from "./components/index.js";
const AboutPreview = ({ widgetFor, widgetsFor, entry, fields, collection }) => { const AboutPreview = ({ widgetFor, widgetsFor, entry, fields, collection }) => {
const imageField = useMemo( const imageField = useMemo(
() => fields.find((field) => field.name === "image"), () => fields.find((field) => field.name === "image"),
[fields] [fields]
); );
const imageUrl = useMediaAsset( const imageUrl = useMediaAsset(
entry.data.image, entry.data.image,
collection, collection,
imageField, imageField,
entry entry
); );
return [ return [
PageHeader(entry), PageHeader(entry),
h( h(
"section", "section",
{ className: "section-sm" }, { className: "section-sm" },
h( h(
"div", "div",
{ className: "container" }, { className: "container" },
h( h(
"div", "div",
{ className: "row" }, { className: "row" },
h( h(
"div", "div",
{ className: "col-12" }, { className: "col-12" },
h("img", { className: "img-fluid w-100 mb-4", src: imageUrl }), h("img", { className: "img-fluid w-100 mb-4", src: imageUrl }),
widgetFor("body") widgetFor("body")
) )
) )
) )
), ),
entry.data.stats.enable entry.data.stats.enable
? h( ? h(
"section", "section",
{ className: "section-sm bg-primary" }, { className: "section-sm bg-primary" },
h( h(
"div", "div",
{ className: "container" }, { className: "container" },
h( h(
"div", "div",
{ className: "row" }, { className: "row" },
widgetsFor("stats").data.zahlen.map((element) => { widgetsFor("stats").data.zahlen.map((element) => {
return h( return h(
"div", "div",
{ className: "col-md-4 col-sm-6 mb-4 mb-md-0" }, { className: "col-md-4 col-sm-6 mb-4 mb-md-0" },
h( h(
"div", "div",
{ className: "text-center" }, { className: "text-center" },
h("h2", { className: "count text-white" }, element.count), h("h2", { className: "count text-white" }, element.count),
h("h5", { className: "text-white" }, element.name) h("h5", { className: "text-white" }, element.name)
) )
); );
}) })
) )
) )
) )
: null, : null,
]; ];
}; };
export default AboutPreview; export default AboutPreview;

@ -1,159 +1,159 @@
import { PageHeader } from "./components/index.js"; import { PageHeader } from "./components/index.js";
const AnmeldeformularPreview = ({ widgetFor, entry }) => { const AnmeldeformularPreview = ({ widgetFor, entry }) => {
return [ return [
PageHeader(entry), PageHeader(entry),
h( h(
"section", "section",
{ className: "section-sm bg-gray" }, { className: "section-sm bg-gray" },
h( h(
"div", "div",
{ className: "container" }, { className: "container" },
h( h(
"div", "div",
{ className: "row" }, { className: "row" },
h( h(
"div", "div",
{ className: "col-lg-8 mb-4 mb-lg-0" }, { className: "col-lg-8 mb-4 mb-lg-0" },
h( h(
"form", "form",
{}, {},
h( h(
"div", "div",
{ className: "input-group" }, { className: "input-group" },
h("input", { h("input", {
className: "form-control mb-3", className: "form-control mb-3",
type: "text", type: "text",
placeholder: "Name (Schüler/in)", placeholder: "Name (Schüler/in)",
}), }),
h("input", { h("input", {
className: "form-control mb-3", className: "form-control mb-3",
type: "text", type: "text",
placeholder: "Vorname", placeholder: "Vorname",
}) })
), ),
h( h(
"div", "div",
{ className: "input-group mb-3" }, { className: "input-group mb-3" },
h("span", { className: "input-group-text" }, "Geburtsdatum"), h("span", { className: "input-group-text" }, "Geburtsdatum"),
h("input", { className: "form-control", type: "date" }) h("input", { className: "form-control", type: "date" })
), ),
h("input", { h("input", {
className: "form-control mb-3", className: "form-control mb-3",
type: "text", type: "text",
placeholder: "Straße", placeholder: "Straße",
}), }),
h( h(
"div", "div",
{ className: "input-group" }, { className: "input-group" },
h("input", { h("input", {
className: "form-control mb-3", className: "form-control mb-3",
type: "text", type: "text",
placeholder: "Hausnummer", placeholder: "Hausnummer",
}), }),
h("input", { h("input", {
className: "form-control mb-3", className: "form-control mb-3",
type: "text", type: "text",
placeholder: "Adresszusatz", placeholder: "Adresszusatz",
}) })
), ),
h( h(
"div", "div",
{ className: "input-group" }, { className: "input-group" },
h("input", { h("input", {
className: "form-control mb-3", className: "form-control mb-3",
type: "text", type: "text",
placeholder: "PLZ", placeholder: "PLZ",
}), }),
h("input", { h("input", {
className: "form-control mb-3", className: "form-control mb-3",
type: "text", type: "text",
placeholder: "Stadt", placeholder: "Stadt",
}) })
), ),
h("input", { h("input", {
className: "form-control mb-3", className: "form-control mb-3",
type: "text", type: "text",
placeholder: "Landkreis", placeholder: "Landkreis",
}), }),
h( h(
"div", "div",
{ className: "input-group" }, { className: "input-group" },
h("input", { h("input", {
className: "form-control mb-3", className: "form-control mb-3",
type: "text", type: "text",
placeholder: "Telefon privat", placeholder: "Telefon privat",
}), }),
h("input", { h("input", {
className: "form-control mb-3", className: "form-control mb-3",
type: "text", type: "text",
placeholder: "Telefon dienstl.", placeholder: "Telefon dienstl.",
}) })
), ),
h("input", { h("input", {
className: "form-control mb-3", className: "form-control mb-3",
type: "text", type: "text",
placeholder: "Abweichender Elternname", placeholder: "Abweichender Elternname",
}), }),
h("input", { h("input", {
className: "form-control mb-3", className: "form-control mb-3",
type: "text", type: "text",
placeholder: "Grundschule", placeholder: "Grundschule",
}), }),
h("input", { h("input", {
className: "form-control mb-3", className: "form-control mb-3",
type: "text", type: "text",
placeholder: "Ihre E-Mail-Adresse", placeholder: "Ihre E-Mail-Adresse",
}), }),
h("textarea", { h("textarea", {
className: "form-control mb-3", className: "form-control mb-3",
placeholder: "Bemerkungen", placeholder: "Bemerkungen",
}), }),
h( h(
"div", "div",
{ className: "input-group mb-3" }, { className: "input-group mb-3" },
h("input", { className: "form-control", type: "file" }), h("input", { className: "form-control", type: "file" }),
h( h(
"span", "span",
{ className: "input-group-text" }, { className: "input-group-text" },
"Zeugnis (Vorderseite)" "Zeugnis (Vorderseite)"
) )
), ),
h( h(
"div", "div",
{ className: "input-group mb-3" }, { className: "input-group mb-3" },
h("input", { className: "form-control", type: "file" }), h("input", { className: "form-control", type: "file" }),
h( h(
"span", "span",
{ className: "input-group-text" }, { className: "input-group-text" },
"Zeugnis (Rückseite)" "Zeugnis (Rückseite)"
) )
), ),
h( h(
"div", "div",
{ className: "input-group mb-3" }, { className: "input-group mb-3" },
h( h(
"div", "div",
{ className: "input-group-text" }, { className: "input-group-text" },
h("input", { h("input", {
className: "form-check-input", className: "form-check-input",
type: "checkbox", type: "checkbox",
}) })
), ),
h( h(
"p", "p",
{ className: "form-control mb-0" }, { className: "form-control mb-0" },
"Hiermit melden wir unser Kind verbindlich zur Aufnahmeprüfung an." "Hiermit melden wir unser Kind verbindlich zur Aufnahmeprüfung an."
) )
), ),
h("button", { className: "btn btn-primary" }, "Senden") h("button", { className: "btn btn-primary" }, "Senden")
) )
), ),
h("div", { className: "col-lg-4" }, widgetFor("body")) h("div", { className: "col-lg-4" }, widgetFor("body"))
) )
) )
), ),
]; ];
}; };
export default AnmeldeformularPreview; export default AnmeldeformularPreview;

@ -1,44 +1,44 @@
import { PageHeader } from "./components/index.js"; import { PageHeader } from "./components/index.js";
const AnmeldungPreview = ({ widgetsFor, widgetFor, entry }) => { const AnmeldungPreview = ({ widgetsFor, widgetFor, entry }) => {
return [ return [
PageHeader(entry), PageHeader(entry),
h( h(
"section", "section",
{ className: "section-sm" }, { className: "section-sm" },
h( h(
"div", "div",
{ className: "container" }, { className: "container" },
h( h(
"div", "div",
{ className: "row mb-4" }, { className: "row mb-4" },
h("div", { className: "col-md-6 content" }, widgetFor("body")) h("div", { className: "col-md-6 content" }, widgetFor("body"))
), ),
h( h(
"div", "div",
{ className: "row" }, { className: "row" },
widgetsFor("elements").map(function (element, index) { widgetsFor("elements").map(function (element, index) {
return h( return h(
"div", "div",
{ {
className: "col-lg-6 col-sm-6 mb-4 d-flex align-items-stretch", className: "col-lg-6 col-sm-6 mb-4 d-flex align-items-stretch",
}, },
h( h(
"div", "div",
{ className: "card rounded-0 hover-shadow border-primary" }, { className: "card rounded-0 hover-shadow border-primary" },
h( h(
"div", "div",
{ className: "card-body" }, { className: "card-body" },
h("h4", { className: "card-title mb-3" }, element.data.title), h("h4", { className: "card-title mb-3" }, element.data.title),
h("div", { className: "content" }, element.widgets.content) h("div", { className: "content" }, element.widgets.content)
) )
) )
); );
}) })
) )
) )
), ),
]; ];
}; };
export default AnmeldungPreview; export default AnmeldungPreview;

@ -1,72 +1,72 @@
import { PageHeader, md5 } from "./components/index.js"; import { PageHeader, md5 } from "./components/index.js";
const AuthorPreview = ({ widgetFor, entry, fields, collection }) => { const AuthorPreview = ({ widgetFor, entry, fields, collection }) => {
const imageField = useMemo( const imageField = useMemo(
() => fields.find((field) => field.name === "image"), () => fields.find((field) => field.name === "image"),
[fields] [fields]
); );
const imageUrl = entry.data.image const imageUrl = entry.data.image
? useMediaAsset(entry.data.image, collection, imageField, entry) ? useMediaAsset(entry.data.image, collection, imageField, entry)
: entry.data.email : entry.data.email
? undefined ? undefined
: useMediaAsset("/media/people/gcg.webp", collection, imageField, entry); : useMediaAsset("/media/people/gcg.webp", collection, imageField, entry);
return [ return [
PageHeader(entry), PageHeader(entry),
h( h(
"section", "section",
{ className: "section-sm bg-light" }, { className: "section-sm bg-light" },
h( h(
"div", "div",
{ className: "container" }, { className: "container" },
h( h(
"div", "div",
{ className: "row" }, { className: "row" },
h( h(
"div", "div",
{ className: "col-lg-10 mx-auto" }, { className: "col-lg-10 mx-auto" },
h( h(
"div", "div",
{ className: "text-center" }, { className: "text-center" },
h( h(
"figure", "figure",
{}, {},
h("img", { h("img", {
className: "rounded-circle img-fluid mb-4", className: "rounded-circle img-fluid mb-4",
src: src:
imageUrl ?? imageUrl ??
"https://www.gravatar.com/avatar/" + "https://www.gravatar.com/avatar/" +
md5(entry.data.email) + md5(entry.data.email) +
"?s=128&pg&d=identicon", "?s=128&pg&d=identicon",
width: "128px", width: "128px",
}), }),
h( h(
"figcaption", "figcaption",
{}, {},
h("h4", { className: "fw-bold" }, entry.data.title) h("h4", { className: "fw-bold" }, entry.data.title)
) )
), ),
h("hr"), h("hr"),
widgetFor("body"), widgetFor("body"),
h("hr"), h("hr"),
h( h(
"ul", "ul",
{ className: "list-inline" }, { className: "list-inline" },
entry.data.email entry.data.email
? h( ? h(
"li", "li",
{ className: "list-inline-item" }, { className: "list-inline-item" },
h("i", { className: "mdi mdi-at" }) h("i", { className: "mdi mdi-at" })
) )
: null : null
) )
) )
) )
) )
) )
), ),
]; ];
}; };
export default AuthorPreview; export default AuthorPreview;

@ -1,89 +1,89 @@
import { import {
DateFormat, DateFormat,
PageHeader, PageHeader,
Section, Section,
Container, Container,
Col12, Col12,
Row, Row,
} from "./components/index.js"; } from "./components/index.js";
const BlogPreview = ({ widgetFor, entry, fields, collection }) => { const BlogPreview = ({ widgetFor, entry, fields, collection }) => {
const imageField = useMemo(() => { const imageField = useMemo(() => {
return fields.find((field) => field.name === "image"); return fields.find((field) => field.name === "image");
}, [fields]); }, [fields]);
const imageUrl = useMediaAsset( const imageUrl = useMediaAsset(
entry.data.image, entry.data.image,
collection, collection,
imageField, imageField,
entry entry
); );
return [ return [
PageHeader(entry), PageHeader(entry),
Section( Section(
Container( Container(
Row([ Row([
h( h(
"div", "div",
{ key: "cover-image", className: "col-12 mb-4" }, { key: "cover-image", className: "col-12 mb-4" },
h("img", { className: "img-fluid w-100", src: imageUrl }) h("img", { className: "img-fluid w-100", src: imageUrl })
), ),
Col12( Col12(
h( h(
"div", "div",
{ className: "row mb-3" }, { className: "row mb-3" },
h( h(
"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",
{ className: "col-6 mb-3 mb-md-0 text-light" }, { className: "col-6 mb-3 mb-md-0 text-light" },
h("span", { className: "fw-bold me-1" }, "Datum:"), h("span", { className: "fw-bold me-1" }, "Datum:"),
entry.data.date entry.data.date
? DateFormat({ ? DateFormat({
date: entry.data.date, date: entry.data.date,
format: { format: {
day: "numeric", day: "numeric",
month: "short", month: "short",
year: "numeric", year: "numeric",
}, },
}) })
: "" : ""
) )
) )
), ),
Row( Row(
h( h(
"div", "div",
{ className: "col-12 mb-md-0 text-light" }, { className: "col-12 mb-md-0 text-light" },
h("span", { className: "fw-bold me-1" }, "Kategorie:"), h("span", { className: "fw-bold me-1" }, "Kategorie:"),
entry.data.categories entry.data.categories
? entry.data.categories.map( ? entry.data.categories.map(
(category, index) => (index != 0 ? ", " : "") + category (category, index) => (index != 0 ? ", " : "") + category
) )
: "" : ""
) )
), ),
h( h(
"div", "div",
{ key: "border-bottom", className: "col-12 my-4" }, { key: "border-bottom", className: "col-12 my-4" },
h("div", { className: "border-bottom" }) h("div", { className: "border-bottom" })
), ),
h( h(
"div", "div",
{ {
key: "body-content", key: "body-content",
className: "col-12 mb-5 content content-justify", className: "col-12 mb-5 content content-justify",
}, },
widgetFor("body") widgetFor("body")
), ),
]) ])
) )
), ),
]; ];
}; };
export default BlogPreview; export default BlogPreview;

@ -1,49 +1,49 @@
import { import {
PageHeader, PageHeader,
Section, Section,
Container, Container,
Row, Row,
Content, Content,
} from "./components/index.js"; } from "./components/index.js";
const CantorpreisPreview = ({ widgetFor, entry, fields, collection }) => { const CantorpreisPreview = ({ widgetFor, entry, fields, collection }) => {
const imageField = useMemo( const imageField = useMemo(
() => fields.find((field) => field.name === "image"), () => fields.find((field) => field.name === "image"),
[fields] [fields]
); );
const imageUrl = useMediaAsset( const imageUrl = useMediaAsset(
entry.data.image, entry.data.image,
collection, collection,
imageField, imageField,
entry entry
); );
return [ return [
PageHeader(entry), PageHeader(entry),
Section( Section(
Container( Container(
Row([ Row([
h( h(
"div", "div",
{ className: "col-md-5 mb-5" }, { className: "col-md-5 mb-5" },
h("img", { h("img", {
className: "img-fluid w-75", className: "img-fluid w-75",
src: imageUrl, src: imageUrl,
alt: entry.data.name, alt: entry.data.name,
}) })
), ),
h( h(
"div", "div",
{ className: "col-md-7 mb-5" }, { className: "col-md-7 mb-5" },
h("h3", {}, entry.data.name), h("h3", {}, entry.data.name),
h("h6", { className: "text-color" }, entry.data.title), h("h6", { className: "text-color" }, entry.data.title),
Content(widgetFor("body")) Content(widgetFor("body"))
), ),
]) ])
) )
), ),
]; ];
}; };
export default CantorpreisPreview; export default CantorpreisPreview;

@ -1,113 +1,113 @@
import { PageHeader } from "./components/index.js"; import { PageHeader } from "./components/index.js";
const ChronikIndexPreview = ({ const ChronikIndexPreview = ({
widgetFor, widgetFor,
widgetsFor, widgetsFor,
entry, entry,
fields, fields,
collection, collection,
}) => { }) => {
const imageField = useMemo( const imageField = useMemo(
() => fields.find((field) => field.name === "image"), () => fields.find((field) => field.name === "image"),
[fields] [fields]
); );
const imageUrl = useMediaAsset( const imageUrl = useMediaAsset(
widgetsFor("infocard").data.image, widgetsFor("infocard").data.image,
collection, collection,
imageField, imageField,
entry entry
); );
return [ return [
PageHeader(entry), PageHeader(entry),
h( h(
"section", "section",
{ className: "section-sm" }, { className: "section-sm" },
h("div", { className: "container" }, widgetFor("body")), h("div", { className: "container" }, widgetFor("body")),
widgetsFor("infocard").data.enable widgetsFor("infocard").data.enable
? h( ? h(
"div", "div",
{ className: "container" }, { className: "container" },
h( h(
"div", "div",
{ className: "card mb-3" }, { className: "card mb-3" },
h( h(
"div", "div",
{ className: "row g-0" }, { className: "row g-0" },
h( h(
"div", "div",
{ className: "col-md-3" }, { className: "col-md-3" },
h("img", { h("img", {
className: "img-fluid rounded w-100", className: "img-fluid rounded w-100",
src: imageUrl, src: imageUrl,
}) })
), ),
h( h(
"div", "div",
{ className: "col-md-9 d-flex align-items-center" }, { className: "col-md-9 d-flex align-items-center" },
h( h(
"div", "div",
{ className: "card-body" }, { className: "card-body" },
h( h(
"p", "p",
{ className: "h2 card-title" }, { className: "h2 card-title" },
widgetsFor("infocard").data.quote widgetsFor("infocard").data.quote
), ),
h( h(
"p", "p",
{ className: "card-text" }, { className: "card-text" },
h( h(
"small", "small",
{ className: "text-muted" }, { className: "text-muted" },
widgetsFor("infocard").data.author widgetsFor("infocard").data.author
) )
) )
) )
) )
) )
) )
) )
: null, : null,
h( h(
"div", "div",
{ className: "container" }, { className: "container" },
h("h2", { className: "section-title" }, "Informationsseiten"), h("h2", { className: "section-title" }, "Informationsseiten"),
h( h(
"div", "div",
{ className: "row" }, { className: "row" },
widgetsFor("links").map((element) => widgetsFor("links").map((element) =>
h( h(
"div", "div",
{ className: "col-lg-4 col-sm-6" }, { className: "col-lg-4 col-sm-6" },
h( h(
"div", "div",
{ {
className: "card border-primary rounded-0 hover-shadow mb-4", className: "card border-primary rounded-0 hover-shadow mb-4",
}, },
h( h(
"div", "div",
{ className: "card-body" }, { className: "card-body" },
h( h(
"h4", "h4",
{ className: "card-title text-truncate" }, { className: "card-title text-truncate" },
h("a", { href: element.data.link }, element.data.title) h("a", { href: element.data.link }, element.data.title)
), ),
h( h(
"a", "a",
{ {
className: "btn btn-primary btn-sm", className: "btn btn-primary btn-sm",
href: element.data.link, href: element.data.link,
}, },
"Mehr anzeigen" "Mehr anzeigen"
) )
) )
) )
) )
) )
) )
) )
), ),
]; ];
}; };
export default ChronikIndexPreview; export default ChronikIndexPreview;

@ -1,7 +1,7 @@
import { PageHeader } from "./components/index.js"; import { PageHeader } from "./components/index.js";
const ChronikPreview = ({ widgetFor, widgetsFor, entry, document, window }) => { const ChronikPreview = ({ widgetFor, widgetsFor, entry, document, window }) => {
/*return [PageHeader, /*return [PageHeader,
h('section', {className: "section-sm"}, h('section', {className: "section-sm"},
h('div', {className: "container"}, h('div', {className: "container"},
h('div', {className: "row"}, h('div', {className: "row"},

@ -1,5 +1,5 @@
const Section = (children) => const Section = (children) =>
h("section", { className: "section-sm" }, children); h("section", { className: "section-sm" }, children);
const Container = (children) => h("div", { className: "container" }, children); const Container = (children) => h("div", { className: "container" }, children);
const Row = (children) => h("div", { className: "row" }, children); const Row = (children) => h("div", { className: "row" }, children);
const Content = (children) => h("div", { className: "content" }, children); const Content = (children) => h("div", { className: "content" }, children);

@ -1,5 +1,5 @@
const DateFormat = ({ date, format }) => { const DateFormat = ({ date, format }) => {
return new Intl.DateTimeFormat("de-DE", format).format(new Date(date)); return new Intl.DateTimeFormat("de-DE", format).format(new Date(date));
}; };
export default DateFormat; export default DateFormat;

@ -1,51 +1,51 @@
const PageHeader = (entry) => { const PageHeader = (entry) => {
return h( return h(
"section", "section",
{ {
key: "page-header", key: "page-header",
className: "page-title-section overlay", className: "page-title-section overlay",
style: { style: {
backgroundImage: backgroundImage:
'url("/media/titelbild.webp"),url("/media/titelbild.webp")', 'url("/media/titelbild.webp"),url("/media/titelbild.webp")',
}, },
}, },
h( h(
"div", "div",
{ className: "container" }, { className: "container" },
h( h(
"div", "div",
{ className: "row" }, { className: "row" },
h( h(
"div", "div",
{ className: "col-md-8 position-relative" }, { className: "col-md-8 position-relative" },
h( h(
"ul", "ul",
{ className: "list-inline" }, { className: "list-inline" },
h( h(
"li", "li",
{ className: "list-inline-item h2" }, { className: "list-inline-item h2" },
h( h(
"font", "font",
{ className: "text-primary font-secondary", href: "" }, { className: "text-primary font-secondary", href: "" },
"Startseite" "Startseite"
) )
), ),
h( h(
"li", "li",
{ className: "list-inline-item h2" }, { className: "list-inline-item h2" },
h("i", { className: "mdi mdi-chevron-double-right text-white" }) h("i", { className: "mdi mdi-chevron-double-right text-white" })
), ),
h( h(
"li", "li",
{ className: "list-inline-item text-white h2 font-secondary" }, { className: "list-inline-item text-white h2 font-secondary" },
entry.data.title entry.data.title
) )
), ),
h("p", { className: "text-lighten" }, entry.data.description) h("p", { className: "text-lighten" }, entry.data.description)
) )
) )
) )
); );
}; };
export default PageHeader; export default PageHeader;

@ -1,65 +1,64 @@
import { Container, PageHeader, Row, Section } from "./components/index.js"; import { Container, PageHeader, Row, Section } from "./components/index.js";
const ContestPreview = ({ widgetFor, entry, fields, collection }) => { const ContestPreview = ({ widgetFor, entry, fields, collection }) => {
const imageField = useMemo(() => { const imageField = useMemo(() => {
return fields.find((field) => field.name === "image"); return fields.find((field) => field.name === "image");
}, [fields]); }, [fields]);
const imageUrl = useMediaAsset( const imageUrl = useMediaAsset(
entry.data.image, entry.data.image,
collection, collection,
imageField, imageField,
entry entry
); );
return [ return [
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", { className: "col-12 mb-4" },
{ className: "col-12 mb-4" }, h("img", { className: "img-fluid w-100", src: imageUrl })
h("img", { className: "img-fluid w-100", src: imageUrl }) )
) )
) : null,
: null, h(
h( "div",
"div", { className: "row mb-4" },
{ className: "row mb-4" }, h(
h( "div",
"div", { className: "col-7" },
{ className: "col-7" }, h(
h( "div",
"div", { className: "d-flex align-items-center" },
{ className: "d-flex align-items-center" }, h("i", { className: "mdi mdi-crowd text-primary icon-md me-2" }),
h("i", { className: "mdi mdi-crowd text-primary icon-md me-2" }), h(
h( "div",
"div", { className: "text-start" },
{ className: "text-start" }, h("h6", { className: "mb-0" }, "KLASSE(N)"),
h("h6", { className: "mb-0" }, "KLASSE(N)"), h("p", { className: "mb-0" }, entry.data.class)
h("p", { className: "mb-0" }, entry.data.class) )
) )
) ),
), entry.data.web_url
entry.data.web_url ? h(
? h( "div",
"div", { className: "col-5 text-end mb-4 mb-xl-0" },
{ className: "col-5 text-end mb-4 mb-xl-0" }, h("a", { className: "btn btn-primary" }, "Website")
h("a", { className: "btn btn-primary" }, "Website") )
) : null,
: null, h(
h( "div",
"div", { className: "col-12 mt-4" },
{ className: "col-12 mt-4" }, h("div", { className: "border-bottom border-primary" })
h("div", { className: "border-bottom border-primary" }) )
) ),
), Row(h("div", { className: "col-12 content" }, widgetFor("body"))),
Row(h("div", { className: "col-12 content" }, widgetFor("body"))), ])
]) ),
), ];
];
}; };
export default ContestPreview; export default ContestPreview;

@ -1,147 +1,147 @@
import { PageHeader, DateFormat } from "./components/index.js"; import { PageHeader, DateFormat } from "./components/index.js";
function isFuture(date, enddate) { function isFuture(date, enddate) {
let date1 = new Date(date ? date : 0); let date1 = new Date(date ? date : 0);
let date2 = new Date(enddate ? enddate : 0); let date2 = new Date(enddate ? enddate : 0);
let present = new Date(); let present = new Date();
if (date1 >= present || date2 >= present) { if (date1 >= present || date2 >= present) {
return true; return true;
} else { } else {
return false; return false;
} }
} }
const EventPreview = ({ widgetsFor, entry }) => { const EventPreview = ({ widgetsFor, entry }) => {
return [ return [
PageHeader(entry), PageHeader(entry),
h( h(
"section", "section",
{ className: "section-sm" }, { className: "section-sm" },
h( h(
"div", "div",
{ className: "container" }, { className: "container" },
h( h(
"div", "div",
{ className: "row" }, { className: "row" },
h( h(
"div", "div",
{ className: "col-12" }, { className: "col-12" },
h( h(
"div", "div",
{ className: "row" }, { className: "row" },
h( h(
"div", "div",
{ className: "col-12" }, { className: "col-12" },
h( h(
"ul", "ul",
{ className: "list-inline text-center filter-controls mb-5" }, { className: "list-inline text-center filter-controls mb-5" },
h( h(
"li", "li",
{ className: "list-inline-item m-3 text-uppercase active" }, { className: "list-inline-item m-3 text-uppercase active" },
"Alle" "Alle"
), ),
h( h(
"li", "li",
{ className: "list-inline-item m-3 text-uppercase" }, { className: "list-inline-item m-3 text-uppercase" },
"Anstehend" "Anstehend"
), ),
h( h(
"li", "li",
{ className: "list-inline-item m-3 text-uppercase" }, { className: "list-inline-item m-3 text-uppercase" },
"Vergangen" "Vergangen"
) )
) )
) )
), ),
h( h(
"div", "div",
{ className: "filtr-container" }, { className: "filtr-container" },
widgetsFor("events").map((event) => widgetsFor("events").map((event) =>
h( h(
"div", "div",
{ className: "mb-2 mt-2 col-12 filtr-item" }, { className: "mb-2 mt-2 col-12 filtr-item" },
h( h(
"div", "div",
{ {
className: className:
"card d-md-table w-100 hover-shadow border-primary ps-0 pe-0 mb-4", "card d-md-table w-100 hover-shadow border-primary ps-0 pe-0 mb-4",
}, },
h( h(
"div", "div",
{ {
className: className:
"d-md-table-cell text-center p-4 bg-primary text-white mb-4 mb-md-0 termin-tc rounded", "d-md-table-cell text-center p-4 bg-primary text-white mb-4 mb-md-0 termin-tc rounded",
}, },
h( h(
"span", "span",
{ className: "h2 d-block" }, { className: "h2 d-block" },
event.data.date != null && event.data.date != "" event.data.date != null && event.data.date != ""
? DateFormat({ ? DateFormat({
date: event.data.date, date: event.data.date,
format: { day: "numeric" }, format: { day: "numeric" },
}) })
: null : null
), ),
h( h(
"span", "span",
{ className: "d-block" }, { className: "d-block" },
event.data.date != null && event.data.date != "" event.data.date != null && event.data.date != ""
? DateFormat({ ? DateFormat({
date: event.data.date, date: event.data.date,
format: { month: "short", year: "numeric" }, format: { month: "short", year: "numeric" },
}) })
: null : null
), ),
event.data.enddate != null && event.data.enddate != "" event.data.enddate != null && event.data.enddate != ""
? [ ? [
h("br"), h("br"),
"bis " + "bis " +
DateFormat({ DateFormat({
date: event.data.enddate, date: event.data.enddate,
format: { format: {
day: "numeric", day: "numeric",
month: "short", month: "short",
year: "numeric", year: "numeric",
}, },
}), }),
] ]
: null : null
), ),
h( h(
"div", "div",
{ {
className: className:
"d-md-table-cell px-4 vertical-align-middle mb-4 mb-md-0 p-2", "d-md-table-cell px-4 vertical-align-middle mb-4 mb-md-0 p-2",
}, },
h("p", { className: "h4 mb-0 d-block" }, event.data.title) h("p", { className: "h4 mb-0 d-block" }, event.data.title)
), ),
event.data.location event.data.location
? h( ? h(
"div", "div",
{ {
className: className:
"d-md-table-cell text-end pe-md-4 p-2 vertical-align-middle", "d-md-table-cell text-end pe-md-4 p-2 vertical-align-middle",
}, },
h( h(
"p", "p",
{}, {},
h("i", { h("i", {
className: className:
"mdi mdi-map-marker-radius-outline icon-s text-primary me-2", "mdi mdi-map-marker-radius-outline icon-s text-primary me-2",
}), }),
event.data.location event.data.location
) )
) )
: null : null
) )
) )
) )
) )
) )
) )
) )
), ),
]; ];
}; };
export default EventPreview; export default EventPreview;

@ -1,64 +1,64 @@
import { PageHeader } from "./components/index.js"; import { PageHeader } from "./components/index.js";
const FormsPreview = ({ widgetsFor, widgetFor, entry }) => { const FormsPreview = ({ widgetsFor, widgetFor, entry }) => {
return [ return [
PageHeader(entry), PageHeader(entry),
h( h(
"section", "section",
{ className: "section-sm" }, { className: "section-sm" },
h( h(
"div", "div",
{ className: "container" }, { className: "container" },
h( h(
"div", "div",
{ className: "row" }, { className: "row" },
h( h(
"div", "div",
{ className: "col-12" }, { className: "col-12" },
h("h2", { className: "section-title" }, entry.data.title) h("h2", { className: "section-title" }, entry.data.title)
) )
), ),
h( h(
"div", "div",
{ className: "row" }, { className: "row" },
h( h(
"div", "div",
{ className: "col-12 content" }, { className: "col-12 content" },
widgetsFor("files").map((file) => widgetsFor("files").map((file) =>
h( h(
"div", "div",
{ className: "container mb-0" }, { className: "container mb-0" },
h( h(
"div", "div",
{ {
className: className:
"card border-primary rounded-0 hover-shadow mb-5", "card border-primary rounded-0 hover-shadow mb-5",
}, },
h( h(
"div", "div",
{ className: "card-body mb-0" }, { className: "card-body mb-0" },
h("h4", { className: "card-title" }, file.data.title), h("h4", { className: "card-title" }, file.data.title),
h( h(
"a", "a",
{ {
className: className:
"text-decoration-none btn btn-primary btn-sm mb-0", "text-decoration-none btn btn-primary btn-sm mb-0",
}, },
h("i", { h("i", {
className: "mdi mdi-tray-arrow-down mb-0 me-2", className: "mdi mdi-tray-arrow-down mb-0 me-2",
}), }),
"Download" "Download"
) )
) )
) )
) )
), ),
widgetFor("body") widgetFor("body")
) )
) )
) )
), ),
]; ];
}; };
export default FormsPreview; export default FormsPreview;

@ -1,127 +1,127 @@
import { import {
Col12, Col12,
Container, Container,
PageHeader, PageHeader,
Row, Row,
Section, Section,
} from "./components/index.js"; } from "./components/index.js";
const GanztagPreview = ({ const GanztagPreview = ({
widgetFor, widgetFor,
widgetsFor, widgetsFor,
entry, entry,
fields, fields,
collection, collection,
}) => { }) => {
const imageField = useMemo(() => { const imageField = useMemo(() => {
return fields.find((field) => field.name === "image"); return fields.find((field) => field.name === "image");
}, [fields]); }, [fields]);
const imageUrl = useMediaAsset( const imageUrl = useMediaAsset(
entry.data.image, entry.data.image,
collection, collection,
imageField, imageField,
entry entry
); );
return [ return [
PageHeader(entry), PageHeader(entry),
Section( Section(
Container([ Container([
Row( Row(
h( h(
"div", "div",
{ className: "col-12 mb-4" }, { className: "col-12 mb-4" },
h("img", { className: "img-fluid w-100", src: imageUrl }) h("img", { className: "img-fluid w-100", src: imageUrl })
) )
), ),
h("h2", {}, entry.data.title), h("h2", {}, entry.data.title),
h( h(
"div", "div",
{ className: "row align-items-center mb-4" }, { className: "row align-items-center mb-4" },
Col12( Col12(
Row([ Row([
h( h(
"div", "div",
{ className: "col-lg-3 col-sm-6 mb-3 mb-sm-0" }, { className: "col-lg-3 col-sm-6 mb-3 mb-sm-0" },
h( h(
"div", "div",
{ className: "d-flex align-items-center" }, { className: "d-flex align-items-center" },
h("i", { h("i", {
className: className:
"mdi mdi-calendar-today-outline text-primary icon-md me-2", "mdi mdi-calendar-today-outline text-primary icon-md me-2",
}), }),
h( h(
"div", "div",
{ className: "text-start" }, { className: "text-start" },
h("h6", { className: "mb-0" }, "ZEIT"), h("h6", { className: "mb-0" }, "ZEIT"),
h("p", { className: "mb-0" }, entry.data.schedule) h("p", { className: "mb-0" }, entry.data.schedule)
) )
) )
), ),
h( h(
"div", "div",
{ className: "col-lg-3 col-sm-6 mb-3 mb-sm-0" }, { className: "col-lg-3 col-sm-6 mb-3 mb-sm-0" },
h( h(
"div", "div",
{ className: "d-flex align-items-center" }, { className: "d-flex align-items-center" },
h("i", { h("i", {
className: "mdi mdi-timer-sand text-primary icon-md me-2", className: "mdi mdi-timer-sand text-primary icon-md me-2",
}), }),
h( h(
"div", "div",
{ className: "text-start" }, { className: "text-start" },
h("h6", { className: "mb-0" }, "DAUER"), h("h6", { className: "mb-0" }, "DAUER"),
h("p", { className: "mb-0" }, entry.data.duration) h("p", { className: "mb-0" }, entry.data.duration)
) )
) )
), ),
h( h(
"div", "div",
{ className: "col-lg-3 col-sm-6 mb-3 mb-sm-0" }, { className: "col-lg-3 col-sm-6 mb-3 mb-sm-0" },
h( h(
"div", "div",
{ className: "d-flex align-items-center" }, { className: "d-flex align-items-center" },
h("i", { h("i", {
className: "mdi mdi-crowd text-primary icon-md me-2", className: "mdi mdi-crowd text-primary icon-md me-2",
}), }),
h( h(
"div", "div",
{ className: "text-start" }, { className: "text-start" },
h("h6", { className: "mb-0" }, "KLASSE(N)"), h("h6", { className: "mb-0" }, "KLASSE(N)"),
h("p", { className: "mb-0" }, entry.data.class) h("p", { className: "mb-0" }, entry.data.class)
) )
) )
), ),
h( h(
"div", "div",
{ className: "col-lg-3 col-sm-6 mb-3 mb-sm-0" }, { className: "col-lg-3 col-sm-6 mb-3 mb-sm-0" },
h( h(
"div", "div",
{ className: "d-flex align-items-center" }, { className: "d-flex align-items-center" },
h("i", { h("i", {
className: className:
"mdi mdi-map-marker-radius-outline text-primary icon-md me-2", "mdi mdi-map-marker-radius-outline text-primary icon-md me-2",
}), }),
h( h(
"div", "div",
{ className: "text-start" }, { className: "text-start" },
h("h6", { className: "mb-0" }, "RAUM"), h("h6", { className: "mb-0" }, "RAUM"),
h("p", { className: "mb-0" }, entry.data.room) h("p", { className: "mb-0" }, entry.data.room)
) )
) )
), ),
]) ])
), ),
h( h(
"div", "div",
{ className: "col-12 mt-4" }, { className: "col-12 mt-4" },
h("div", { className: "border-bottom border-primary" }) h("div", { className: "border-bottom border-primary" })
) )
), ),
Row(h("div", { className: "col-12 content" }, widgetFor("body"))), Row(h("div", { className: "col-12 content" }, widgetFor("body"))),
]) ])
), ),
]; ];
}; };
export default GanztagPreview; export default GanztagPreview;

@ -19,22 +19,22 @@ import AbiturientenPreview from "./abiturienten-preview.js";
import PreviewStyles from "./styles.js"; import PreviewStyles from "./styles.js";
export { export {
AboutPreview, AboutPreview,
BlogPreview, BlogPreview,
ContestPreview, ContestPreview,
GanztagPreview, GanztagPreview,
PagePreview, PagePreview,
EventPreview, EventPreview,
AnmeldungPreview, AnmeldungPreview,
HeaderPreview, HeaderPreview,
ChronikPreview, ChronikPreview,
KontaktPreview, KontaktPreview,
AnmeldeformularPreview, AnmeldeformularPreview,
ChronikIndexPreview, ChronikIndexPreview,
AuthorPreview, AuthorPreview,
FormsPreview, FormsPreview,
CantorpreisPreview, CantorpreisPreview,
ProjektwochePreview, ProjektwochePreview,
AbiturientenPreview, AbiturientenPreview,
PreviewStyles, PreviewStyles,
}; };

@ -1,98 +1,98 @@
import { PageHeader } from "./components/index.js"; import { PageHeader } from "./components/index.js";
const KontaktPreview = ({ widgetsFor, entry }) => { const KontaktPreview = ({ widgetsFor, entry }) => {
return [ return [
PageHeader(entry), PageHeader(entry),
h( h(
"section", "section",
{ className: "section-sm bg-gray" }, { className: "section-sm bg-gray" },
h( h(
"div", "div",
{ className: "container" }, { className: "container" },
h( h(
"div", "div",
{ className: "row" }, { className: "row" },
h( h(
"div", "div",
{ className: "col-lg-6 mb-4 mb-lg-0" }, { className: "col-lg-6 mb-4 mb-lg-0" },
h( h(
"form", "form",
{}, {},
h("input", { h("input", {
className: "form-control form-control-lg mb-3", className: "form-control form-control-lg mb-3",
type: "text", type: "text",
placeholder: "Ihr Name", placeholder: "Ihr Name",
}), }),
h("input", { h("input", {
className: "form-control form-control-lg mb-3", className: "form-control form-control-lg mb-3",
type: "text", type: "text",
placeholder: "Ihre E-Mail Adresse", placeholder: "Ihre E-Mail Adresse",
}), }),
h("input", { h("input", {
className: "form-control form-control-lg mb-3", className: "form-control form-control-lg mb-3",
type: "text", type: "text",
placeholder: "Betreff", placeholder: "Betreff",
}), }),
h("textarea", { h("textarea", {
className: "form-control form-control-lg mb-3", className: "form-control form-control-lg mb-3",
placeholder: "Nachricht", placeholder: "Nachricht",
}), }),
h("button", { className: "btn btn-primary" }, "Senden") h("button", { className: "btn btn-primary" }, "Senden")
) )
), ),
h( h(
"div", "div",
{ className: "col-lg-6" }, { className: "col-lg-6" },
h( h(
"div", "div",
{ className: "card" }, { className: "card" },
h("div", { className: "card-header fw-bold" }, "Kontaktdaten"), h("div", { className: "card-header fw-bold" }, "Kontaktdaten"),
h( h(
"ul", "ul",
{ className: "list-group list-group-flush" }, { className: "list-group list-group-flush" },
widgetsFor("kontaktdaten").map((person) => widgetsFor("kontaktdaten").map((person) =>
h( h(
"li", "li",
{ className: "list-group-item" }, { className: "list-group-item" },
h("p", { className: "card-title mb-0" }, person.data.name), h("p", { className: "card-title mb-0" }, person.data.name),
h( h(
"p", "p",
{ className: "text-muted mb-0" }, { className: "text-muted mb-0" },
person.data.position person.data.position
), ),
h( h(
"p", "p",
{ className: "card-text" }, { className: "card-text" },
h("i", { h("i", {
className: "mdi mdi-email-multiple-outline me-2", className: "mdi mdi-email-multiple-outline me-2",
}), }),
person.data.email.replace("@", "(at)") person.data.email.replace("@", "(at)")
) )
) )
), ),
h( h(
"li", "li",
{ className: "list-group-item" }, { className: "list-group-item" },
h( h(
"p", "p",
{ className: "card-text" }, { className: "card-text" },
h("i", { className: "mdi mdi-phone-outline me-2" }), h("i", { className: "mdi mdi-phone-outline me-2" }),
"Telefon: +49-0345/6903156" "Telefon: +49-0345/6903156"
), ),
h( h(
"p", "p",
{ className: "card-text" }, { className: "card-text" },
h("i", { className: "mdi mdi-fax me-2" }), h("i", { className: "mdi mdi-fax me-2" }),
"Fax: +49-0345/6903157" "Fax: +49-0345/6903157"
) )
) )
) )
) )
) )
) )
) )
), ),
]; ];
}; };
export default KontaktPreview; export default KontaktPreview;

@ -1,26 +1,26 @@
import { PageHeader } from "./components/index.js"; import { PageHeader } from "./components/index.js";
const PagePreview = ({ widgetFor, entry }) => { const PagePreview = ({ widgetFor, entry }) => {
return [ return [
PageHeader(entry), PageHeader(entry),
h( h(
"section", "section",
{ className: "section-sm" }, { className: "section-sm" },
h( h(
"div", "div",
{ className: "container" }, { className: "container" },
h( h(
"div", "div",
{ className: "row" }, { className: "row" },
h( h(
"div", "div",
{ className: "col-12" }, { className: "col-12" },
h("div", { className: "content" }, widgetFor("body")) h("div", { className: "content" }, widgetFor("body"))
) )
) )
) )
), ),
]; ];
}; };
export default PagePreview; export default PagePreview;

@ -1,55 +1,55 @@
import { Container, PageHeader, Row, Section } from "./components/index.js"; import { Container, PageHeader, Row, Section } from "./components/index.js";
const ProjektwochePreview = ({ widgetsFor, widgetFor, entry }) => { const ProjektwochePreview = ({ widgetsFor, widgetFor, entry }) => {
return [ return [
PageHeader(entry), PageHeader(entry),
Section([ Section([
Container( Container(
Row(h("div", { className: "col-12 mb-4 content" }, widgetFor("body"))) Row(h("div", { className: "col-12 mb-4 content" }, widgetFor("body")))
), ),
Container( Container(
Row([ Row([
widgetsFor("tiles").map((tile) => widgetsFor("tiles").map((tile) =>
h( h(
"div", "div",
{ className: "col-lg-4 col-sm-6" }, { className: "col-lg-4 col-sm-6" },
h( h(
"div", "div",
{ {
className: "card border-primary rounded-0 hover-shadow mb-4", className: "card border-primary rounded-0 hover-shadow mb-4",
}, },
h( h(
"div", "div",
{ {
className: "container fb-tile-color", className: "container fb-tile-color",
style: { backgroundColor: tile.data.bg_color }, style: { backgroundColor: tile.data.bg_color },
}, },
h("i", { h("i", {
className: (tile.data.icon ?? "") + " fb-tile-icon", className: (tile.data.icon ?? "") + " fb-tile-icon",
style: { color: tile.data.font_color }, style: { color: tile.data.font_color },
}) })
), ),
h( h(
"div", "div",
{ className: "card-body" }, { className: "card-body" },
h( h(
"h4", "h4",
{ className: "card-title text-truncate" }, { className: "card-title text-truncate" },
tile.data.title tile.data.title
), ),
h( h(
"button", "button",
{ type: "button", className: "btn btn-primary btn-sm" }, { type: "button", className: "btn btn-primary btn-sm" },
"Mehr anzeigen" "Mehr anzeigen"
) )
) )
) )
) )
), ),
]) ])
), ),
]), ]),
]; ];
}; };
export default ProjektwochePreview; export default ProjektwochePreview;

@ -1,9 +1,9 @@
const PreviewStyles = [ const PreviewStyles = [
"https://assets.cantorgymnasium.de/bootstrap/v5/css/bootstrap.min.css", "https://assets.cantorgymnasium.de/bootstrap/v5/css/bootstrap.min.css",
"https://assets.cantorgymnasium.de/fonts/fira/fira.css", "https://assets.cantorgymnasium.de/fonts/fira/fira.css",
"https://assets.cantorgymnasium.de/fonts/ubuntu/ubuntu.css", "https://assets.cantorgymnasium.de/fonts/ubuntu/ubuntu.css",
"https://assets.cantorgymnasium.de/fonts/mdi/v7/css/materialdesignicons.min.css", "https://assets.cantorgymnasium.de/fonts/mdi/v7/css/materialdesignicons.min.css",
"https://cantorgymnasium.de/scss/style.css", "https://cantorgymnasium.de/scss/style.css",
]; ];
export default PreviewStyles; export default PreviewStyles;

@ -1,67 +1,67 @@
import { Card, TextField } from "./components/index.js"; import { Card, TextField } from "./components/index.js";
const AudioShortcode = { const AudioShortcode = {
label: "Audiodatei", label: "Audiodatei",
openTag: "{{< ", openTag: "{{< ",
closeTag: " >}}", closeTag: " >}}",
separator: " ", separator: " ",
toProps: (args) => { toProps: (args) => {
if (args.length > 0) { if (args.length > 0) {
const src = const src =
args args
.find((arg) => arg.startsWith("src=")) .find((arg) => arg.startsWith("src="))
?.split("=")[1] ?.split("=")[1]
.replaceAll('"', "") ?? ""; .replaceAll('"', "") ?? "";
return { src: src }; return { src: src };
} }
return { src: "" }; return { src: "" };
}, },
toArgs: ({ src }) => { toArgs: ({ src }) => {
return [`src=\"${src}\"`]; return [`src=\"${src}\"`];
}, },
control: ({ src, onChange, controlProps }) => { control: ({ src, onChange, controlProps }) => {
const { collection, field } = controlProps; const { collection, field } = controlProps;
const handleChange = ({ path }) => { const handleChange = ({ path }) => {
onChange({ src: path }); onChange({ src: path });
}; };
const handleOpenMediaLibrary = useMediaInsert( const handleOpenMediaLibrary = useMediaInsert(
src, src,
{ collection, field }, { collection, field },
handleChange handleChange
); );
return Card([ return Card([
TextField({ TextField({
label: "Audiodatei", label: "Audiodatei",
value: src, value: src,
onChange: (event) => { onChange: (event) => {
onChange({ src: event.target.value }); onChange({ src: event.target.value });
}, },
}), }),
h( h(
"span", "span",
{ key: "audio-button", className: "flex gap-2 pt-2 px-2" }, { key: "audio-button", className: "flex gap-2 pt-2 px-2" },
h( h(
"button", "button",
{ {
type: "button", type: "button",
onClick: handleOpenMediaLibrary, onClick: handleOpenMediaLibrary,
className: "btn btn-contained-primary", className: "btn btn-contained-primary",
}, },
"wählen" "wählen"
) )
), ),
]); ]);
}, },
preview: ({ src }) => { preview: ({ src }) => {
return h( return h(
"div", "div",
{ className: "card" }, { className: "card" },
h("audio", { src: src, controls: true }) h("audio", { src: src, controls: true })
); );
}, },
}; };
export default AudioShortcode; export default AudioShortcode;

@ -1,75 +1,75 @@
import { Card, TextField } from "./components/index.js"; import { Card, TextField } from "./components/index.js";
const CardShortcode = { const CardShortcode = {
label: "Link-Karte", label: "Link-Karte",
openTag: "{{< ", openTag: "{{< ",
closeTag: " >}}", closeTag: " >}}",
separator: " ", separator: " ",
toProps: (args) => { toProps: (args) => {
if (args.length > 0) { if (args.length > 0) {
var title = ""; var title = "";
var link = ""; var link = "";
const linkIndex = args.findIndex((arg) => arg.startsWith('link="')); const linkIndex = args.findIndex((arg) => arg.startsWith('link="'));
const titleIndex = args.findIndex((arg) => arg.startsWith('title="')); const titleIndex = args.findIndex((arg) => arg.startsWith('title="'));
for (let arg of args.slice(titleIndex, linkIndex)) { for (let arg of args.slice(titleIndex, linkIndex)) {
title += " " + arg.replaceAll("title=", "").replaceAll('"', ""); title += " " + arg.replaceAll("title=", "").replaceAll('"', "");
} }
for (let arg of args.slice(linkIndex)) { for (let arg of args.slice(linkIndex)) {
link += " " + arg.replaceAll("link=", "").replaceAll('"', ""); link += " " + arg.replaceAll("link=", "").replaceAll('"', "");
} }
return { title: title.trim(), link: link.trim() }; return { title: title.trim(), link: link.trim() };
} }
return { title: "", link: "" }; return { title: "", link: "" };
}, },
toArgs: ({ title, link }) => { toArgs: ({ title, link }) => {
return [`title=\"${title}\"`, `link=\"${link}\"`]; return [`title=\"${title}\"`, `link=\"${link}\"`];
}, },
control: ({ title, link, onChange }) => { control: ({ title, link, onChange }) => {
return Card([ return Card([
TextField({ TextField({
label: "Titel", label: "Titel",
value: title, value: title,
onChange: (event) => { onChange: (event) => {
onChange({ title: event.target.value, link }); onChange({ title: event.target.value, link });
}, },
}), }),
TextField({ TextField({
label: "Link", label: "Link",
value: link, value: link,
onChange: (event) => { onChange: (event) => {
onChange({ title, link: event.target.value }); onChange({ title, link: event.target.value });
}, },
}), }),
]); ]);
}, },
preview: ({ title, link }) => { preview: ({ title, link }) => {
return h( return h(
"div", "div",
{ className: "container mb-0" }, { className: "container mb-0" },
h( h(
"div", "div",
{ className: "card border-primary rounded-0 hover-shadow mb-5" }, { className: "card border-primary rounded-0 hover-shadow mb-5" },
h( h(
"div", "div",
{ className: "card-body mb-0" }, { className: "card-body mb-0" },
h( h(
"h4", "h4",
{ className: "card-title" }, { className: "card-title" },
h("a", { className: "text-decoration-none", href: link }, title) h("a", { className: "text-decoration-none", href: link }, title)
), ),
h( h(
"a", "a",
{ {
className: "mb-0 btn btn-primary btn-sm text-decoration-none", className: "mb-0 btn btn-primary btn-sm text-decoration-none",
href: link, href: link,
}, },
"Mehr anzeigen" "Mehr anzeigen"
) )
) )
) )
); );
}, },
}; };
export default CardShortcode; export default CardShortcode;

Some files were not shown because too many files have changed in this diff Show More