CMS refactor

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

@ -12,7 +12,8 @@
<div class="row mb-3">
<div class="col-6 mb-md-0 text-light">
<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 }}
{{ .Title }}
{{ else }}

@ -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');">
<div class="card-body d-flex flex-column">
<div class="row mb-2">
<div class="col-6">
<div class="col-12">
<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 }}
{{ .Title }}
{{ else }}
@ -140,7 +141,7 @@
</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">
{{ .Render "card" }}
</div>
@ -194,7 +195,7 @@
</div>
</div>
<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">
{{ .Render "ganztag" }}
</div>
@ -258,7 +259,7 @@
{{ end }}
{{ end }}
{{ range first 3 $events }}
{{ range first (int $data.homepage.termine.number) $events }}
{{ partial "termin" . }}
{{ end }}

File diff suppressed because it is too large Load Diff

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

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

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

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

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

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

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

@ -5,17 +5,19 @@ const ChronikseitenCollection = {
name: "chronikseiten",
label: "Chronikseiten",
label_singular: "Zusatzseite (Chronik)",
description: "Chronikseiten entsprechen von der Funktionalität herkömmlichen Zusatzseiten, sind allerdings der Schulchronik vorbehalten.",
description:
"Chronikseiten entsprechen von der Funktionalität herkömmlichen Zusatzseiten, sind allerdings der Schulchronik vorbehalten.",
icon: "page-add",
folder: "content/german/chronikseiten",
create: true,
editor: {
preview: true,
frame: true
frame: true,
size: "half",
},
filter: {
field: "type",
value: "pages"
value: "pages",
},
summary_fields: ["title", "draft", "aliases", "body"],
fields: [
@ -26,7 +28,7 @@ const ChronikseitenCollection = {
name: "type",
label: "Typ",
widget: "hidden",
default: "pages"
default: "pages",
},
{
name: "aliases",
@ -39,18 +41,18 @@ const ChronikseitenCollection = {
{
name: "alias",
label: "Alias",
widget: "string"
}
]
widget: "string",
},
],
},
{
name: "body",
label: "Text",
label: "Inhalt",
widget: "markdown",
required: false,
...MarkdownProps
}
]
}
...MarkdownProps,
},
],
};
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 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 SuperhaufenCollection from "./superhaufen.js";
import CantorpreisCollection from "./cantorpreis.js";
import AbiturientenCollection from "./abiturienten.js";
import CantorforaCollection from "./cantorfora.js";
import ChronikseitenCollection from "./chronikseiten.js";
import StatsCollection from "./stats.js";
export { SettingsCollection, ChronikjahreCollection, SuperhaufenCollection, CantorpreisCollection, AbiturientenCollection, CantorforaCollection, ChronikseitenCollection };
export {
SettingsCollection,
IndexPagesCollection,
PagesCollection,
AuthorCollection,
BlogCollection,
FormsCollection,
GanztagCollection,
WettbewerbeCollection,
BegabteCollection,
ProjektwocheCollection,
ChronikjahreCollection,
SuperhaufenCollection,
CantorpreisCollection,
AbiturientenCollection,
CantorforaCollection,
ChronikseitenCollection,
StatsCollection,
};

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

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

File diff suppressed because it is too large Load Diff

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

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

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

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

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

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

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

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

@ -34,4 +34,3 @@ const IconNames = {
}
export default Icons;

@ -3,8 +3,14 @@
<head>
<meta charset="utf-8" />
<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 rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@staticcms/app@^2.0.0/dist/main.css" />
<link
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>
</head>
<body>
@ -52,15 +58,15 @@
import Icons from "./icons.js";
// cms initialization
CMS.init();
CMS.init({ config });
// preview templates
CMS.registerPreviewTemplate("about-index", AboutPreview);
CMS.registerPreviewTemplate("blog", BlogPreview);
CMS.registerPreviewTemplate("wettbewerbe", ContestPreview);
CMS.registerPreviewTemplate("ganztagsangebote", GanztagPreview);
CMS.registerPreviewTemplate("contact-index", KontaktPreview);
CMS.registerPreviewTemplate("event-index", EventPreview);
CMS.registerPreviewTemplate("kontakt", KontaktPreview);
CMS.registerPreviewTemplate("termine", EventPreview);
CMS.registerPreviewTemplate("anmeldung-index", AnmeldungPreview);
CMS.registerPreviewTemplate("chronikjahre", ChronikPreview);
CMS.registerPreviewTemplate("anmeldeformular", AnmeldeformularPreview);
@ -116,7 +122,6 @@
Icons.forEach((i) => CMS.registerIcon(i.name, i.icon));
// field previews
CMS.registerFieldPreview("author", "active", BooleanPreview);
CMS.registerFieldPreview("author", "simplified", BooleanPreview);
CMS.registerFieldPreview("blog", "date", DatePreview);
@ -141,8 +146,15 @@
].forEach((collection) =>
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",
@ -154,8 +166,8 @@
"blog-index",
"about-index",
"anmeldung-index",
"contact-index",
"event-index",
"kontakt",
"termine",
"forms-index",
"ganztagsangebote-index",
"begabte-index",
@ -166,6 +178,27 @@
["chronikseiten", "blog"].forEach((collection) =>
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>
</body>
</html>

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

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

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

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

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