From b66a27e3b9b4421896e63fb574320f9d285a4808 Mon Sep 17 00:00:00 2001 From: Denys Konovalov Date: Mon, 29 May 2023 16:22:34 +0200 Subject: [PATCH] CMS refactor --- config.yml | 9 +- ...prachen-preisverleihung-auf-landesebene.md | 3 +- content/german/blog/cantor-luft-schnuppern.md | 3 +- .../german/blog/cantorpreisverleihung-2023.md | 3 +- .../chemie-modulkurs-2023-der-11-klassen.md | 3 +- content/german/blog/chemie-modulwoche-2023.md | 3 +- .../erfolge-bei-den-biologie-wettbewerben.md | 3 +- ...olge-bei-der-landesphysikolympiade-2023.md | 3 +- ...beim-german-young-physicists-tournament.md | 3 +- ...e-in-der-1-runde-der-chemkids-2022-2023.md | 3 +- ...ergebnisse-3-runde-der-icho-bundesrunde.md | 3 +- ...ergebnisse-3-runde-der-ipho-bundesrunde.md | 3 +- content/german/blog/festwoche-2023.md | 3 +- ...en-homepage-des-georg-cantor-gymnasiums.md | 3 +- ...pressionen-vom-tag-der-offenen-tür-2022.md | 3 +- content/german/blog/informatik-biber-2022.md | 3 +- .../jugend-forscht-das-bundesfinale-2023.md | 3 +- ...scht-ergebnisse-der-regionalrunde-halle.md | 3 +- .../jugend-forscht-landeswettbewerb-2023.md | 3 +- .../blog/kanguru-der-mathematik-2023.md | 3 +- ...landeswettbewerb-jugend-debattiert-2023.md | 3 +- .../lernfahrt-geschichte-nach-heldrungen.md | 3 +- content/german/blog/mathe-im-advent-2022.md | 3 +- .../mathematik-olympiade-landesrunde-2023.md | 3 +- ...tzter-schultag-des-abiturjahrgangs-2023.md | 3 +- .../musikalisch-literarischer-abend-2023.md | 3 +- content/german/blog/musikfahrt-2022.md | 3 +- .../regionalwettbewerb-jugend-debattiert.md | 3 +- .../german/blog/rezitatorenwettstreit-2023.md | 3 +- .../blog/schulausscheid-jugend-debattiert.md | 3 +- content/german/blog/skilager-2023.md | 3 +- content/german/blog/spezialistenlager-2023.md | 3 +- content/german/blog/tag-der-kulturen-2023.md | 3 +- .../german/blog/toefl-englisch-wettbewerb.md | 3 +- ...nsparenzbericht-weihnachtsbasar-spenden.md | 3 +- ...ettbewerb-der-6-klassen-2022-schulrunde.md | 3 +- content/german/blog/weihnachten-2022.md | 3 +- .../wettbewerbserfolg-der-letzten-wochen.md | 3 +- data/de/ausblick.yml | 3 +- data/de/homepage.yml | 29 +- layouts/_default/card.html | 3 +- layouts/_default/single.html | 5 +- layouts/index.html | 11 +- static/admin/config.yml | 1139 ----------------- .../admin/config/collections/abiturienten.js | 92 +- static/admin/config/collections/author.js | 100 ++ static/admin/config/collections/begabte.js | 62 + static/admin/config/collections/blog.js | 114 ++ static/admin/config/collections/cantorfora.js | 126 +- .../admin/config/collections/cantorpreis.js | 116 +- .../admin/config/collections/chronikjahre.js | 195 +-- .../admin/config/collections/chronikseiten.js | 100 +- static/admin/config/collections/forms.js | 65 + static/admin/config/collections/ganztag.js | 92 ++ .../admin/config/collections/index-pages.js | 347 +++++ static/admin/config/collections/index.js | 30 +- static/admin/config/collections/pages.js | 58 + .../admin/config/collections/projektwoche.js | 73 ++ .../config/collections/settings-collection.js | 1100 ++++++++++++++-- static/admin/config/collections/statistik.js | 78 -- static/admin/config/collections/stats.js | 83 ++ .../admin/config/collections/superhaufen.js | 180 +-- .../admin/config/collections/wettbewerbe.js | 73 ++ static/admin/config/collections/widgets.js | 96 +- static/admin/config/index.js | 98 +- static/admin/config/props.js | 121 +- static/admin/config/schulchronik.js | 84 +- static/admin/icons.js | 71 +- static/admin/index.html | 53 +- static/admin/links/index.js | 2 +- static/admin/links/status.js | 26 +- static/admin/links/wiki.js | 12 +- .../field-previews/boolean-preview.js | 6 +- .../field-previews/components/truncate.js | 10 +- .../previews/field-previews/date-preview.js | 20 +- .../previews/field-previews/draft-preview.js | 36 +- static/admin/previews/field-previews/index.js | 8 +- .../page-previews/abiturienten-preview.js | 50 +- .../previews/page-previews/about-preview.js | 114 +- .../page-previews/anmeldeformular-preview.js | 306 ++--- .../page-previews/anmeldung-preview.js | 76 +- .../previews/page-previews/author-preview.js | 128 +- .../previews/page-previews/blog-preview.js | 162 +-- .../page-previews/cantorpreis-preview.js | 80 +- .../page-previews/chronik-index-preview.js | 210 +-- .../previews/page-previews/chronik-preview.js | 2 +- .../previews/page-previews/components/base.js | 2 +- .../page-previews/components/date-format.js | 2 +- .../page-previews/components/page-header.js | 94 +- .../previews/page-previews/contest-preview.js | 115 +- .../previews/page-previews/event-preview.js | 276 ++-- .../previews/page-previews/forms-preview.js | 116 +- .../previews/page-previews/ganztag-preview.js | 236 ++-- static/admin/previews/page-previews/index.js | 36 +- .../previews/page-previews/kontakt-preview.js | 184 +-- .../previews/page-previews/page-preview.js | 40 +- .../page-previews/projektwoche-preview.js | 98 +- static/admin/previews/page-previews/styles.js | 10 +- static/admin/shortcodes/audio.js | 116 +- static/admin/shortcodes/card.js | 136 +- static/admin/shortcodes/components/card.js | 18 +- static/admin/shortcodes/components/image.js | 76 +- .../admin/shortcodes/components/text-field.js | 36 +- static/admin/shortcodes/download.js | 138 +- static/admin/shortcodes/gallery.js | 128 +- static/admin/shortcodes/image.js | 106 +- static/admin/shortcodes/index.js | 14 +- static/admin/shortcodes/slider.js | 128 +- static/admin/shortcodes/youtube.js | 104 +- static/schulchronik/admin/index.html | 30 +- 110 files changed, 4668 insertions(+), 3736 deletions(-) delete mode 100644 static/admin/config.yml create mode 100644 static/admin/config/collections/author.js create mode 100644 static/admin/config/collections/begabte.js create mode 100644 static/admin/config/collections/blog.js create mode 100644 static/admin/config/collections/forms.js create mode 100644 static/admin/config/collections/ganztag.js create mode 100644 static/admin/config/collections/index-pages.js create mode 100644 static/admin/config/collections/pages.js create mode 100644 static/admin/config/collections/projektwoche.js delete mode 100644 static/admin/config/collections/statistik.js create mode 100644 static/admin/config/collections/stats.js create mode 100644 static/admin/config/collections/wettbewerbe.js diff --git a/config.yml b/config.yml index 42bc2df5..7df48d22 100644 --- a/config.yml +++ b/config.yml @@ -268,12 +268,13 @@ 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)." - impressumURL: pages/impressum - dseURL: pages/datenschutz + params: + home: Startseite + impressumURL: pages/impressum + dseURL: pages/datenschutz privacy: disqus: disable: true diff --git a/content/german/blog/bundeswettbewerb-fremdsprachen-preisverleihung-auf-landesebene.md b/content/german/blog/bundeswettbewerb-fremdsprachen-preisverleihung-auf-landesebene.md index e24066f3..c7bb79f1 100644 --- a/content/german/blog/bundeswettbewerb-fremdsprachen-preisverleihung-auf-landesebene.md +++ b/content/german/blog/bundeswettbewerb-fremdsprachen-preisverleihung-auf-landesebene.md @@ -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 diff --git a/content/german/blog/cantor-luft-schnuppern.md b/content/german/blog/cantor-luft-schnuppern.md index 548024cd..0018b4e9 100644 --- a/content/german/blog/cantor-luft-schnuppern.md +++ b/content/german/blog/cantor-luft-schnuppern.md @@ -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: [] diff --git a/content/german/blog/cantorpreisverleihung-2023.md b/content/german/blog/cantorpreisverleihung-2023.md index 2af83791..0c9a2e4e 100644 --- a/content/german/blog/cantorpreisverleihung-2023.md +++ b/content/german/blog/cantorpreisverleihung-2023.md @@ -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 diff --git a/content/german/blog/chemie-modulkurs-2023-der-11-klassen.md b/content/german/blog/chemie-modulkurs-2023-der-11-klassen.md index a2e40c31..02193654 100644 --- a/content/german/blog/chemie-modulkurs-2023-der-11-klassen.md +++ b/content/german/blog/chemie-modulkurs-2023-der-11-klassen.md @@ -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: diff --git a/content/german/blog/chemie-modulwoche-2023.md b/content/german/blog/chemie-modulwoche-2023.md index ab704201..8eeada01 100644 --- a/content/german/blog/chemie-modulwoche-2023.md +++ b/content/german/blog/chemie-modulwoche-2023.md @@ -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: diff --git a/content/german/blog/erfolge-bei-den-biologie-wettbewerben.md b/content/german/blog/erfolge-bei-den-biologie-wettbewerben.md index 7e41bda1..bdb1e2b1 100644 --- a/content/german/blog/erfolge-bei-den-biologie-wettbewerben.md +++ b/content/german/blog/erfolge-bei-den-biologie-wettbewerben.md @@ -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 diff --git a/content/german/blog/erfolge-bei-der-landesphysikolympiade-2023.md b/content/german/blog/erfolge-bei-der-landesphysikolympiade-2023.md index 225ec426..2ee4694c 100644 --- a/content/german/blog/erfolge-bei-der-landesphysikolympiade-2023.md +++ b/content/german/blog/erfolge-bei-der-landesphysikolympiade-2023.md @@ -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 diff --git a/content/german/blog/erfolge-beim-german-young-physicists-tournament.md b/content/german/blog/erfolge-beim-german-young-physicists-tournament.md index 899f750d..283e555b 100644 --- a/content/german/blog/erfolge-beim-german-young-physicists-tournament.md +++ b/content/german/blog/erfolge-beim-german-young-physicists-tournament.md @@ -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 diff --git a/content/german/blog/erfolge-in-der-1-runde-der-chemkids-2022-2023.md b/content/german/blog/erfolge-in-der-1-runde-der-chemkids-2022-2023.md index 5f75c55c..3719c749 100644 --- a/content/german/blog/erfolge-in-der-1-runde-der-chemkids-2022-2023.md +++ b/content/german/blog/erfolge-in-der-1-runde-der-chemkids-2022-2023.md @@ -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 diff --git a/content/german/blog/ergebnisse-3-runde-der-icho-bundesrunde.md b/content/german/blog/ergebnisse-3-runde-der-icho-bundesrunde.md index 17437d98..d519dfac 100644 --- a/content/german/blog/ergebnisse-3-runde-der-icho-bundesrunde.md +++ b/content/german/blog/ergebnisse-3-runde-der-icho-bundesrunde.md @@ -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 diff --git a/content/german/blog/ergebnisse-3-runde-der-ipho-bundesrunde.md b/content/german/blog/ergebnisse-3-runde-der-ipho-bundesrunde.md index bc994ba0..8a2fce0d 100644 --- a/content/german/blog/ergebnisse-3-runde-der-ipho-bundesrunde.md +++ b/content/german/blog/ergebnisse-3-runde-der-ipho-bundesrunde.md @@ -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 diff --git a/content/german/blog/festwoche-2023.md b/content/german/blog/festwoche-2023.md index 2006c297..076268c7 100644 --- a/content/german/blog/festwoche-2023.md +++ b/content/german/blog/festwoche-2023.md @@ -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 diff --git a/content/german/blog/herzlich-willkommen-auf-der-neuen-homepage-des-georg-cantor-gymnasiums.md b/content/german/blog/herzlich-willkommen-auf-der-neuen-homepage-des-georg-cantor-gymnasiums.md index 7c06d0d9..38019ac8 100644 --- a/content/german/blog/herzlich-willkommen-auf-der-neuen-homepage-des-georg-cantor-gymnasiums.md +++ b/content/german/blog/herzlich-willkommen-auf-der-neuen-homepage-des-georg-cantor-gymnasiums.md @@ -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 diff --git a/content/german/blog/impressionen-vom-tag-der-offenen-tür-2022.md b/content/german/blog/impressionen-vom-tag-der-offenen-tür-2022.md index 67e30f05..a18966dc 100644 --- a/content/german/blog/impressionen-vom-tag-der-offenen-tür-2022.md +++ b/content/german/blog/impressionen-vom-tag-der-offenen-tür-2022.md @@ -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: [] diff --git a/content/german/blog/informatik-biber-2022.md b/content/german/blog/informatik-biber-2022.md index beaa939b..d66f0dda 100644 --- a/content/german/blog/informatik-biber-2022.md +++ b/content/german/blog/informatik-biber-2022.md @@ -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 diff --git a/content/german/blog/jugend-forscht-das-bundesfinale-2023.md b/content/german/blog/jugend-forscht-das-bundesfinale-2023.md index c2e4537f..92b37255 100644 --- a/content/german/blog/jugend-forscht-das-bundesfinale-2023.md +++ b/content/german/blog/jugend-forscht-das-bundesfinale-2023.md @@ -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 diff --git a/content/german/blog/jugend-forscht-ergebnisse-der-regionalrunde-halle.md b/content/german/blog/jugend-forscht-ergebnisse-der-regionalrunde-halle.md index 6d5c93c8..936d0335 100644 --- a/content/german/blog/jugend-forscht-ergebnisse-der-regionalrunde-halle.md +++ b/content/german/blog/jugend-forscht-ergebnisse-der-regionalrunde-halle.md @@ -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 diff --git a/content/german/blog/jugend-forscht-landeswettbewerb-2023.md b/content/german/blog/jugend-forscht-landeswettbewerb-2023.md index 03c95ca4..cb154148 100644 --- a/content/german/blog/jugend-forscht-landeswettbewerb-2023.md +++ b/content/german/blog/jugend-forscht-landeswettbewerb-2023.md @@ -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 diff --git a/content/german/blog/kanguru-der-mathematik-2023.md b/content/german/blog/kanguru-der-mathematik-2023.md index 01c3b76c..a920a589 100644 --- a/content/german/blog/kanguru-der-mathematik-2023.md +++ b/content/german/blog/kanguru-der-mathematik-2023.md @@ -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 diff --git a/content/german/blog/landeswettbewerb-jugend-debattiert-2023.md b/content/german/blog/landeswettbewerb-jugend-debattiert-2023.md index 2da0a5cf..d9b0320a 100644 --- a/content/german/blog/landeswettbewerb-jugend-debattiert-2023.md +++ b/content/german/blog/landeswettbewerb-jugend-debattiert-2023.md @@ -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 diff --git a/content/german/blog/lernfahrt-geschichte-nach-heldrungen.md b/content/german/blog/lernfahrt-geschichte-nach-heldrungen.md index cf5bc1d9..c806180d 100644 --- a/content/german/blog/lernfahrt-geschichte-nach-heldrungen.md +++ b/content/german/blog/lernfahrt-geschichte-nach-heldrungen.md @@ -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: diff --git a/content/german/blog/mathe-im-advent-2022.md b/content/german/blog/mathe-im-advent-2022.md index 86a7f1bc..72e9b621 100644 --- a/content/german/blog/mathe-im-advent-2022.md +++ b/content/german/blog/mathe-im-advent-2022.md @@ -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 diff --git a/content/german/blog/mathematik-olympiade-landesrunde-2023.md b/content/german/blog/mathematik-olympiade-landesrunde-2023.md index e0dbd71c..9e38c523 100644 --- a/content/german/blog/mathematik-olympiade-landesrunde-2023.md +++ b/content/german/blog/mathematik-olympiade-landesrunde-2023.md @@ -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 diff --git a/content/german/blog/mottowoche-und-letzter-schultag-des-abiturjahrgangs-2023.md b/content/german/blog/mottowoche-und-letzter-schultag-des-abiturjahrgangs-2023.md index b8779c41..174578a7 100644 --- a/content/german/blog/mottowoche-und-letzter-schultag-des-abiturjahrgangs-2023.md +++ b/content/german/blog/mottowoche-und-letzter-schultag-des-abiturjahrgangs-2023.md @@ -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: diff --git a/content/german/blog/musikalisch-literarischer-abend-2023.md b/content/german/blog/musikalisch-literarischer-abend-2023.md index 6324d598..5f496b05 100644 --- a/content/german/blog/musikalisch-literarischer-abend-2023.md +++ b/content/german/blog/musikalisch-literarischer-abend-2023.md @@ -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 diff --git a/content/german/blog/musikfahrt-2022.md b/content/german/blog/musikfahrt-2022.md index a4ee733f..7a13a48d 100644 --- a/content/german/blog/musikfahrt-2022.md +++ b/content/german/blog/musikfahrt-2022.md @@ -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 diff --git a/content/german/blog/regionalwettbewerb-jugend-debattiert.md b/content/german/blog/regionalwettbewerb-jugend-debattiert.md index a4974c9b..6bbf273d 100644 --- a/content/german/blog/regionalwettbewerb-jugend-debattiert.md +++ b/content/german/blog/regionalwettbewerb-jugend-debattiert.md @@ -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 diff --git a/content/german/blog/rezitatorenwettstreit-2023.md b/content/german/blog/rezitatorenwettstreit-2023.md index 26210af6..7187ca52 100644 --- a/content/german/blog/rezitatorenwettstreit-2023.md +++ b/content/german/blog/rezitatorenwettstreit-2023.md @@ -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 diff --git a/content/german/blog/schulausscheid-jugend-debattiert.md b/content/german/blog/schulausscheid-jugend-debattiert.md index 35b956ad..5c70553a 100644 --- a/content/german/blog/schulausscheid-jugend-debattiert.md +++ b/content/german/blog/schulausscheid-jugend-debattiert.md @@ -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 diff --git a/content/german/blog/skilager-2023.md b/content/german/blog/skilager-2023.md index eba177f5..7eec51a2 100644 --- a/content/german/blog/skilager-2023.md +++ b/content/german/blog/skilager-2023.md @@ -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 diff --git a/content/german/blog/spezialistenlager-2023.md b/content/german/blog/spezialistenlager-2023.md index 38edb195..47693472 100644 --- a/content/german/blog/spezialistenlager-2023.md +++ b/content/german/blog/spezialistenlager-2023.md @@ -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 diff --git a/content/german/blog/tag-der-kulturen-2023.md b/content/german/blog/tag-der-kulturen-2023.md index bec7364e..e1ab5fc6 100644 --- a/content/german/blog/tag-der-kulturen-2023.md +++ b/content/german/blog/tag-der-kulturen-2023.md @@ -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 diff --git a/content/german/blog/toefl-englisch-wettbewerb.md b/content/german/blog/toefl-englisch-wettbewerb.md index dc9456c2..5c89594b 100644 --- a/content/german/blog/toefl-englisch-wettbewerb.md +++ b/content/german/blog/toefl-englisch-wettbewerb.md @@ -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 diff --git a/content/german/blog/transparenzbericht-weihnachtsbasar-spenden.md b/content/german/blog/transparenzbericht-weihnachtsbasar-spenden.md index db6db378..0b41adf6 100644 --- a/content/german/blog/transparenzbericht-weihnachtsbasar-spenden.md +++ b/content/german/blog/transparenzbericht-weihnachtsbasar-spenden.md @@ -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: diff --git a/content/german/blog/vorlesewettbewerb-der-6-klassen-2022-schulrunde.md b/content/german/blog/vorlesewettbewerb-der-6-klassen-2022-schulrunde.md index fe00a3ab..db2ff782 100644 --- a/content/german/blog/vorlesewettbewerb-der-6-klassen-2022-schulrunde.md +++ b/content/german/blog/vorlesewettbewerb-der-6-klassen-2022-schulrunde.md @@ -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 diff --git a/content/german/blog/weihnachten-2022.md b/content/german/blog/weihnachten-2022.md index fd81ea80..c0d2f688 100644 --- a/content/german/blog/weihnachten-2022.md +++ b/content/german/blog/weihnachten-2022.md @@ -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 diff --git a/content/german/blog/wettbewerbserfolg-der-letzten-wochen.md b/content/german/blog/wettbewerbserfolg-der-letzten-wochen.md index 22993730..108d82f9 100644 --- a/content/german/blog/wettbewerbserfolg-der-letzten-wochen.md +++ b/content/german/blog/wettbewerbserfolg-der-letzten-wochen.md @@ -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 diff --git a/data/de/ausblick.yml b/data/de/ausblick.yml index c06f9b0a..365625d7 100644 --- a/data/de/ausblick.yml +++ b/data/de/ausblick.yml @@ -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 diff --git a/data/de/homepage.yml b/data/de/homepage.yml index e3beef7e..b9f31e5a 100644 --- a/data/de/homepage.yml +++ b/data/de/homepage.yml @@ -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 diff --git a/layouts/_default/card.html b/layouts/_default/card.html index c88a8f91..66bebee5 100644 --- a/layouts/_default/card.html +++ b/layouts/_default/card.html @@ -5,7 +5,8 @@
{{ time.Format "02. Jan 2006" .PublishDate }}
- {{ 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 }} diff --git a/layouts/_default/single.html b/layouts/_default/single.html index d972e6c4..24219b3b 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -12,7 +12,8 @@
{{ i18n "posted_by" }}: - {{ 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 }} @@ -28,7 +29,7 @@
{{ i18n "category" }}: - {{ range $index, $elements:= .Params.categories }} + {{ range $index, $elements := .Params.categories }} {{ if ne $index 0 }}, {{ end }} {{ . | title }} {{ end }} diff --git a/layouts/index.html b/layouts/index.html index ab7217dd..b9507eb0 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -122,9 +122,10 @@ {{ $data.ausblick.title }}
-
+
- {{ 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 @@
- {{ range first 2 (where .Site.RegularPages "Type" "post")}} + {{ range first (int $data.homepage.blog.number) (where .Site.RegularPages "Type" "post")}}
{{ .Render "card" }}
@@ -194,7 +195,7 @@
- {{ range first 6 (where .Site.RegularPages "Type" "ganztagsangebote" | shuffle)}} + {{ range first (int $data.homepage.ganztagsangebote.number) (where .Site.RegularPages "Type" "ganztagsangebote" | shuffle)}}
{{ .Render "ganztag" }}
@@ -258,7 +259,7 @@ {{ end }} {{ end }} - {{ range first 3 $events }} + {{ range first (int $data.homepage.termine.number) $events }} {{ partial "termin" . }} {{ end }} diff --git a/static/admin/config.yml b/static/admin/config.yml deleted file mode 100644 index 13eb15d0..00000000 --- a/static/admin/config.yml +++ /dev/null @@ -1,1139 +0,0 @@ -backend: - name: gitea - repo: gcg/gcg-website - branch: master - api_root: https://git.cantorgymnasium.de/api/v1 - base_url: https://oauth.cantorgymnasium.de - commit_messages: - create: "{{collection}} {{slug}} erstellt" - update: "{{collection}} {{slug}} aktualisiert" - delete: "{{collection}} {{slug}} gelöscht" - uploadMedia: "{{path}} hochgeladen" - deleteMedia: "{{path}} gelöscht" - -local_backend: true - -media_folder: "/static/media" -public_folder: "/media" -site_url: https://cantorgymnasium.de -display_url: https://cantorgymnasium.de -locale: "de" - -media_library: - max_file_size: 10240000 - folder_support: true - -slug: - encoding: "ascii" - clean_accents: true - sanitize_replacement: "-" - -collections: - - name: "config" - icon: "settings" - label: "Konfiguration" - description: "Hier können die Basiseinstellungen der Website geändert werden. Die meisten Bereiche müssen nur in Ausnahmefällen angepasst werden." - editor: - preview: false - size: half - files: - - name: "homepage-config" - label: "Startseitenkonfiguration" - file: "data/de/homepage.yml" - fields: - - label: "Banner" - name: "top_banner" - widget: "object" - collapsed: true - summary: "{{fields.enable | ternary('aktiv', 'inaktiv')}}" - fields: - - {label: "Aktivieren", name: "enable", widget: "boolean", required: false} - - {label: "Text", name: "text", widget: "markdown", required: false} - - {label: "Farbe", name: "color", widget: "color", required: false} - - {label: "Schriftfarbe", name: "font_color", widget: "color", required: false} - - {label: "Symbol", name: "icon", widget: "string", required: false, hint: "Liste unter https://pictogrammers.com/library/mdi/"} - - label: "Zeitschaltung" - name: temporarily - widget: "object" - fields: - - {label: "Aktivieren", name: "enable", widget: "boolean", required: false} - - {label: "Startdatum", name: "start_date", widget: "datetime", required: false, date_format: "dd.MM.yyyy", time_format: false, format: "yyyy-MM-dd'T'HH:mm:ss.SSSXXX"} - - {label: "Enddatum", name: "end_date", widget: "datetime", required: false, date_format: "dd.MM.yyyy", time_format: false, format: "yyyy-MM-dd'T'HH:mm:ss.SSSXXX"} - - label: "Karusell" - name: "slider" - widget: "object" - collapsed: true - summary: "{{fields.enable | ternary('aktiv', 'inaktiv')}}" - fields: - - {label: "Aktivieren", name: "enable", widget: "boolean", required: false} - - {label: "Hintergrundbild", name: "bg_image", widget: "image", required: false } - - {label: "Titel", name: "title", widget: "string", required: false} - - label: "Elemente" - label_singular: "Element" - name: "slider_item" - widget: "list" - collapsed: true - fields: - - {label: "Inhalt", name: "content", widget: "string", required: false} - - label: "Button" - name: "button" - widget: "object" - required: false - collapsed: true - fields: - - {label: "Aktivieren", name: "enable", widget: "boolean", required: false} - - {label: "Bezeichnung", name: "label", widget: "string", required: false} - - {label: "Link", name: "link", widget: "string", required: false} - - label: "Partnerlogos (oben)" - name: "header_logos" - widget: "object" - collapsed: true - summary: "{{fields.enable | ternary('aktiv', 'inaktiv')}}" - fields: - - {label: "Aktivieren", name: "enable", widget: "boolean", required: false} - - label: "Logos" - label_singular: "Logo" - name: "logos" - widget: "list" - required: false - collapsed: true - fields: - - {label: "Titel", name: "title", widget: "string", required: false} - - {label: "Link", name: "link", widget: "string", required: false} - - {label: "Grafik", name: "image", widget: "image", required: true} - - label: "Einstiegsabschnitt" - name: "about" - widget: "object" - collapsed: true - summary: "{{fields.enable | ternary('aktiv', 'inaktiv')}}" - fields: - - {label: "Aktivieren", name: "enable", widget: "boolean", required: false} - - {label: "Titel", name: "title", widget: "string", required: false} - - {label: "Inhalt", name: "content", widget: "markdown", required: false} - - label: "Button" - name: "button" - widget: "object" - fields: - - {label: "Aktivieren", name: "enable", widget: "boolean", required: false} - - {label: "Bezeichnung", name: "label", widget: "string", required: false} - - {label: "Link", name: "link", widget: "string", required: false} - - label: "Blog-Abschnitt" - name: "blog" - widget: "object" - collapsed: true - summary: "{{fields.enable | ternary('aktiv', 'inaktiv')}}" - fields: - - {label: "Aktivieren", name: "enable", widget: "boolean", required: false} - - {label: "Titel", name: "title", widget: "string"} - - label: "Erfolge" - name: "success_banner" - widget: "object" - collapsed: true - summary: "{{fields.enable | ternary('aktiv', 'inaktiv')}}" - fields: - - {label: "Aktivieren", name: "enable", widget: "boolean", required: false} - - {label: "Bild", name: "image", widget: "image", required: false } - - label: "Elemente" - label_singular: "Element" - name: "feature_item" - widget: "list" - collapsed: true - fields: - - {label: "Bezeichnung", name: "name", widget: "string", required: false} - - {label: "Symbol", name: "icon", widget: "string", required: false, hint: "Liste unter https://pictogrammers.com/library/mdi/"} - - {label: "Bild", name: "image", widget: "image", required: false } - - {label: "Inhalt", name: "content", widget: "markdown", required: false} - - label: "Ganztagsangebote" - name: "ganztagsangebote" - widget: "object" - collapsed: true - summary: "{{fields.enable | ternary('aktiv', 'inaktiv')}}" - fields: - - {label: "Aktivieren", name: "enable", widget: "boolean", required: false} - - {label: "Titel", name: "title", widget: "string", required: false} - - label: "Button-Abschnitt" - name: "cta" - widget: "object" - collapsed: true - summary: "{{fields.enable | ternary('aktiv', 'inaktiv')}}" - fields: - - {label: "Aktivieren", name: "enable", widget: "boolean", required: false} - - {label: "Titel", name: "title", widget: "string", required: false} - - {label: "Untertitel", name: "subtitle", widget: "string", required: false} - - label: "Button" - name: "button" - widget: "object" - fields: - - {label: "Aktivieren", name: "enable", widget: "boolean", required: false} - - {label: "Bezeichnung", name: "label", widget: "string", required: false} - - {label: "Link", name: "link", widget: "string", required: false} - - label: "Informationsabschnitt" - name: "info" - widget: "object" - collapsed: true - summary: "{{fields.enable | ternary('aktiv', 'inaktiv')}}" - fields: - - {label: "Aktivieren", name: "enable", widget: "boolean", required: false} - - {label: "Hintergrundbild", name: "bg_image", widget: "image", required: false } - - {label: "Titel", name: "title", widget: "string", required: false} - - {label: "Inhalt", name: "content", widget: "markdown", required: false} - - {label: "Video-Link", name: "video_link", widget: "string", required: false} - - label: "Termine" - name: "termine" - widget: "object" - collapsed: true - summary: "{{fields.enable | ternary('aktiv', 'inaktiv')}}" - fields: - - {label: "Aktivieren", name: "enable", widget: "boolean", required: false} - - {label: "Titel", name: "title", widget: "string", required: false} - - label: "DigitalPakt-Banner" - name: "digitalpakt" - widget: "object" - collapsed: true - summary: "{{fields.enable | ternary('aktiv', 'inaktiv')}}" - fields: - - {label: "Aktivieren", name: "enable", widget: "boolean", required: false} - - {label: "Titel", name: "title", widget: "string", required: false} - - {label: "Bild", name: "image", widget: "image", required: false } - - {label: "Inhalt", name: "content", widget: "markdown", required: false} - - label: "Partnerlogos (unten)" - name: "footer_logos" - widget: "object" - collapsed: true - summary: "{{fields.enable | ternary('aktiv', 'inaktiv')}}" - fields: - - {label: "Aktivieren", name: "enable", widget: "boolean", required: false} - - label: "Logos" - label_singular: "Logo" - name: "logos" - widget: "list" - required: false - collapsed: true - fields: - - {label: "Titel", name: "title", widget: "string", required: false} - - {label: "Link", name: "link", widget: "string", required: false} - - {label: "Grafik", name: "image", widget: "image", required: true} - - name: "hugo-config" - label: "Website-Konfiguration" - file: "config.yml" - fields: - - {label: "Website-URL", name: "baseURL", widget: "string"} - - {label: "Titel", name: "title", widget: "string"} - - {label: "Elemente je Seite", name: "paginate", widget: "number", value_type: "int"} - - {label: "Länge von Zusammenfassungen", name: "summaryLength", widget: "number", value_type: "int"} - - {label: "Standardsprache in Unterordner", name: "defaultContentLanguageInSubdir", widget: "boolean", required: false} - - {label: "Standardsprache", name: "defaultContentLanguage", widget: "string"} - - {label: "Emoji", name: "enableEmoji", widget: "boolean", required: false} - - {label: "robots.txt", name: "enableRobotsTxt", widget: "boolean", required: false} - - {label: "Zeitzone", name: "timeZone", widget: "string"} - - {label: "Pfade von Akzenten und Umlauten bereinigen", name: "removePathAccents", widget: "boolean", required: false, default: true} - - label: "Markdown-Enstellungen" - name: "markup" - widget: "object" - collapsed: true - summary: '{{fields.defaultMarkdownHandler}}' - fields: - - {label: "standardmäßiger Markdown-Handler", name: "defaultMarkdownHandler", widget: "select", options: ["blackfriday", "goldmark"]} - - label: "Goldmark-Einstellungen" - name: "goldmark" - widget: "object" - fields: - - label: "Renderer-Einstellungen" - name: "renderer" - widget: "object" - fields: [{label: "Unsicheren Inhalt erlauben", name: "unsafe", widget: "boolean", required: false}] - - label: "Einstellungen" - name: "params" - widget: "object" - collapsed: true - fields: - - label: "Plugins" - name: "plugins" - widget: "object" - collapsed: true - fields: - - label: "CSS" - label_singular: "CSS-Stylesheet" - name: "css" - widget: "list" - collapsed: true - fields: - - {label: "Link", name: "link", widget: "string"} - - label: "JavaScript" - label_singular: "JS-Datei" - name: "js" - widget: "list" - collapsed: true - fields: - - {label: "Link", name: "link", widget: "string"} - - label: "JavaScript (am Seitenanfang)" - label_singular: "JS-Datei" - name: "head_js" - widget: "list" - collapsed: true - fields: - - {label: "Link", name: "link", widget: "string"} - - {label: "Logo", name: "logo", widget: "image" } - - {label: "Autor", name: "author", widget: "string"} - - {label: "Adresse", name: "address", widget: "string"} - - {label: "Route (Link)", name: "route_link", widget: "string"} - - {label: "Telefonnummer", name: "mobile", widget: "string"} - - {label: "E-Mail-Adresse", name: "email", widget: "string"} - - {label: "E-Mail-Adresse (UI-Ansicht)", name: "email_label", widget: "string"} - - {label: "Beschreibung", name: "description", widget: "string"} - - {label: "Kontakt-Titelleiste", name: "top_header", widget: "boolean"} - - label: "Vorschaubilder" - label_singular: "Vorschaubild" - name: "images" - widget: "list" - required: false - fields: - - label: "Bild-Pfad" - name: "path" - widget: "string" - - {label: "Twitter-Konto", name: "twitter", widget: "string", required: false} - - label: "Ladeanimation" - name: "preloader" - widget: "object" - collapsed: true - fields: - - {label: "Aktivieren", name: "enable", widget: "boolean", required: false} - - {label: "Logo", name: "preloader", widget: "image" } - - {label: "Ladeanimation", name: "loader", widget: "image" } - - label: "Soz. Netzwerke" - label_singular: "Soz. Netzwerk" - name: "social" - widget: "list" - collapsed: true - fields: - - {label: "Bezeichnung", name: "title", widget: "string"} - - {label: "Symbol", name: "icon", widget: "string", hint: "Liste unter https://pictogrammers.com/library/mdi/"} - - {label: "Link", name: "link", widget: "string"} - - label: "Menü" - name: "menu" - widget: "object" - collapsed: true - fields: - - label: "Hauptmenü" - label_singular: "Menüeintrag" - name: "main" - widget: "list" - collapsed: true - fields: - - {label: "Titel", name: "name", widget: "string"} - - {label: "Position", name: "weight", widget: "number", hint: "Je höher die Nummer, desto weiter unten liegt der Menüeintrag"} - - {label: "Erweitertes Menü", name: "hasChildren", widget: "boolean", required: false, hint: "Der Menüpunkt dient als Untermenü für weitere Elemente"} - - {label: "Link", name: "URL", widget: "string", required: false} - - {label: "Untermenü von", name: "parent", widget: "relation", collection: "config", file: "hugo-config", search_fields: ['menu.main.*.name'], display_fields: ['menu.main.*.name'], value_field: "menu.main.*.name", required: false, hint: "Menüeintrag, dem dieser untergeordnet ist"} - - label: "Parameter" - name: "params" - widget: "object" - collapsed: false - fields: - - {label: "Externer Link", hint: "Wird in neuem Tab geöffnet.", name: "external", widget: "boolean", default: false, required: false} - - {label: "Trennlinie", hint: "Trennlinie unter den Menüpunkt einfügen.", name: "separator", widget: "boolean", default: false, required: false} - - label: "Link-Liste" - label_singular: "Link" - name: "footer" - widget: "list" - hint: "Im Footer sichtbar" - collapsed: true - fields: - - {label: "Titel", name: "name", widget: "string"} - - {label: "Link", name: "URL", widget: "string"} - - label: "Sprachen" - name: "languages" - widget: "object" - collapsed: true - fields: - - label: "Deutsch" - name: "de" - widget: "object" - fields: - - {label: "Abkürzung", name: "languageName", widget: "string"} - - {label: "Sprachcode", name: "languageCode", widget: "string"} - - {label: "Inhalt-Ordner", name: "contentDir", widget: "string"} - - {label: "Position", name: "weight", widget: "number"} - - {label: "Startseitenbezeichnung", name: "home", widget: "string"} - - {label: "Copyright-Hinweis", name: "copyright", widget: "string"} - - {label: "Impressum-Link", name: "impressumURL", widget: "string"} - - {label: "Datenschutz-Link", name: "dseURL", widget: "string"} - - label: "Privatsphäre" - name: "privacy" - widget: "object" - collapsed: true - fields: - - label: "Disqus" - name: "disqus" - widget: "object" - fields: [{label: "Deaktivieren", name: "disable", widget: "boolean", required: false}] - - label: "Google Analytics" - name: "googleAnalytics" - widget: "object" - fields: [{label: "Deaktivieren", name: "disable", widget: "boolean", required: false}] - - label: "Instagram" - name: "instagram" - widget: "object" - fields: [{label: "Deaktivieren", name: "disable", widget: "boolean", required: false}] - - label: "Twitter" - name: "twitter" - widget: "object" - fields: [{label: "Tracking deaktivieren", name: "enableDNT", widget: "boolean", required: false}] - - label: "YouTube" - name: "youtube" - widget: "object" - fields: [{label: "Piped-Proxy", name: "privacyEnhanced", widget: "boolean", required: false}] - - label: "Vimeo" - name: "vimeo" - widget: "object" - fields: [{label: "Tracking deaktivieren", name: "enableDNT", widget: "boolean", required: false}] - - name: "categories-config" - label: "Kategorien" - file: "data/de/categories.yml" - fields: - - label: "Aktuelles" - label_singular: "Kategorie" - name: "blog" - widget: "list" - required: true - collapsed: true - fields: - - {label: "Kategorie", name: "category", widget: "string", required: true} - - label: "Ganztagsbereich" - label_singular: "Kategorie" - name: "ganztag" - widget: "list" - required: true - collapsed: true - fields: - - {label: "Kategorie", name: "category", widget: "string", required: true} - - label: "Wettbewerbe" - label_singular: "Kategorie" - name: "contests" - widget: "list" - required: true - collapsed: true - fields: - - {label: "Kategorie", name: "category", widget: "string", required: true} - - label: "Begabtenförderung" - label_singular: "Kategorie" - name: "begabte" - widget: "list" - required: true - collapsed: true - fields: - - {label: "Kategorie", name: "category", widget: "string", required: true} - - label: "Fächer (Fachzuordnung)" - label_singular: "Fach" - name: "subjects" - widget: "list" - required: true - collapsed: true - fields: - - {label: "Fach", name: "subject", widget: "string", required: true} - - name: "ausblick-config" - label: "Ausblick auf die Woche" - file: "data/de/ausblick.yml" - fields: - - {label: "Aktivieren", name: "enable", widget: "boolean", required: false} - - {label: "Titel", name: "title", widget: "string", required: false} - - label: "Autor" - name: "author" - widget: "relation" - collection: "author" - search_fields: ["title"] - value_field: "title" - required: false - - {label: "Titelbild", name: "image", widget: "image", required: false } - - {label: "Inhalt", name: "content", widget: "markdown", required: false} - - name: "index-pages" - icon: "page" - 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. - editor: - preview: true - frame: true - size: half - summary_fields: ["title", "description"] - files: - - name: "blog-index" - label: "Aktuelles" - file: "content/german/blog/_index.md" - fields: - - {label: "Titel", name: "title", widget: "string"} - - {label: "Metabeschreibung", name: "description", widget: "text", required: false} - - name: "about-index" - label: "Über die Schule" - file: "content/german/about/_index.md" - fields: - - {label: "Titel", name: "title", widget: "string"} - - {label: "Bild", name: "image", widget: "image", default: "/media/image.webp", required: false } - - {label: "Metabeschreibung", name: "description", widget: "text", required: false} - - label: "Statistik" - name: "stats" - widget: "object" - collapsed: true - fields: - - {label: "Aktivieren", name: "enable", widget: "boolean", required: false} - - label: "Elemente" - name: "zahlen" - widget: "list" - fields: - - {label: "Bezeichnung", name: "name", widget: "string", required: false} - - {label: "Zahl", name: "count", widget: "number", required: false} - - {label: "Text", name: "body", widget: "markdown"} - - name: "anmeldung-index" - label: "Aufnahmeverfahren" - file: "content/german/anmeldung/_index.md" - fields: - - {label: "Titel", name: "title", widget: "string", required: true} - - {label: "Metabeschreibung", name: "description", widget: "text", required: false} - - label: "Elemente" - label_singular: "Element" - name: "elements" - widget: "list" - fields: - - {label: "Titel", name: "title", widget: "string", required: true} - - {label: "Text", name: "content", widget: "markdown", required: true} - required: false - - {label: "Text", name: "body", widget: "markdown", required: false} - - name: "author-index" - label: "Autoren" - file: "content/german/author/_index.md" - fields: - - {label: "Titel", name: "title", widget: "string", required: true} - - {label: "Metabeschreibung", name: "description", widget: "text", required: false} - - name: "anmeldeformular" - label: "Anmeldeformular" - file: "content/german/anmeldeformular/_index.md" - fields: - - {label: "Titel", name: "title", widget: "string", required: true} - - {label: "Metabeschreibung", name: "description", widget: "text", required: false} - - {label: "Text", name: "body", widget: "markdown", required: false} - - name: "cantorpreis-index" - label: "Cantorpreis" - file: "content/german/cantorpreis/_index.md" - fields: - - {label: "Titel", name: "title", widget: "string"} - - {label: "Metabeschreibung", name: "description", widget: "text", required: false} - - name: "contact-index" - label: "Kontakt" - file: "content/german/kontakt/_index.md" - fields: - - {label: "Titel", name: "title", widget: "string"} - - {label: "Metabeschreibung", name: "description", widget: "text", required: false} - - label: "Kontaktdaten" - name: "kontaktdaten" - widget: "list" - required: true - collapsed: true - fields: - - {label: "Name", name: "name", widget: "string", required: true} - - {label: "Berufsbezeichnung", name: "position", widget: "string", required: true} - - {label: "E-Mail-Adresse", name: "email", widget: "string", required: true, pattern: ["^\\w+([-+.']\\w+)*@\\w+([-.]\\w+)*\\.\\w+([-.]\\w+)*$", "name@domain.tld"]} - - name: "event-index" - label: "Termine" - file: "content/german/termine/_index.md" - fields: - - {label: "Titel", name: "title", widget: "string"} - - {label: "Metabeschreibung", name: "description", widget: "text", required: false} - - label: Termine - label_singular: "Termin" - name: "events" - widget: "list" - collapsed: true - fields: - - {label: "Titel", name: "title", widget: "string", required: true} - - {label: "Datum/Startdatum", name: "date", widget: "datetime", required: true, date_format: "dd.MM.yyyy", time_format: false, format: "yyyy-MM-dd'T'HH:mm:ss.SSSXXX"} - - {label: "Enddatum", name: "enddate", widget: "datetime", required: false, date_format: "dd.MM.yyyy", time_format: false, format: "yyyy-MM-dd'T'HH:mm:ss.SSSXXX", default: ""} - - {label: "Ort", name: "location", widget: "string", required: false} - required: false - - name: "forms-index" - label: "Dokumente und Formulare" - file: "content/german/forms/_index.md" - fields: - - {label: "Titel", name: "title", widget: "string"} - - {label: "Metabeschreibung", name: "description", widget: "text", required: false} - - name: "ganztagsangebote-index" - label: "Unser Ganztagsbereich" - file: "content/german/ganztagsangebote/_index.md" - fields: - - {label: "Titel", name: "title", widget: "string"} - - {label: "Metabeschreibung", name: "description", widget: "text", required: false} - - name: "projektwoche-index" - label: "Projektwoche" - file: "content/german/projektwoche/_index.md" - fields: - - {label: "Titel", name: "title", widget: "string"} - - {label: "Metabeschreibung", name: "description", widget: "text", required: false} - - name: "wettbewerbe-index" - label: "Wettbewerbe" - file: "content/german/wettbewerbe/_index.md" - fields: - - {label: "Titel", name: "title", widget: "string"} - - {label: "Metabeschreibung", name: "description", widget: "text", required: false} - - name: "begabte-index" - label: "Begabtenförderung" - file: "content/german/begabte/_index.md" - fields: - - {label: "Titel", name: "title", widget: "string"} - - {label: "Metabeschreibung", name: "description", widget: "text", required: false} - - name: "abiturienten-index" - label: "Abiturienten" - file: "content/german/abiturienten/_index.md" - fields: - - {label: "Titel", name: "title", widget: "string"} - - {label: "Metabeschreibung", name: "description", widget: "text", required: false} - - name: "cantorfora-index" - label: "Cantorfora" - file: "content/german/cantorfora/_index.md" - fields: - - {label: "Titel", name: "title", widget: "string"} - - {label: "Metabeschreibung", name: "description", widget: "text", required: false} - - {label: "Text", name: "body", widget: "markdown", required: false} - - name: "schulchronik-index" - label: "Schulchronik" - file: "content/german/schulchronik/_index.md" - fields: - - {label: "Titel", name: "title", widget: "string"} - - {label: "Metabeschreibung", name: "description", widget: "text", required: false} - - {label: "Text", name: "body", widget: "markdown", required: false} - - label: "Karte" - name: "infocard" - widget: "object" - required: false - fields: - - {label: "Aktiviert", name: "enable", widget: "boolean", required: false} - - {label: "Bild", name: "image", widget: "image", required: false} - - {label: "Zitat", name: "quote", widget: "string", required: false} - - {label: "Autor", name: "author", widget: "string", required: false} - - label: "Informationsseiten" - name: "links" - widget: "list" - required: false - collapsed: true - fields: - - {label: "Titel", name: "title", widget: "string", required: true} - - {label: "Link", name: "link", widget: "string", required: true} - - name: "pages" - icon: "page-add" - 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." - folder: "content/german/pages" - create: true - editor: - preview: true - frame: true - size: half - slug: "{{slug}}" - filter: - field: type - value: pages - summary_fields: ["title", "draft","aliases", "description"] - fields: - - {label: "Titel", name: "title", widget: "string"} - - {label: "Entwurf", name: "draft", widget: "boolean", default: false, required: false} - - {label: "Metabeschreibung", name: "description", widget: "text", required: false} - - {label: "Type", name: "type", widget: "hidden", default: "pages"} - - label: "Aliase" - name: "aliases" - widget: "list" - fields: - - label: "Alias" - name: "alias" - widget: "string" - - {label: "Text", name: "body", widget: "markdown", required: false} - - name: "author" - icon: "user" - 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. - folder: "content/german/author" - filter: {field: type, value: author} - create: true - slug: "{{slug}}" - editor: - preview: true - frame: true - size: half - 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: - - {label: "Name", name: "title", widget: "string"} - - {label: "Metabeschreibung", name: "description", widget: "text", default: "", required: false} - - {label: "E-Mail-Adresse", name: "email", widget: "string", required: false} - - {label: "Foto", name: "image", widget: "image", required: false, default: "/media/authors/gcg.webp" } - - {label: "vereinfacht", name: "simplified", widget: "boolean", default: false, required: false} - - {label: "aktiv", name: "active", widget: "boolean", default: true, required: false} - - {label: "Beschreibung", name: "body", widget: "markdown"} - - name: "blog" - icon: "news" - label: "Aktuelles" - description: Diese Artikel werden im Bereich "Aktuelles" auf der Schulhomepage angezeigt. Sie können sowohl direkt veröffentlicht, als auch als Entwurf gespeichert werden. - label_singular: "Artikel" - folder: "content/german/blog" - filter: {field: "type", value: "post"} - create: true - slug: "{{slug}}" - editor: - preview: true - frame: true - size: half - view_groups: - - label: Entwurf - field: draft - - label: Kategorie - field: categories - sortable_fields: - fields: ['date', 'title'] - default: - field: date - direction: Descending - summary_fields: ["date", "title", "draft", "author", "body"] - fields: - - {label: "Titel", name: "title", widget: "string"} - - {label: "Datum", name: "date", widget: "datetime", date_format: "dd/MM/yyyy", time_format: false, format: "yyyy-MM-dd'T'HH:mm:ss.SSSXXX"} - - {label: "Entwurf", name: "draft", widget: "boolean", default: false, required: false} - - {label: "Metabeschreibung", name: "description", widget: "text", default: "", required: false} - - {label: "Beitragsbild", name: "image", widget: "image", default: "/media/image.webp" } - - label: "Beitragsautor" - name: "author" - widget: "relation" - collection: "author" - search_fields: ["title"] - value_field: "title" - - label: "Kategorien" - name: "categories" - widget: "relation" - required: true - collection: "config" - file: "categories-config" - value_field: "blog.*" - search_fields: ["blog.*"] - display_fields: ["blog.*"] - multiple: true - options_length: 50 - - label: "Fächer" - name: "subjects" - widget: "relation" - required: false - collection: "config" - file: "categories-config" - value_field: "subjects.*" - search_fields: ["subjects.*"] - display_fields: ["subjects.*"] - multiple: true - options_length: 50 - - label: "Tags" - name: "tags" - widget: "list" - required: false - fields: - - label: "Tag" - name: "tag" - widget: "string" - - {label: "Type", name: "type", widget: "hidden", default: "post"} - - {label: "Text", name: "body", widget: "markdown"} - - name: "forms" - icon: "document" - label: "Dokumente" - label_singular: "Dokument" - description: "Hier sind Formulare, Vorlagen und andere Dokumente zu hinterlegen." - folder: "content/german/forms" - filter: {field: "type", value: "forms"} - create: true - slug: "{{slug}}" - editor: - preview: true - frame: true - size: half - summary_fields: ["title", "draft"] - fields: - - {label: "Titel", name: "title", widget: "string"} - - {label: "Entwurf", name: "draft", widget: "boolean", default: false, required: false} - - {label: "Metabeschreibung", name: "description", widget: "text", required: false} - - label: "Dateien" - name: "files" - widget: "list" - required: false - fields: - - {label: "Titel", name: "title", widget: "string"} - - {label: "Datei", name: "link", widget: "file"} - - {label: "Type", name: "type", widget: "hidden", default: "forms"} - - {label: "Text", name: "body", widget: "markdown"} - - name: "ganztagsangebote" - description: "Hier kann die Übersicht der Ganztagsangebote bearbeitet werden." - icon: "group" - label: "Ganztagsangebote" - label_singular: "Ganztagsangebot" - folder: "content/german/ganztagsangebote" - filter: {field: "type", value: "ganztagsangebote"} - create: true - editor: - preview: true - frame: true - size: half - summary_fields: ["title", "draft", "category", "schedule", "room"] - fields: - - {label: "Titel", name: "title", widget: "string"} - - {label: "Entwurf", name: "draft", widget: "boolean", default: false, required: false} - - {label: "Metabeschreibung", name: "description", widget: "text", required: false} - - {label: "Bild", name: "image", widget: "image", default: "/media/image.webp", required: false } - - label: "Themenbereich" - name: "category" - widget: "relation" - required: true - collection: "config" - file: "categories-config" - value_field: "ganztag.*" - search_fields: ["ganztag.*"] - display_fields: ["ganztag.*"] - options_length: 50 - - {label: "Dauer", name: "duration", widget: "string"} - - {label: "Tag/Stunden", name: "schedule", widget: "string"} - - {label: "Klassenstufen", name: "class", widget: "string"} - - {label: "Raum", name: "room", widget: "string"} - - {label: "Anmeldelink", name: "apply_url", widget: "hidden", default: "https://moodle.bildung-lsa.de/gcg/mod/choice/view.php?id=828"} - - {label: "Type", name: "type", widget: "hidden", default: "ganztagsangebote"} - - {label: "Text", name: "body", widget: "markdown"} - - name: "wettbewerbe" - description: "Hier kann die Übersicht der Wettbewerbe bearbeitet werden." - icon: "trophy" - label: "Wettbewerbe" - label_singular: "Wettbewerb" - folder: "content/german/wettbewerbe" - filter: {field: "type", value: "wettbewerbe"} - create: true - editor: - preview: true - frame: true - size: half - summary_fields: ["title", "draft", "category"] - fields: - - {label: "Titel", name: "title", widget: "string"} - - {label: "Entwurf", name: "draft", widget: "boolean", default: false, required: false} - - {label: "Metabeschreibung", name: "description", widget: "text", required: false} - - {label: "Bild", name: "image", widget: "image", default: "/media/image.webp", required: false } - - label: "Fach" - name: "category" - widget: "relation" - required: true - collection: "config" - file: "categories-config" - value_field: "contests.*" - search_fields: ["contests.*"] - display_fields: ["contests.*"] - options_length: 50 - - {label: "Klassenstufen", name: "class", widget: "string"} - - {label: "Website", name: "web_url", widget: "string", required: false} - - {label: "Type", name: "type", widget: "hidden", default: "wettbewerbe"} - - {label: "Text", name: "body", widget: "markdown"} - - name: "begabte" - description: "Hier kann die Übersicht der Begabtenförderungsangebote bearbeitet werden." - icon: "pi" - label: "Begabtenförderung" - label_singular: "Begabtenförderung" - folder: "content/german/begabte" - filter: {field: "type", value: "begabte"} - create: true - editor: - preview: true - frame: true - size: half - summary_fields: ["title", "draft", "body"] - fields: - - {label: "Titel", name: "title", widget: "string"} - - {label: "Entwurf", name: "draft", widget: "boolean", default: false, required: false} - - {label: "Metabeschreibung", name: "description", widget: "text", required: false} - - {label: "Bild", name: "image", widget: "image", default: "/media/image.webp", required: false } - - {label: "Klassenstufen", name: "class", widget: "string"} - - {label: "Website", name: "web_url", widget: "string", required: false} - - {label: "Type", name: "type", widget: "hidden", default: "begabte"} - - {label: "Text", name: "body", widget: "markdown"} - - name: "projektwoche" - description: "Hier kann die Übersicht der Projektwochen bearbeitet werden." - icon: "projektwoche" - label: "Projektwoche" - label_singular: "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: - - {label: "Titel", name: "title", widget: "string"} - - {label: "Entwurf", name: "draft", widget: "boolean", default: false, required: false} - - {label: "Metabeschreibung", name: "description", widget: "text", required: false} - - {label: "Type", name: "type", widget: "hidden", default: "projektwoche"} - - {label: "Text", name: "body", widget: "markdown", required: false, default: ""} - - label: "Kacheln" - name: "tiles" - widget: "list" - required: false - collapsed: true - hint: "Die Vorschau zeigt nur die generierten Symbolkarten, NICHT die Inhalte." - fields: - - {label: "Titel", name: "title", widget: "string", required: true} - - {label: "Hintergrundfarbe", name: "bg_color", widget: "color", required: true} - - {label: "Symbol", name: "icon", widget: "string", required: true} - - {label: "Symbolfarbe", name: "font_color", widget: "color", required: true} - - {label: "Inhalt", name: "content", widget: "markdown", required: true} - - name: "schulchronik" - description: "Hier können die Chronikjahre bearbeitet werden. Dieser Bereich wird von der Schulchronik verwaltet." - icon: "pillar" - label: "Schulchronik" - label_singular: "Chronikjahr" - folder: "content/german/schulchronik" - filter: {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 - fields: - - {label: "Titel", name: "title", widget: "string"} - - {label: "Entwurf", name: "draft", widget: "boolean", default: false, required: false} - - {label: "Type", name: "type", widget: "hidden", default: "schulchronik"} - - {label: "Einleitung", name: "pretext", hint: "Jahreszahltext", widget: "markdown", required: false} - - label: "Kreative Haufen" - name: "topics" - widget: "list" - required: false - fields: - - {label: "Titel", name: "title", widget: "string", required: true} - - {label: "Inhalt", name: "content", widget: "markdown", required: true} - - label: "Superhaufen" - name: "superhaufen" - widget: "object" - required: false - fields: - - {label: "Aktiviert", name: "enable", widget: "boolean", required: false} - - label: "Superhaufen" - name: "link" - widget: "relation" - collection: "superhaufen" - search_fields: ["title"] - value_field: "title" - required: false - collapsed: true - - label: "Cantorpreisträger" - name: "cantorpreisträger" - widget: "relation" - collection: "cantorpreis" - search_fields: ["jahr", "name"] - value_field: "name" - required: false - - {label: "Text", name: "body", widget: "markdown", required: false, default: ""} - - name: "superhaufen" - description: "\"Superhaufen\" sind ein besonderer Bereich der Schulchronik, um besonders ausführliche Ereignisse darzustellen. Dieser Bereich wird von der Schulchronik verwaltet." - icon: "superhaufen" - label: "Superhaufen" - label_singular: "Superhaufen" - folder: "content/german/superhaufen" - filter: {field: "type", value: "superhaufen"} - create: true - editor: - preview: true - frame: true - size: half - summary_fields: ["title", "draft", "tiles"] - fields: - - {label: "Titel", name: "title", widget: "string"} - - {label: "Entwurf", name: "draft", widget: "boolean", default: false, required: false} - - {label: "Type", name: "type", widget: "hidden", default: "superhaufen"} - - label: "Rückverlinkung" - name: "previous" - widget: "object" - fields: - - {label: "Aktiviert", name: "enable", widget: "boolean", default: true} - - {label: "Titel", name: "title", widget: "string", required: true} - - {label: "Link", name: "link", widget: "string", required: true} - - label: "Kacheln" - name: "tiles" - widget: "list" - required: false - collapsed: true - hint: "Die Vorschau zeigt nur die generierten Symbolkarten, NICHT die Inhalte." - fields: - - {label: "Titel", name: "title", widget: "string", required: true} - - {label: "Hintergrundfarbe", name: "bg_color", widget: "color", required: true} - - {label: "Symbol", name: "icon", widget: "string", required: true} - - {label: "Symbolfarbe", name: "font_color", widget: "color", required: true} - - {label: "Inhalt", name: "content", widget: "markdown", required: true} - - label: "Unter-Unterhaufen" - name: "unterhaufen" - widget: "list" - required: false - collapsed: true - fields: - - {label: "Titel", name: "title", widget: "string", required: false} - - {label: "Inhalt", name: "content", widget: "markdown", required: true} - - name: "cantorpreis" - description: "Hier sind alle Cantorpreisträger aufgelistet. Dieser Bereich wird von der Schulchronik verwaltet." - icon: "award" - label: "Cantorpreisträger" - label_singular: "Cantorpreisträger" - folder: "content/german/cantorpreis" - filter: {field: "type", value: "cantorpreis"} - sortable_fields: - fields: ['title', 'name'] - default: - field: title - direction: Descending - summary: "{{title}} - {{name}}" - create: true - editor: - preview: true - frame: true - size: half - summary_fields: ["title", "name", "draft", "body"] - fields: - - {label: "Jahr", name: "title", widget: "string"} - - {label: "Name", name: "name", widget: "string"} - - {label: "Entwurf", name: "draft", widget: "boolean", default: false, required: false} - - {label: "Beschreibung", name: "description", widget: "text", required: false} - - {label: "Bild", name: "image", widget: "image", default: "/media/image.webp", required: false } - - {label: "Type", name: "type", widget: "hidden", default: "cantorpreis"} - - {label: "Text", name: "body", widget: "markdown", required: false} - - name: "abiturienten" - description: "Hier kann die Übersicht der Abiturjahrgänge bearbeitet werden. Dieser Bereich wird von der Schulchronik verwaltet." - icon: "graduation-cap" - label: "Abiturienten" - label_singular: "Abiturjahrgang" - folder: "content/german/abiturienten" - filter: {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 - fields: - - {label: "Titel", name: "title", widget: "string"} - - {label: "Entwurf", name: "draft", widget: "boolean", default: false, required: false} - - {label: "Bild", name: "image", widget: "image", default: "/media/image.webp", required: false } - - {label: "Type", name: "type", widget: "hidden", default: "abiturienten"} - - {label: "Text", name: "body", widget: "markdown"} - - name: "cantorfora" - description: "Hier kann die Übersicht der Cantorfora bearbeitet werden. Dieser Bereich wird von der Schulchronik verwaltet." - icon: "presentation" - label: "Cantorfora" - label_singular: "Cantorforum" - folder: "content/german/cantorfora" - filter: {field: "type", value: "cantorfora"} - create: true - slug: "{{slug}}" - editor: - preview: true - frame: true - size: half - view_groups: - - label: Drafts - field: draft - summary_fields: ["title", "draft", "description"] - sortable_fields: - fields: ['index', 'title'] - default: - field: index - direction: Descending - fields: - - {label: "Titel", name: "title", widget: "string"} - - {label: "Laufindex", name: "index", widget: "number", value_type: 'int', min: 1, step: 1, required: true, hint: "Nummer des Cantorforums"} - - {label: "Entwurf", name: "draft", widget: "boolean", default: false, required: false} - - {label: "Metabeschreibung", name: "description", widget: "text", default: "", required: false} - - {label: "Beitragsbild", name: "image", widget: "image", default: "/media/image.webp" } - - {label: "Type", name: "type", widget: "hidden", default: "cantorfora"} - - {label: "Text", name: "body", widget: "markdown"} - - name: "chronikseiten" - description: "Chronikseiten entsprechen von der Funktionalität herkömmlichen Zusatzseiten, sind allerdings der Schulchronik vorbehalten." - icon: "page-add" - label: "Chronikseiten" - label_singular: "Zusatzseite (Chronik)" - folder: "content/german/chronikseiten" - create: true - editor: - preview: true - frame: true - size: half - slug: "{{slug}}" - filter: {field: "type", value: "pages"} - summary_fields: ["title", "draft", "aliases", "body"] - fields: - - {label: "Titel", name: "title", widget: "string"} - - {label: "Entwurf", name: "draft", widget: "boolean", default: false, required: false} - - {label: "Metabeschreibung", name: "description", widget: "text", required: false} - - {label: "Type", name: "type", widget: "hidden", default: "pages"} - - label: "Aliase" - name: "aliases" - widget: "list" - required: false - fields: - - label: "Alias" - name: "alias" - widget: "string" - - {label: "Text", name: "body", widget: "markdown", required: false} - - name: "statistik" - description: "Hier können statistische Daten bearbeitet werden. Dieser Bereich wird von der Schulchronik verwaltet." - icon: "stats" - label: "Statistik" - editor: - preview: false - size: half - files: - - name: "abiturdurchschnitte" - label: "Abiturdurchschnitte" - file: "static/data/abiturdurchschnitte.json" - fields: - - label: "Abiturdurchschnitte" - label_singular: "Abiturdurchschnitt" - name: "abiturdurchschnitte" - widget: "list" - required: false - fields: - - {label: "Jahr", name: "jahr", widget: "number", required: true} - - {label: "Schnitt", name: "schnitt", widget: "number", value_type: "float", step: 0.01, required: true} - - name: "schuelerzahlen" - label: "Schülerzahlen" - file: "static/data/schuelerzahlen.json" - fields: - - label: "Schülerzahlen" - label_singular: "Schülerzahlen" - name: "schuelerzahlen" - widget: "list" - required: false - fields: - - {label: "Jahr", name: "year", widget: "number", required: true} - - {label: "Gesamt", name: "all", widget: "number", required: true} - - {label: "davon Mädchen", name: "girls", widget: "number", required: true} diff --git a/static/admin/config/collections/abiturienten.js b/static/admin/config/collections/abiturienten.js index 84554b78..15d636ce 100644 --- a/static/admin/config/collections/abiturienten.js +++ b/static/admin/config/collections/abiturienten.js @@ -2,53 +2,55 @@ import { MarkdownProps } from "../props.js"; import { DraftBoolean, Title } from "./widgets.js"; 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.", - icon: "graduation-cap", - folder: "content/german/abiturienten", - filter: { - field: "type", - value: "abiturienten" + name: "abiturienten", + label: "Abiturienten", + label_singular: "Abiturjahrgang", + 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", + }, + 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: { - preview: true, - frame: true + }, + fields: [ + Title(false), + DraftBoolean, + { + name: "image", + label: "Bild", + widget: "image", + default: "/media/image.webp", + required: false, }, - summary_fields: ["title", "draft"], - sortable_fields: { - fields: ["title"], - default: { - field: "title", - direction: "Descending" - } + { + name: "type", + label: "Typ", + widget: "hidden", + default: "abiturienten", }, - fields: [ - Title(false), - DraftBoolean, - { - name: "image", - label: "Bild", - 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 - } - ] + { + name: "body", + label: "Text", + widget: "markdown", + required: false, + ...MarkdownProps, + }, + ], }; -export default AbiturientenCollection; \ No newline at end of file +export default AbiturientenCollection; diff --git a/static/admin/config/collections/author.js b/static/admin/config/collections/author.js new file mode 100644 index 00000000..01bbd097 --- /dev/null +++ b/static/admin/config/collections/author.js @@ -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; diff --git a/static/admin/config/collections/begabte.js b/static/admin/config/collections/begabte.js new file mode 100644 index 00000000..62d76e6a --- /dev/null +++ b/static/admin/config/collections/begabte.js @@ -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; diff --git a/static/admin/config/collections/blog.js b/static/admin/config/collections/blog.js new file mode 100644 index 00000000..ac25eeeb --- /dev/null +++ b/static/admin/config/collections/blog.js @@ -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; diff --git a/static/admin/config/collections/cantorfora.js b/static/admin/config/collections/cantorfora.js index 1664a3da..3679f639 100644 --- a/static/admin/config/collections/cantorfora.js +++ b/static/admin/config/collections/cantorfora.js @@ -2,70 +2,72 @@ import { MarkdownProps } from "../props.js"; import { DescriptionText, DraftBoolean, Title } from "./widgets.js"; 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.", - icon: "presentation", - folder: "content/german/cantorfora", - filter: { - field: "type", - value: "cantorfora" + name: "cantorfora", + label: "Cantorfora", + label_singular: "Cantorforum", + 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", + }, + create: true, + editor: { + preview: true, + frame: true, + size: "half", + }, + view_groups: [ + { + label: "Entwürfe", + field: "draft", }, - create: true, - editor: { - preview: true, - frame: true + ], + summary_fields: ["title", "draft", "description"], + sortable_fields: { + fields: ["index", "title"], + default: { + field: "index", + direction: "Descending", }, - view_groups: [ - { - label: "Entwürfe", - field: "draft" - } - ], - summary_fields: ["title", "draft", "description"], - sortable_fields: { - fields: ['index', 'title'], - default: { - field: "index", - direction: "Descending" - } + }, + fields: [ + Title(false), + { + name: "index", + label: "Laufindex", + hint: "Nummer des Cantorforums", + widget: "number", + value_type: "int", + min: 1, + step: 1, + required: true, }, - fields: [ - Title(false), - { - name: "index", - label: "Laufindex", - hint: "Nummer des Cantorforums", - widget: "number", - value_type: "int", - min: 1, - step: 1, - required: true - }, - DraftBoolean, - DescriptionText, - { - name: "image", - label: "Titelbild", - widget: "image", - default: "/media/image.webp", - required: true - }, - { - name: "type", - label: "Typ", - widget: "hidden", - default: "cantorfora" - }, - { - name: "body", - label: "Text", - widget: "markdown", - required: true, - ...MarkdownProps - } - ] + DraftBoolean, + DescriptionText, + { + name: "image", + label: "Titelbild", + widget: "image", + default: "/media/image.webp", + required: true, + }, + { + name: "type", + label: "Typ", + widget: "hidden", + default: "cantorfora", + }, + { + name: "body", + label: "Text", + widget: "markdown", + required: true, + ...MarkdownProps, + }, + ], }; -export default CantorforaCollection; \ No newline at end of file +export default CantorforaCollection; diff --git a/static/admin/config/collections/cantorpreis.js b/static/admin/config/collections/cantorpreis.js index 2fbcba1f..d1c73d6c 100644 --- a/static/admin/config/collections/cantorpreis.js +++ b/static/admin/config/collections/cantorpreis.js @@ -2,65 +2,67 @@ import { MarkdownProps } from "../props.js"; 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.", - icon: "award", - folder: "content/german/cantorpreis", - filter: { - field: "type", - value: "cantorpreis" + name: "cantorpreis", + label: "Cantorpreisträger", + 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", + }, + sortable_fields: { + fields: ["title", "name"], + default: { + field: "title", + direction: "Descending", }, - sortable_fields: { - fields: ['title', 'name'], - default: { - field: "title", - direction: "Descending" - } + }, + summary: "{{title}} - {{name}}", + create: true, + editor: { + 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, - editor: { - preview: true, - frame: true + { + name: "name", + label: "Name", + widget: "string", + required: true, }, - summary_fields: ["title", "name", "draft", "body"], - fields: [ - { - name: "title", - label: "Jahr", - widget: "string", - required: true - }, - { - name: "name", - label: "Name", - widget: "string", - required: true - }, - DraftBoolean, - DescriptionText, - { - name: "image", - label: "Bild", - widget: "image", - default: "/media/image.webp", - required: false - }, - { - name: "type", - label: "Typ", - widget: "hidden", - default: "cantorpreis" - }, - { - name: "body", - label: "Text", - widget: "markdown", - required: false, - ...MarkdownProps - } - ] + DraftBoolean, + DescriptionText, + { + name: "image", + label: "Bild", + widget: "image", + default: "/media/image.webp", + required: false, + }, + { + name: "type", + label: "Typ", + widget: "hidden", + default: "cantorpreis", + }, + { + name: "body", + label: "Text", + widget: "markdown", + required: false, + ...MarkdownProps, + }, + ], }; -export default CantorpreisCollection; \ No newline at end of file +export default CantorpreisCollection; diff --git a/static/admin/config/collections/chronikjahre.js b/static/admin/config/collections/chronikjahre.js index b01fc1e9..05423352 100644 --- a/static/admin/config/collections/chronikjahre.js +++ b/static/admin/config/collections/chronikjahre.js @@ -2,110 +2,111 @@ import { MarkdownProps } from "../props.js"; 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.", - icon: "schulchronik", - label: "Chronikjahre", - label_singular: "Chronikjahr", - folder: "content/german/schulchronik", - filter: { - field: "type", - value: "schulchronik" + name: "chronikjahre", + 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", + }, + 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: { - preview: false + }, + fields: [ + { + name: "title", + label: "Jahr", + widget: "string", }, - summary_fields: ["title", "draft", "cantorpreisträger", "topics"], - sortable_fields: { - fields: ['title'], - default: { - field: "title", - direction: "Descending" - } + DraftBoolean, + { + name: "type", + label: "Typ", + widget: "hidden", + 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", - label: "Jahr", - widget: "string" - }, - DraftBoolean, - { - name: "type", - label: "Typ", - widget: "hidden", - default: "schulchronik" + name: "title", + label: "Titel", + widget: "string", + required: true, }, { - name: "pretext", - label: "Einleitung", - hint: "Text für die Jahreszahl", - widget: "markdown", - required: false, - ...MarkdownProps + name: "content", + label: "Inhalt", + widget: "markdown", + required: false, + ...MarkdownProps, }, { - name: "topics", - label: "Kreative Haufen", - label_singular: "Haufen", - widget: "list", - required: false, - collapsed: true, - fields: [ - { - name: "title", - label: "Titel", - widget: "string", - required: true, - }, - { - name: "content", - 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: "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", - collection: "cantorpreis", - search_fields: ["jahr", "name"], - value_field: "name", - required: false - }, - { - name: "body", - label: "Text", - hint: "Erscheint zusätzlich zu den Kreativen Haufen", - widget: "markdown", - required: false, - ...MarkdownProps - } + ], + }, + { + name: "cantorpreisträger", + label: "Cantorpreisträger", + widget: "relation", + collection: "cantorpreis", + search_fields: ["jahr", "name"], + value_field: "name", + required: false, + }, + { + name: "body", + label: "Text", + hint: "Erscheint zusätzlich zu den Kreativen Haufen", + widget: "markdown", + required: false, + ...MarkdownProps, + }, + ], +}; - ] -} - -export default ChronikjahreCollection; \ No newline at end of file +export default ChronikjahreCollection; diff --git a/static/admin/config/collections/chronikseiten.js b/static/admin/config/collections/chronikseiten.js index a91f94de..38affe4a 100644 --- a/static/admin/config/collections/chronikseiten.js +++ b/static/admin/config/collections/chronikseiten.js @@ -2,55 +2,57 @@ import { MarkdownProps } from "../props.js"; import { DescriptionText, DraftBoolean, Title } from "./widgets.js"; 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.", - icon: "page-add", - folder: "content/german/chronikseiten", - create: true, - editor: { - preview: true, - frame: true + name: "chronikseiten", + label: "Chronikseiten", + label_singular: "Zusatzseite (Chronik)", + 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, + 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", - value: "pages" + { + name: "aliases", + 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: [ - 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: "Text", - widget: "markdown", - required: false, - ...MarkdownProps - } - ] -} + { + name: "body", + label: "Inhalt", + widget: "markdown", + required: false, + ...MarkdownProps, + }, + ], +}; -export default ChronikseitenCollection; \ No newline at end of file +export default ChronikseitenCollection; diff --git a/static/admin/config/collections/forms.js b/static/admin/config/collections/forms.js new file mode 100644 index 00000000..3175e9d5 --- /dev/null +++ b/static/admin/config/collections/forms.js @@ -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; diff --git a/static/admin/config/collections/ganztag.js b/static/admin/config/collections/ganztag.js new file mode 100644 index 00000000..075cc798 --- /dev/null +++ b/static/admin/config/collections/ganztag.js @@ -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; diff --git a/static/admin/config/collections/index-pages.js b/static/admin/config/collections/index-pages.js new file mode 100644 index 00000000..2c342ec5 --- /dev/null +++ b/static/admin/config/collections/index-pages.js @@ -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; diff --git a/static/admin/config/collections/index.js b/static/admin/config/collections/index.js index 252e7da4..16a7217f 100644 --- a/static/admin/config/collections/index.js +++ b/static/admin/config/collections/index.js @@ -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 }; \ No newline at end of file +export { + SettingsCollection, + IndexPagesCollection, + PagesCollection, + AuthorCollection, + BlogCollection, + FormsCollection, + GanztagCollection, + WettbewerbeCollection, + BegabteCollection, + ProjektwocheCollection, + ChronikjahreCollection, + SuperhaufenCollection, + CantorpreisCollection, + AbiturientenCollection, + CantorforaCollection, + ChronikseitenCollection, + StatsCollection, +}; diff --git a/static/admin/config/collections/pages.js b/static/admin/config/collections/pages.js new file mode 100644 index 00000000..8d9bb466 --- /dev/null +++ b/static/admin/config/collections/pages.js @@ -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; diff --git a/static/admin/config/collections/projektwoche.js b/static/admin/config/collections/projektwoche.js new file mode 100644 index 00000000..a84e39ee --- /dev/null +++ b/static/admin/config/collections/projektwoche.js @@ -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; diff --git a/static/admin/config/collections/settings-collection.js b/static/admin/config/collections/settings-collection.js index 1d72283c..d46b03d7 100644 --- a/static/admin/config/collections/settings-collection.js +++ b/static/admin/config/collections/settings-collection.js @@ -1,135 +1,981 @@ -import { DateFormat, MarkdownProps } from "../props.js"; -import { EnableBoolean, Title } from "./widgets.js"; +import { + DataObject, + DateFormat, + MarkdownProps, + PatternEmail, +} from "../props.js"; +import { + ButtonObject, + EnableBoolean, + Title, + IconList, + PreviewNumber, + DescriptionText, + DisableBoolean, +} from "./widgets.js"; const SettingsCollection = { - name: "settings", - label: "Einstellungen", - icon: "settings", - description: "Hier können die Basiseinstellungen der Website geändert werden. Die meisten Bereiche müssen nur in Ausnahmefällen angepasst werden.", - editor: { - preview: false - }, - files: [ + name: "settings", + label: "Einstellungen", + icon: "settings", + description: + "Hier können die Basiseinstellungen der Website geändert werden. Die meisten Bereiche müssen nur in Ausnahmefällen angepasst werden.", + editor: { + preview: false, + size: "half", + }, + files: [ + { + name: "data-homepage", + label: "Startseiteneinstellungen", + file: "data/de/homepage.yml", + fields: [ { - name: "data-homepage", - label: "Startseiteneinstellungen", - file: "data/de/homepage.yml", - fields: [ + name: "top_banner", + label: "Banner", + ...DataObject, + fields: [ + EnableBoolean, + { + name: "text", + label: "Text", + widget: "markdown", + required: false, + ...MarkdownProps, + }, + { + name: "color", + label: "Farbe", + widget: "color", + required: false, + }, + { + name: "font_color", + label: "Schriftfarbe", + widget: "color", + required: false, + }, + IconList, + { + name: "temporarily", + label: "Zeitschaltung", + widget: "object", + fields: [ + EnableBoolean, { - name: "top_banner", - label: "Banner", - widget: "object", - collapsed: true, - summary: "{{fields.enable | ternary('aktiv', 'inaktiv')}}", - fields: [ - EnableBoolean, - { - name: "text", - label: "Text", - widget: "markdown", - required: false, - ...MarkdownProps - }, - { - name: "color", - label: "Farbe", - widget: "color", - required: false - }, - { - name: "font_color", - label: "Schriftfarbe", - widget: "color", - required: false - }, - { - name: "icon", - label: "Symbol", - widget: "string", - required: false, - hint: "Liste unter https://assets.cantorgymnasium.de/fonts/mdi/v7/preview.html" - }, - { - name: "temporarily", - label: "Zeitschaltung", - widget: "object", - fields: [ - EnableBoolean, - { - name: "start_date", - label: "Startdatum", - widget: "datetime", - ...DateFormat, - required: false, - }, - { - name: "end_date", - label: "Enddatum", - widget: "datetime", - ...DateFormat, - required: false, - } - ] - } - ] + name: "start_date", + label: "Startdatum", + widget: "datetime", + ...DateFormat, + required: false, }, { - name: "slider", - label: "Karusell", - widget: "object", - collapsed: true, - summary: "{{fields.enable | ternary('aktiv', 'inaktiv')}}", - fields: [ - EnableBoolean, - { - name: "bg_image", - label: "Hintergrundbild", - widget: "image", - required: false, - }, - Title(true), - { - name: "slider_item", - label: "Elemente", - label_singular: "Element", - widget: "list", - collapsed: true, - fields: [ - { - name: "content", - label: "Text", - widget: "string", - required: false - }, - { - name: "button", - label: "Button", - widget: "object", - required: false, - collapsed: true, - fields: [ - EnableBoolean, - { - name: "label", - label: "Aufschrift", - widget: "string", - required: false - }, - { - name: "link", - label: "Link", - widget: "string", - required: false - } - ] - } - ] - } - ] - } - ] - } - ] + name: "end_date", + label: "Enddatum", + widget: "datetime", + ...DateFormat, + required: false, + }, + ], + }, + ], + }, + { + name: "slider", + label: "Karusell", + ...DataObject, + fields: [ + EnableBoolean, + { + name: "bg_image", + label: "Hintergrundbild", + widget: "image", + required: true, + }, + Title(false), + { + name: "slider_item", + label: "Elemente", + label_singular: "Element", + widget: "list", + collapsed: true, + fields: [ + { + name: "content", + label: "Text", + widget: "string", + required: false, + }, + ButtonObject, + ], + }, + ], + }, + { + name: "header_logos", + label: "Partnerlogos (oben)", + ...DataObject, + fields: [ + EnableBoolean, + { + name: "logos", + label: "Logos", + label_singular: "Logo", + widget: "list", + required: false, + collapsed: true, + fields: [ + Title(true), + { + name: "link", + label: "Link", + widget: "string", + required: false, + }, + { + name: "image", + label: "Grafik", + widget: "image", + required: true, + }, + ], + }, + ], + }, + { + name: "about", + label: "Einstiegsabschnitt", + ...DataObject, + fields: [ + EnableBoolean, + Title(false), + { + name: "content", + label: "Inhalt", + widget: "markdown", + required: false, + ...MarkdownProps, + }, + ButtonObject, + ], + }, + { + name: "blog", + label: "Blog-Abschnitt", + ...DataObject, + fields: [EnableBoolean, Title(false), PreviewNumber], + }, + { + name: "success_banner", + label: "Erfolge", + ...DataObject, + fields: [ + EnableBoolean, + { + name: "image", + label: "Hintergrundbild", + widget: "image", + required: true, + }, + { + name: "feature_item", + label: "Elemente", + label_singular: "Element", + widget: "list", + collapsed: true, + types: [ + { + name: "image", + label: "Grafik", + widget: "object", + summary: "{{fields.name}}", + fields: [ + { + name: "name", + label: "Bezeichnung", + widget: "string", + required: true, + }, + { + name: "image", + label: "Grafik", + widget: "image", + required: false, + }, + { + name: "content", + label: "Inhalt", + widget: "markdown", + required: false, + ...MarkdownProps, + }, + ], + }, + { + name: "icon", + label: "Symbol", + widget: "object", + summary: "{{fields.name}}", + fields: [ + { + name: "name", + label: "Bezeichnung", + widget: "string", + required: true, + }, + IconList, + { + name: "content", + label: "Inhalt", + widget: "markdown", + required: false, + ...MarkdownProps, + }, + ], + }, + ], + }, + ], + }, + { + name: "ganztagsangebote", + label: "Ganztagsangebote", + ...DataObject, + fields: [EnableBoolean, Title(false), PreviewNumber], + }, + { + name: "cta", + label: "Button-Abschnitt", + ...DataObject, + fields: [ + EnableBoolean, + Title(false), + { + name: "subtitle", + label: "Untertitel", + widget: "string", + required: false, + }, + ButtonObject, + ], + }, + { + name: "info", + label: "Informationsabschnitt (inkl. Video)", + ...DataObject, + fields: [ + EnableBoolean, + { + name: "bg_image", + label: "Hintergrundbild", + widget: "image", + required: true, + }, + Title(false), + { + name: "content", + label: "Inhalt", + widget: "markdown", + required: false, + ...MarkdownProps, + }, + { + name: "video_link", + label: "Video-Link", + widget: "string", + required: false, + }, + ], + }, + { + name: "termine", + label: "Termine", + ...DataObject, + fields: [EnableBoolean, Title(false), PreviewNumber], + }, + { + name: "digitalpakt", + label: "DigitalPakt-Banner", + ...DataObject, + fields: [ + EnableBoolean, + Title(false), + { + name: "image", + label: "Bild", + widget: "image", + required: false, + }, + { + name: "content", + label: "Inhalt", + widget: "markdown", + required: false, + ...MarkdownProps, + }, + ], + }, + { + name: "footer_logos", + label: "Partnerlogos (unten)", + ...DataObject, + fields: [ + EnableBoolean, + { + name: "logos", + label: "Logos", + label_singular: "Logo", + widget: "list", + required: false, + collapsed: true, + fields: [ + Title(true), + { + name: "link", + label: "Link", + widget: "string", + required: false, + }, + { + name: "image", + label: "Grafik", + widget: "image", + required: true, + }, + ], + }, + ], + }, + ], + }, + { + name: "data-ausblick", + label: "Ausblick auf die Woche", + file: "data/de/ausblick.yml", + fields: [ + EnableBoolean, + Title(false), + { + name: "author", + label: "Autor", + hint: "Verwaltet im Autoren-Bereich", + widget: "relation", + collection: "author", + value_field: "{{slug}}", + search_fields: ["{{title}}"], + display_fields: ["{{title}}"], + multiple: true, + required: true, + }, + { + name: "image", + label: "Titelbild", + widget: "image", + required: true, + }, + { + name: "content", + label: "Inhalt", + widget: "markdown", + required: false, + ...MarkdownProps, + }, + ], + }, + { + name: "hugo-config", + label: "Website-Einstellungen für Entwickler", + file: "config.yml", + fields: [ + { + name: "baseURL", + label: "Website-URL", + widget: "string", + required: true, + }, + Title(false), + { + name: "paginate", + label: "Anzahl der Seitenelemente", + widget: "number", + value_type: "int", + min: 1, + step: 1, + required: true, + }, + { + name: "summaryLength", + label: "Länge von Zusammenfassungen (Zeichenanzahl)", + widget: "number", + value_type: "int", + min: 1, + step: 1, + required: true, + }, + { + name: "defaultContentLanguageInSubdir", + label: "Standardsprache in Unterordner rendern", + widget: "boolean", + required: false, + }, + { + name: "defaultContentLanguage", + label: "Standardsprache", + widget: "string", + required: true, + }, + { + name: "enableEmoji", + label: "Emoji", + widget: "boolean", + required: false, + }, + { + name: "enableRobotsTxt", + label: "robots.txt generieren", + widget: "boolean", + required: false, + }, + { + name: "timeZone", + label: "Zeitzone", + widget: "string", + required: true, + }, + { + name: "removePathAccents", + label: "Pfadbereinigung", + hint: "Entfernt Umlaute, Akzente u. ä. aus Dateinamen und Pfaden", + widget: "boolean", + required: false, + }, + { + name: "markup", + label: "Markup", + widget: "object", + collapsed: true, + summary: "{{fields.defaultMarkdownHandler}}", + fields: [ + { + name: "defaultMarkdownHandler", + label: "Markdown-Handler", + hint: "Dienst, welcher als Markdown-Renderer fungiert.", + widget: "select", + options: ["blackfriday", "goldmark"], + required: true, + }, + { + name: "goldmark", + label: "Goldmark-Einstellungen", + widget: "object", + fields: [ + { + name: "renderer", + label: "Renderer", + widget: "object", + fields: [ + { + name: "unsafe", + label: "Unsicheren Inhalt erlauben", + hint: "Ermöglicht das Rendern von HTML in Markdown-Dateien", + widget: "boolean", + required: false, + }, + ], + }, + ], + }, + ], + }, + { + name: "params", + label: "Parameter", + widget: "object", + collapsed: true, + fields: [ + { + name: "plugins", + label: "Erweiterungen", + widget: "object", + collapsed: true, + fields: [ + { + name: "css", + label: "CSS-Stylesheets", + label_singular: "CSS-Stylesheet", + widget: "list", + collapsed: true, + fields: [{ name: "link", label: "Link", widget: "string" }], + }, + { + name: "head_js", + label: "JavaScript (am Seitenanfang)", + label_singular: "JS-Datei", + widget: "list", + collapsed: true, + fields: [{ name: "link", label: "Link", widget: "string" }], + }, + { + name: "js", + label: "JavaScript (am Seitenende)", + label_singular: "JS-Datei", + widget: "list", + collapsed: true, + fields: [{ name: "link", label: "Link", widget: "string" }], + }, + ], + }, + { + name: "logo", + label: "Logo", + widget: "image", + required: true, + }, + { + name: "author", + label: "Autor-Eintrag", + widget: "string", + required: true, + }, + { + name: "address", + label: "Adresse", + widget: "string", + required: true, + }, + { + name: "route_link", + label: "Route (Link)", + widget: "string", + required: false, + }, + { + name: "mobile", + label: "Telefonnummer", + widget: "string", + required: true, + }, + { + name: "email", + label: "E-Mail-Adresse", + widget: "string", + required: true, + ...PatternEmail, + }, + { + name: "email_label", + label: "E-Mail-Adresse (UI-Ansicht)", + hint: "Wird über die E-Mail-Adresse gelegt, um Spambots entgegenzuwirken", + widget: "string", + required: true, + }, + DescriptionText, + { + name: "top_header", + label: "Kontakt-Leiste", + widget: "boolean", + required: false, + }, + { + name: "images", + label: "Vorschaubilder", + label_singular: "Vorschaubild", + hint: "Werden als Linkvorschau in soz. Netzwerken & co. angezeigt", + widget: "list", + required: false, + collapsed: true, + fields: [{ name: "path", label: "Bild-Pfad", widget: "string" }], + }, + { + name: "twitter", + label: "Twitter-Konto", + widget: "string", + required: false, + }, + { + name: "preloader", + label: "Ladebildschirm", + ...DataObject, + fields: [ + EnableBoolean, + { + name: "preloader", + label: "Logo", + widget: "image", + required: true, + }, + { + name: "loader", + label: "Ladeanimation", + widget: "image", + required: true, + }, + ], + }, + { + name: "social", + label: "Soziale Netzwerke", + label_singular: "Link", + widget: "list", + collapsed: true, + fields: [ + { + name: "title", + label: "Bezeichnung", + widget: "string", + required: true, + }, + IconList, + { + name: "link", + label: "Link", + widget: "string", + required: true, + }, + ], + }, + ], + }, + { + name: "menu", + label: "Menüs", + widget: "object", + collapsed: true, + fields: [ + { + name: "main", + label: "Hauptmenü", + label_singular: "Menüeintrag", + hint: "Wird am Seitenanfang angezeigt", + widget: "list", + collapsed: true, + fields: [ + Title(false), + { + name: "weight", + label: "Positionierung", + hint: "Je höher die Zahl, desto weiter unten liegt der Eintrag", + widget: "number", + value_type: "int", + min: 1, + step: 1, + required: true, + }, + { + name: "hasChildren", + label: "Erweitertes Menü", + hint: "Der Menüpunkt dient als Untermenü für weitere Elemente", + widget: "boolean", + required: false, + }, + { + name: "parent", + label: "Übergeordneter Eintrag", + hint: "Falls ausgewählt, wird dieser Eintrag im Untermenü erscheinen", + widget: "relation", + collection: "config", + file: "hugo-config", + value_field: "menu.main.*.name", + search_fields: ["menu.main.*.name"], + display_fields: ["menu.main.*.name"], + required: false, + }, + { + name: "URL", + label: "Link", + widget: "string", + required: false, + }, + { + name: "params", + label: "Parameter", + widget: "object", + collapsed: false, + fields: [ + { + name: "external", + label: "Externer Link", + hint: "Wird in einem neuen Tab geöffnet", + widget: "boolean", + required: false, + }, + { + name: "separator", + label: "Trennlinie", + hint: "Wird unter dem Menüpunkt eingefügt", + widget: "boolean", + required: false, + }, + ], + }, + ], + }, + { + name: "footer", + label: "Link-Liste", + label_singular: "Link", + hint: "Wird am Seitenende angezeigt", + widget: "list", + collapsed: true, + fields: [ + { + name: "name", + label: "Bezeichnung", + widget: "string", + required: true, + }, + { + name: "URL", + label: "Link", + widget: "string", + required: true, + }, + ], + }, + ], + }, + { + name: "languages", + label: "Sprachen", + widget: "object", + collapsed: true, + fields: [ + { + name: "de", + label: "Deutsch", + widget: "object", + collapsed: false, + fields: [ + { + name: "languageName", + label: "Abkürzung", + hint: "De, En, Fr...", + widget: "string", + required: true, + }, + { + name: "languageCode", + label: "Sprachcode", + hint: "de-de, en-us, fr-fr...", + widget: "string", + required: true, + }, + { + name: "contentDir", + label: "Ordner mit Inhalt", + widget: "file", + media_folder: "/content", + public_folder: "content", + select_folder: true, + }, + { + name: "weight", + label: "Positionierung", + hint: "Je höher die Zahl, desto weiter unten liegt der Eintrag", + widget: "number", + value_type: "int", + min: 1, + step: 1, + required: true, + }, + { + name: "copyright", + label: "Copyright-Eintrag", + hint: "Am Seitenende sichtbar", + widget: "markdown", + required: true, + ...MarkdownProps, + }, + { + name: "params", + label: "Parameter", + widget: "object", + collapsed: false, + fields: [ + { + name: "home", + label: "Startseitenbezeichnung", + hint: "Verwendet für Menüerstellung", + widget: "string", + required: true, + }, + { + name: "impressumURL", + label: "Link zum Impressum", + hint: "pages/impressum", + widget: "string", + required: true, + }, + { + name: "dseURL", + label: "Link zur Datenschutzerklärung", + hint: "pages/datenschutz", + widget: "string", + required: true, + }, + ], + }, + ], + }, + ], + }, + { + name: "privacy", + label: "Datenschutz-Optionen", + hint: "Konfiguration externer Dienste", + widget: "object", + collapsed: true, + fields: [ + { + name: "disqus", + label: "Disqus", + widget: "object", + fields: [DisableBoolean], + }, + { + name: "googleAnalytics", + label: "Google Analytics", + widget: "object", + fields: [DisableBoolean], + }, + { + name: "instagram", + label: "Instagram", + widget: "object", + fields: [DisableBoolean], + }, + { + name: "twitter", + label: "Twitter", + widget: "object", + fields: [ + { + name: "enableDNT", + label: "Tracking deaktivieren", + widget: "boolean", + required: false, + }, + ], + }, + { + name: "youtube", + label: "YouTube", + widget: "object", + fields: [ + { + name: "privacyEnhanced", + label: "Piped-Proxy", + hint: "Datenschutzfreundliche Oberfläche für YouTube", + widget: "boolean", + required: false, + }, + ], + }, + { + name: "vimeo", + label: "Vimeo", + widget: "object", + fields: [ + { + name: "enableDNT", + label: "Tracking deaktivieren", + widget: "boolean", + required: false, + }, + ], + }, + ], + }, + ], + }, + { + name: "data-categories", + label: "Kategorien und Zuordnungen", + file: "data/de/categories.yml", + fields: [ + { + name: "blog", + label: "Aktuelles", + label_singular: "Kategorie", + widget: "list", + required: true, + collapsed: true, + fields: [ + { + name: "category", + label: "Kategorie", + widget: "string", + required: true, + }, + ], + }, + { + name: "ganztag", + label: "Ganztagsbereich", + label_singular: "Kategorie", + widget: "list", + required: true, + collapsed: true, + fields: [ + { + name: "category", + label: "Kategorie", + widget: "string", + required: true, + }, + ], + }, + { + name: "contests", + label: "Wettbewerbe", + label_singular: "Kategorie", + widget: "list", + required: true, + collapsed: true, + fields: [ + { + name: "category", + label: "Kategorie", + widget: "string", + required: true, + }, + ], + }, + { + name: "begabte", + label: "Begabtenförderung", + label_singular: "Kategorie", + widget: "list", + required: true, + collapsed: true, + fields: [ + { + name: "category", + label: "Kategorie", + widget: "string", + required: true, + }, + ], + }, + { + name: "subjects", + label: "Fächer (Fachzuordnung)", + label_singular: "Fach", + widget: "list", + required: true, + collapsed: true, + fields: [ + { + name: "category", + label: "Kategorie", + widget: "string", + required: true, + }, + ], + }, + ], + }, + ], }; -export default SettingsCollection; \ No newline at end of file +export default SettingsCollection; diff --git a/static/admin/config/collections/statistik.js b/static/admin/config/collections/statistik.js deleted file mode 100644 index ce502724..00000000 --- a/static/admin/config/collections/statistik.js +++ /dev/null @@ -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; \ No newline at end of file diff --git a/static/admin/config/collections/stats.js b/static/admin/config/collections/stats.js new file mode 100644 index 00000000..9b265fd0 --- /dev/null +++ b/static/admin/config/collections/stats.js @@ -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; diff --git a/static/admin/config/collections/superhaufen.js b/static/admin/config/collections/superhaufen.js index 6b0f335e..aa6ada52 100644 --- a/static/admin/config/collections/superhaufen.js +++ b/static/admin/config/collections/superhaufen.js @@ -2,100 +2,102 @@ import { MarkdownProps } from "../props.js"; 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.", - icon: "superhaufen", - folder: "content/german/superhaufen", - filter: { - field: "type", - value: "superhaufen" + 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.', + icon: "superhaufen", + folder: "content/german/superhaufen", + filter: { + 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: { - preview: true, - frame: true, - }, - summary_fields: ["title", "draft", "tiles"], - fields: [ + { + name: "previous", + label: "Rückverlinkung", + widget: "object", + collapsed: true, + fields: [ + EnableBoolean, Title(false), - DraftBoolean, { - name: "type", - label: "Typ", - widget: "hidden", - default: "superhaufen" + name: "link", + label: "Link", + widget: "string", + 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", - label: "Rückverlinkung", - widget: "object", - collapsed: true, - fields: [ - EnableBoolean, - Title(false), - { - name: "link", - label: "Link", - widget: "string", - required: true - } - ] + name: "icon", + label: "Symbol", + widget: "string", + 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: "icon", - label: "Symbol", - widget: "string", - required: true, - }, - { - name: "font_color", - label: "Symbolfarbe", - widget: "color", - required: true, - }, - { - 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 - } - ] - } - ] - } - ] -} + name: "font_color", + label: "Symbolfarbe", + widget: "color", + required: true, + }, + { + 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; \ No newline at end of file +export default SuperhaufenCollection; diff --git a/static/admin/config/collections/wettbewerbe.js b/static/admin/config/collections/wettbewerbe.js new file mode 100644 index 00000000..96134d47 --- /dev/null +++ b/static/admin/config/collections/wettbewerbe.js @@ -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; diff --git a/static/admin/config/collections/widgets.js b/static/admin/config/collections/widgets.js index 1ed5292b..2c20bf05 100644 --- a/static/admin/config/collections/widgets.js +++ b/static/admin/config/collections/widgets.js @@ -1,30 +1,88 @@ +import { DataObject } from "../props.js"; + const EnableBoolean = { - name: "enable", - label: "Aktivieren", - widget: "boolean", - required: false + name: "enable", + label: "Aktivieren", + widget: "boolean", + required: false, +}; + +const DisableBoolean = { + name: "disable", + label: "Deaktivieren", + widget: "boolean", + required: false, }; const DraftBoolean = { - name: "draft", - label: "Entwurf", - widget: "boolean", - default: false, - required: false -} + name: "draft", + label: "Entwurf", + widget: "boolean", + default: false, + required: false, +}; const Title = (optional = false) => ({ - name: "title", - label: "Titel", - widget: "string", - required: !optional + name: "title", + label: "Titel", + widget: "string", + required: !optional, }); const DescriptionText = { - name: "description", - label: "Beschreibung", - widget: "text", - required: false + name: "description", + label: "Beschreibung", + widget: "text", + required: false, }; -export { EnableBoolean, DraftBoolean, Title, DescriptionText }; \ No newline at end of file +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, +}; diff --git a/static/admin/config/index.js b/static/admin/config/index.js index 53debbdb..7dfeba5e 100644 --- a/static/admin/config/index.js +++ b/static/admin/config/index.js @@ -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 = { - backend: { - name: "gitea", - repo: "gcg/gcg-website", - branch: "master", - api_root: "https://git.cantorgymnasium.de/api/v1", - base_url: "https://oauth.cantorgymnasium.de", - commit_messages: { - create: "{{collection}} {{slug}} erstellt", - update: "{{collection}} {{slug}} aktualisiert", - delete: "{{collection}} {{slug}} gelöscht", - updateMedia: "{{path}} hochgeladen", - deleteMedia: "{{path}} gelöscht" - } + backend: { + name: "gitea", + repo: "gcg/gcg-website", + branch: "master", + api_root: "https://git.cantorgymnasium.de/api/v1", + base_url: "https://oauth.cantorgymnasium.de", + commit_messages: { + create: "{{collection}} {{slug}} erstellt", + update: "{{collection}} {{slug}} aktualisiert", + delete: "{{collection}} {{slug}} gelöscht", + updateMedia: "{{path}} hochgeladen", + deleteMedia: "{{path}} gelöscht", }, - local_backend: true, - media_folder: "/static/media", - public_folder: "/media", - media_library: { - max_file_size: 10240000, - folder_support: true - }, - site_url: "https://cantorgymnasium.de", - locale: "de", - slug: { - encoding: "ascii", - clean_accents: true, - sanitize_replacement: "-" - }, - collections: [ - SettingsCollection - ] + }, + local_backend: true, + media_folder: "/static/media", + public_folder: "/media", + media_library: { + max_file_size: 10240000, + folder_support: true, + }, + site_url: "https://cantorgymnasium.de", + locale: "de", + slug: { + encoding: "ascii", + clean_accents: true, + sanitize_replacement: "-", + }, + collections: [ + SettingsCollection, + IndexPagesCollection, + PagesCollection, + AuthorCollection, + BlogCollection, + FormsCollection, + GanztagCollection, + WettbewerbeCollection, + BegabteCollection, + ProjektwocheCollection, + ChronikjahreCollection, + SuperhaufenCollection, + CantorpreisCollection, + AbiturientenCollection, + CantorforaCollection, + ChronikseitenCollection, + StatsCollection, + ], }; -export default config; \ No newline at end of file +export default config; diff --git a/static/admin/config/props.js b/static/admin/config/props.js index a7394503..c0488b8b 100644 --- a/static/admin/config/props.js +++ b/static/admin/config/props.js @@ -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', - ], - empty: [], - 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', - ], - table_selection: [ - 'bold', - 'italic', - 'strikethrough', - 'code', - 'insert-row', - 'delete-row', - 'insert-column', - 'delete-column', - 'delete-table', - 'file-link', - 'shortcode', - ] - } + toolbar_buttons: { + main: [ + "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", + ], + table_empty: [ + "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", + ], + }, }; const DateFormat = { - date_format: "dd.MM.yyyy", - time_format: false, - format: "yyyy-MM-dd'T'HH:mm:ss.SSSXXX" + date_format: "dd.MM.yyyy", + time_format: false, + format: "yyyy-MM-dd'T'HH:mm:ss.SSSXXX", }; -export { MarkdownProps, DateFormat }; \ No newline at end of file +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 }; diff --git a/static/admin/config/schulchronik.js b/static/admin/config/schulchronik.js index 0f0f5a08..d153bd0c 100644 --- a/static/admin/config/schulchronik.js +++ b/static/admin/config/schulchronik.js @@ -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 = { - backend: { - name: "gitea", - repo: "gcg/gcg-website", - branch: "master", - api_root: "https://git.cantorgymnasium.de/api/v1", - base_url: "https://oauth.cantorgymnasium.de", - commit_messages: { - create: "{{collection}} {{slug}} erstellt", - update: "{{collection}} {{slug}} aktualisiert", - delete: "{{collection}} {{slug}} gelöscht", - updateMedia: "{{path}} hochgeladen", - deleteMedia: "{{path}} gelöscht" - } + backend: { + name: "gitea", + repo: "gcg/gcg-website", + branch: "master", + api_root: "https://git.cantorgymnasium.de/api/v1", + base_url: "https://oauth.cantorgymnasium.de", + commit_messages: { + create: "{{collection}} {{slug}} erstellt", + update: "{{collection}} {{slug}} aktualisiert", + delete: "{{collection}} {{slug}} gelöscht", + updateMedia: "{{path}} hochgeladen", + deleteMedia: "{{path}} gelöscht", }, - local_backend: true, - media_folder: "/static/media", - public_folder: "/media", - media_library: { - max_file_size: 10240000, - folder_support: true - }, - site_url: "https://cantorgymnasium.de/schulchronik/", - locale: "de", - slug: { - encoding: "ascii", - clean_accents: true, - sanitize_replacement: "-" - }, - collections: [ - ChronikjahreCollection, - SuperhaufenCollection, - CantorpreisCollection, - AbiturientenCollection, - CantorforaCollection, - ChronikseitenCollection - ] + }, + local_backend: true, + media_folder: "/static/media", + public_folder: "/media", + media_library: { + max_file_size: 10240000, + folder_support: true, + }, + site_url: "https://cantorgymnasium.de/schulchronik/", + locale: "de", + slug: { + encoding: "ascii", + clean_accents: true, + sanitize_replacement: "-", + }, + collections: [ + ChronikjahreCollection, + SuperhaufenCollection, + CantorpreisCollection, + AbiturientenCollection, + CantorforaCollection, + ChronikseitenCollection, + StatsCollection, + ], }; -export default config; \ No newline at end of file +export default config; diff --git a/static/admin/icons.js b/static/admin/icons.js index 3c0e9f02..5a413453 100644 --- a/static/admin/icons.js +++ b/static/admin/icons.js @@ -1,37 +1,36 @@ const IconNames = { - settings: "mdi mdi-cog-outline", - user: "mdi mdi-fountain-pen-tip", - page: "mdi mdi-file-document-outline", - "page-add": "mdi mdi-file-document-plus-outline", - document: "mdi mdi-file-document-multiple-outline", - news: "mdi mdi-newspaper", - award: "mdi mdi-seal-variant", - group: "mdi mdi-crowd", - trophy: "mdi mdi-trophy-outline", - pi: "mdi mdi-pi-box", - schulchronik: "mdi mdi-pillar", - "graduation-cap": "mdi mdi-school-outline", - help: "mdi mdi-lifebuoy", - dash: "mdi mdi-monitor-dashboard", - presentation: "mdi mdi-presentation", - projektwoche: "mdi mdi-calendar-range-outline", - superhaufen: "mdi mdi-view-dashboard", - stats: "mdi mdi-chart-bar", - }; - - let Icons = []; - - for (let [name, icon] of Object.entries(IconNames)) { - Icons.push({ - name, - icon: () => - h( - "div", - { className: "flex items-center" }, - h("i", { className: icon, style: { fontSize: "1.5rem" } }) - ), - }); - } - - export default Icons; - \ No newline at end of file + settings: "mdi mdi-cog-outline", + user: "mdi mdi-fountain-pen-tip", + page: "mdi mdi-file-document-outline", + "page-add": "mdi mdi-file-document-plus-outline", + document: "mdi mdi-file-document-multiple-outline", + news: "mdi mdi-newspaper", + award: "mdi mdi-seal-variant", + group: "mdi mdi-crowd", + trophy: "mdi mdi-trophy-outline", + pi: "mdi mdi-pi-box", + schulchronik: "mdi mdi-pillar", + "graduation-cap": "mdi mdi-school-outline", + help: "mdi mdi-lifebuoy", + dash: "mdi mdi-monitor-dashboard", + presentation: "mdi mdi-presentation", + projektwoche: "mdi mdi-calendar-range-outline", + superhaufen: "mdi mdi-view-dashboard", + stats: "mdi mdi-chart-bar", +}; + +let Icons = []; + +for (let [name, icon] of Object.entries(IconNames)) { + Icons.push({ + name, + icon: () => + h( + "div", + { className: "flex items-center" }, + h("i", { className: icon, style: { fontSize: "1.5rem" } }) + ), + }); +} + +export default Icons; diff --git a/static/admin/index.html b/static/admin/index.html index 7e7bd7c1..f6dae4de 100644 --- a/static/admin/index.html +++ b/static/admin/index.html @@ -3,8 +3,14 @@ - - + + Static CMS @@ -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 = "/"; + } + }, + }); diff --git a/static/admin/links/index.js b/static/admin/links/index.js index c590912f..792fdf2d 100644 --- a/static/admin/links/index.js +++ b/static/admin/links/index.js @@ -2,4 +2,4 @@ import StatusPage from "./status.js"; import WikiLink from "./wiki.js"; -export { StatusPage, WikiLink }; \ No newline at end of file +export { StatusPage, WikiLink }; diff --git a/static/admin/links/status.js b/static/admin/links/status.js index 4878e7c4..7f25f3e7 100644 --- a/static/admin/links/status.js +++ b/static/admin/links/status.js @@ -1,17 +1,17 @@ const StatusPage = { - id: "status", - title: "Status", - data: () => - h("iframe", { - src: "https://grafana.cantorgymnasium.de/d/ni-7T-J4z/status?orgId=2&refresh=5s&kiosk", - style: { - width: "100%", - height: "90vh", - }, - }), - options: { - icon: "dash", - }, + id: "status", + title: "Status", + data: () => + h("iframe", { + src: "https://grafana.cantorgymnasium.de/d/ni-7T-J4z/status?orgId=2&refresh=5s&kiosk", + style: { + width: "100%", + height: "90vh", + }, + }), + options: { + icon: "dash", + }, }; export default StatusPage; diff --git a/static/admin/links/wiki.js b/static/admin/links/wiki.js index 96ea5144..cee4b943 100644 --- a/static/admin/links/wiki.js +++ b/static/admin/links/wiki.js @@ -1,10 +1,10 @@ const WikiLink = { - id: "wiki", - title: "GCG.Wiki", - data: "https://wiki.cantorgymnasium.de", - options: { - icon: "help", - }, + id: "wiki", + title: "GCG.Wiki", + data: "https://wiki.cantorgymnasium.de", + options: { + icon: "help", + }, }; export default WikiLink; diff --git a/static/admin/previews/field-previews/boolean-preview.js b/static/admin/previews/field-previews/boolean-preview.js index 325ee0d6..7734cb85 100644 --- a/static/admin/previews/field-previews/boolean-preview.js +++ b/static/admin/previews/field-previews/boolean-preview.js @@ -1,6 +1,6 @@ const BooleanPreview = ({ value }) => - h("i", { - className: value ? "mdi mdi-check" : "mdi mdi-close", - }); + h("i", { + className: value ? "mdi mdi-check" : "mdi mdi-close", + }); export default BooleanPreview; diff --git a/static/admin/previews/field-previews/components/truncate.js b/static/admin/previews/field-previews/components/truncate.js index f8fd3be0..fe2f8be9 100644 --- a/static/admin/previews/field-previews/components/truncate.js +++ b/static/admin/previews/field-previews/components/truncate.js @@ -1,9 +1,9 @@ function truncate(str, num) { - if (str.length > num) { - return str.slice(0, num) + "..."; - } else { - return str; - } + if (str.length > num) { + return str.slice(0, num) + "..."; + } else { + return str; + } } export default truncate; diff --git a/static/admin/previews/field-previews/date-preview.js b/static/admin/previews/field-previews/date-preview.js index 83676a46..e131e43b 100644 --- a/static/admin/previews/field-previews/date-preview.js +++ b/static/admin/previews/field-previews/date-preview.js @@ -1,13 +1,13 @@ const DatePreview = ({ value }) => - h( - "p", - {}, - new Intl.DateTimeFormat("de-DE", { - year: "numeric", - month: "2-digit", - day: "2-digit", - hour12: false, - }).format(new Date(value)) - ); + h( + "p", + {}, + new Intl.DateTimeFormat("de-DE", { + year: "numeric", + month: "2-digit", + day: "2-digit", + hour12: false, + }).format(new Date(value)) + ); export default DatePreview; diff --git a/static/admin/previews/field-previews/draft-preview.js b/static/admin/previews/field-previews/draft-preview.js index 0d578c49..55b51276 100644 --- a/static/admin/previews/field-previews/draft-preview.js +++ b/static/admin/previews/field-previews/draft-preview.js @@ -1,21 +1,21 @@ const DraftPreview = ({ value }) => - h( - "div", - { - style: { - backgroundColor: value === true ? "rgb(37 99 235)" : "rgb(22 163 74)", - color: "white", - border: "none", - padding: "2px 6px", - textAlign: "center", - textDecoration: "none", - display: "inline-block", - cursor: "pointer", - borderRadius: "4px", - fontSize: "14px", - }, - }, - value ? "Entwurf" : "Veröffentlicht" - ); + h( + "div", + { + style: { + backgroundColor: value === true ? "rgb(37 99 235)" : "rgb(22 163 74)", + color: "white", + border: "none", + padding: "2px 6px", + textAlign: "center", + textDecoration: "none", + display: "inline-block", + cursor: "pointer", + borderRadius: "4px", + fontSize: "14px", + }, + }, + value ? "Entwurf" : "Veröffentlicht" + ); export default DraftPreview; diff --git a/static/admin/previews/field-previews/index.js b/static/admin/previews/field-previews/index.js index 6ab5da0f..2c24f49b 100644 --- a/static/admin/previews/field-previews/index.js +++ b/static/admin/previews/field-previews/index.js @@ -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 }; diff --git a/static/admin/previews/page-previews/abiturienten-preview.js b/static/admin/previews/page-previews/abiturienten-preview.js index b4d74476..02b2f9de 100644 --- a/static/admin/previews/page-previews/abiturienten-preview.js +++ b/static/admin/previews/page-previews/abiturienten-preview.js @@ -1,32 +1,32 @@ import { Container, PageHeader, Section, Row } from "./components/index.js"; const AbiturientenPreview = ({ widgetFor, entry, collection, fields }) => { - const imageField = useMemo( - () => fields.find((field) => field.name === "image"), - [fields] - ); + const imageField = useMemo( + () => fields.find((field) => field.name === "image"), + [fields] + ); - const imageUrl = useMediaAsset( - entry.data.image, - collection, - imageField, - entry - ); - return [ - PageHeader(entry), - Section( - Container( - Row([ - h( - "div", - { className: "col-12 mb-4" }, - h("img", { className: "img-fluid w-100", src: imageUrl }) - ), - h("div", { className: "col-12 content" }, widgetFor("body")), - ]) - ) - ), - ]; + const imageUrl = useMediaAsset( + entry.data.image, + collection, + imageField, + entry + ); + return [ + PageHeader(entry), + Section( + Container( + Row([ + h( + "div", + { className: "col-12 mb-4" }, + h("img", { className: "img-fluid w-100", src: imageUrl }) + ), + h("div", { className: "col-12 content" }, widgetFor("body")), + ]) + ) + ), + ]; }; export default AbiturientenPreview; diff --git a/static/admin/previews/page-previews/about-preview.js b/static/admin/previews/page-previews/about-preview.js index 6d75d29f..abb7b4e9 100644 --- a/static/admin/previews/page-previews/about-preview.js +++ b/static/admin/previews/page-previews/about-preview.js @@ -1,64 +1,64 @@ import { PageHeader } from "./components/index.js"; const AboutPreview = ({ widgetFor, widgetsFor, entry, fields, collection }) => { - const imageField = useMemo( - () => fields.find((field) => field.name === "image"), - [fields] - ); + const imageField = useMemo( + () => fields.find((field) => field.name === "image"), + [fields] + ); - const imageUrl = useMediaAsset( - entry.data.image, - collection, - imageField, - entry - ); - return [ - PageHeader(entry), - h( - "section", - { className: "section-sm" }, - h( - "div", - { className: "container" }, - h( - "div", - { className: "row" }, - h( - "div", - { className: "col-12" }, - h("img", { className: "img-fluid w-100 mb-4", src: imageUrl }), - widgetFor("body") - ) - ) - ) - ), - entry.data.stats.enable - ? h( - "section", - { className: "section-sm bg-primary" }, - h( - "div", - { className: "container" }, - h( - "div", - { className: "row" }, - widgetsFor("stats").data.zahlen.map((element) => { - return h( - "div", - { className: "col-md-4 col-sm-6 mb-4 mb-md-0" }, - h( - "div", - { className: "text-center" }, - h("h2", { className: "count text-white" }, element.count), - h("h5", { className: "text-white" }, element.name) - ) - ); - }) - ) - ) - ) - : null, - ]; + const imageUrl = useMediaAsset( + entry.data.image, + collection, + imageField, + entry + ); + return [ + PageHeader(entry), + h( + "section", + { className: "section-sm" }, + h( + "div", + { className: "container" }, + h( + "div", + { className: "row" }, + h( + "div", + { className: "col-12" }, + h("img", { className: "img-fluid w-100 mb-4", src: imageUrl }), + widgetFor("body") + ) + ) + ) + ), + entry.data.stats.enable + ? h( + "section", + { className: "section-sm bg-primary" }, + h( + "div", + { className: "container" }, + h( + "div", + { className: "row" }, + widgetsFor("stats").data.zahlen.map((element) => { + return h( + "div", + { className: "col-md-4 col-sm-6 mb-4 mb-md-0" }, + h( + "div", + { className: "text-center" }, + h("h2", { className: "count text-white" }, element.count), + h("h5", { className: "text-white" }, element.name) + ) + ); + }) + ) + ) + ) + : null, + ]; }; export default AboutPreview; diff --git a/static/admin/previews/page-previews/anmeldeformular-preview.js b/static/admin/previews/page-previews/anmeldeformular-preview.js index cb029d8f..4e6f082a 100644 --- a/static/admin/previews/page-previews/anmeldeformular-preview.js +++ b/static/admin/previews/page-previews/anmeldeformular-preview.js @@ -1,159 +1,159 @@ import { PageHeader } from "./components/index.js"; const AnmeldeformularPreview = ({ widgetFor, entry }) => { - return [ - PageHeader(entry), - h( - "section", - { className: "section-sm bg-gray" }, - h( - "div", - { className: "container" }, - h( - "div", - { className: "row" }, - h( - "div", - { className: "col-lg-8 mb-4 mb-lg-0" }, - h( - "form", - {}, - h( - "div", - { className: "input-group" }, - h("input", { - className: "form-control mb-3", - type: "text", - placeholder: "Name (Schüler/in)", - }), - h("input", { - className: "form-control mb-3", - type: "text", - placeholder: "Vorname", - }) - ), - h( - "div", - { className: "input-group mb-3" }, - h("span", { className: "input-group-text" }, "Geburtsdatum"), - h("input", { className: "form-control", type: "date" }) - ), - h("input", { - className: "form-control mb-3", - type: "text", - placeholder: "Straße", - }), - h( - "div", - { className: "input-group" }, - h("input", { - className: "form-control mb-3", - type: "text", - placeholder: "Hausnummer", - }), - h("input", { - className: "form-control mb-3", - type: "text", - placeholder: "Adresszusatz", - }) - ), - h( - "div", - { className: "input-group" }, - h("input", { - className: "form-control mb-3", - type: "text", - placeholder: "PLZ", - }), - h("input", { - className: "form-control mb-3", - type: "text", - placeholder: "Stadt", - }) - ), - h("input", { - className: "form-control mb-3", - type: "text", - placeholder: "Landkreis", - }), - h( - "div", - { className: "input-group" }, - h("input", { - className: "form-control mb-3", - type: "text", - placeholder: "Telefon privat", - }), - h("input", { - className: "form-control mb-3", - type: "text", - placeholder: "Telefon dienstl.", - }) - ), - h("input", { - className: "form-control mb-3", - type: "text", - placeholder: "Abweichender Elternname", - }), - h("input", { - className: "form-control mb-3", - type: "text", - placeholder: "Grundschule", - }), - h("input", { - className: "form-control mb-3", - type: "text", - placeholder: "Ihre E-Mail-Adresse", - }), - h("textarea", { - className: "form-control mb-3", - placeholder: "Bemerkungen", - }), - h( - "div", - { className: "input-group mb-3" }, - h("input", { className: "form-control", type: "file" }), - h( - "span", - { className: "input-group-text" }, - "Zeugnis (Vorderseite)" - ) - ), - h( - "div", - { className: "input-group mb-3" }, - h("input", { className: "form-control", type: "file" }), - h( - "span", - { className: "input-group-text" }, - "Zeugnis (Rückseite)" - ) - ), - h( - "div", - { className: "input-group mb-3" }, - h( - "div", - { className: "input-group-text" }, - h("input", { - className: "form-check-input", - type: "checkbox", - }) - ), - h( - "p", - { className: "form-control mb-0" }, - "Hiermit melden wir unser Kind verbindlich zur Aufnahmeprüfung an." - ) - ), - h("button", { className: "btn btn-primary" }, "Senden") - ) - ), - h("div", { className: "col-lg-4" }, widgetFor("body")) - ) - ) - ), - ]; + return [ + PageHeader(entry), + h( + "section", + { className: "section-sm bg-gray" }, + h( + "div", + { className: "container" }, + h( + "div", + { className: "row" }, + h( + "div", + { className: "col-lg-8 mb-4 mb-lg-0" }, + h( + "form", + {}, + h( + "div", + { className: "input-group" }, + h("input", { + className: "form-control mb-3", + type: "text", + placeholder: "Name (Schüler/in)", + }), + h("input", { + className: "form-control mb-3", + type: "text", + placeholder: "Vorname", + }) + ), + h( + "div", + { className: "input-group mb-3" }, + h("span", { className: "input-group-text" }, "Geburtsdatum"), + h("input", { className: "form-control", type: "date" }) + ), + h("input", { + className: "form-control mb-3", + type: "text", + placeholder: "Straße", + }), + h( + "div", + { className: "input-group" }, + h("input", { + className: "form-control mb-3", + type: "text", + placeholder: "Hausnummer", + }), + h("input", { + className: "form-control mb-3", + type: "text", + placeholder: "Adresszusatz", + }) + ), + h( + "div", + { className: "input-group" }, + h("input", { + className: "form-control mb-3", + type: "text", + placeholder: "PLZ", + }), + h("input", { + className: "form-control mb-3", + type: "text", + placeholder: "Stadt", + }) + ), + h("input", { + className: "form-control mb-3", + type: "text", + placeholder: "Landkreis", + }), + h( + "div", + { className: "input-group" }, + h("input", { + className: "form-control mb-3", + type: "text", + placeholder: "Telefon privat", + }), + h("input", { + className: "form-control mb-3", + type: "text", + placeholder: "Telefon dienstl.", + }) + ), + h("input", { + className: "form-control mb-3", + type: "text", + placeholder: "Abweichender Elternname", + }), + h("input", { + className: "form-control mb-3", + type: "text", + placeholder: "Grundschule", + }), + h("input", { + className: "form-control mb-3", + type: "text", + placeholder: "Ihre E-Mail-Adresse", + }), + h("textarea", { + className: "form-control mb-3", + placeholder: "Bemerkungen", + }), + h( + "div", + { className: "input-group mb-3" }, + h("input", { className: "form-control", type: "file" }), + h( + "span", + { className: "input-group-text" }, + "Zeugnis (Vorderseite)" + ) + ), + h( + "div", + { className: "input-group mb-3" }, + h("input", { className: "form-control", type: "file" }), + h( + "span", + { className: "input-group-text" }, + "Zeugnis (Rückseite)" + ) + ), + h( + "div", + { className: "input-group mb-3" }, + h( + "div", + { className: "input-group-text" }, + h("input", { + className: "form-check-input", + type: "checkbox", + }) + ), + h( + "p", + { className: "form-control mb-0" }, + "Hiermit melden wir unser Kind verbindlich zur Aufnahmeprüfung an." + ) + ), + h("button", { className: "btn btn-primary" }, "Senden") + ) + ), + h("div", { className: "col-lg-4" }, widgetFor("body")) + ) + ) + ), + ]; }; export default AnmeldeformularPreview; diff --git a/static/admin/previews/page-previews/anmeldung-preview.js b/static/admin/previews/page-previews/anmeldung-preview.js index 2782eaf6..56f9e8e7 100644 --- a/static/admin/previews/page-previews/anmeldung-preview.js +++ b/static/admin/previews/page-previews/anmeldung-preview.js @@ -1,44 +1,44 @@ import { PageHeader } from "./components/index.js"; const AnmeldungPreview = ({ widgetsFor, widgetFor, entry }) => { - return [ - PageHeader(entry), - h( - "section", - { className: "section-sm" }, - h( - "div", - { className: "container" }, - h( - "div", - { className: "row mb-4" }, - h("div", { className: "col-md-6 content" }, widgetFor("body")) - ), - h( - "div", - { className: "row" }, - widgetsFor("elements").map(function (element, index) { - return h( - "div", - { - className: "col-lg-6 col-sm-6 mb-4 d-flex align-items-stretch", - }, - h( - "div", - { className: "card rounded-0 hover-shadow border-primary" }, - h( - "div", - { className: "card-body" }, - h("h4", { className: "card-title mb-3" }, element.data.title), - h("div", { className: "content" }, element.widgets.content) - ) - ) - ); - }) - ) - ) - ), - ]; + return [ + PageHeader(entry), + h( + "section", + { className: "section-sm" }, + h( + "div", + { className: "container" }, + h( + "div", + { className: "row mb-4" }, + h("div", { className: "col-md-6 content" }, widgetFor("body")) + ), + h( + "div", + { className: "row" }, + widgetsFor("elements").map(function (element, index) { + return h( + "div", + { + className: "col-lg-6 col-sm-6 mb-4 d-flex align-items-stretch", + }, + h( + "div", + { className: "card rounded-0 hover-shadow border-primary" }, + h( + "div", + { className: "card-body" }, + h("h4", { className: "card-title mb-3" }, element.data.title), + h("div", { className: "content" }, element.widgets.content) + ) + ) + ); + }) + ) + ) + ), + ]; }; export default AnmeldungPreview; diff --git a/static/admin/previews/page-previews/author-preview.js b/static/admin/previews/page-previews/author-preview.js index 595f3d3b..c2cd1ec7 100644 --- a/static/admin/previews/page-previews/author-preview.js +++ b/static/admin/previews/page-previews/author-preview.js @@ -1,72 +1,72 @@ import { PageHeader, md5 } from "./components/index.js"; const AuthorPreview = ({ widgetFor, entry, fields, collection }) => { - const imageField = useMemo( - () => fields.find((field) => field.name === "image"), - [fields] - ); + const imageField = useMemo( + () => fields.find((field) => field.name === "image"), + [fields] + ); - const imageUrl = entry.data.image - ? useMediaAsset(entry.data.image, collection, imageField, entry) - : entry.data.email - ? undefined - : useMediaAsset("/media/people/gcg.webp", collection, imageField, entry); + const imageUrl = entry.data.image + ? useMediaAsset(entry.data.image, collection, imageField, entry) + : entry.data.email + ? undefined + : useMediaAsset("/media/people/gcg.webp", collection, imageField, entry); - return [ - PageHeader(entry), - h( - "section", - { className: "section-sm bg-light" }, - h( - "div", - { className: "container" }, - h( - "div", - { className: "row" }, - h( - "div", - { className: "col-lg-10 mx-auto" }, - h( - "div", - { className: "text-center" }, - h( - "figure", - {}, - h("img", { - className: "rounded-circle img-fluid mb-4", - src: - imageUrl ?? - "https://www.gravatar.com/avatar/" + - md5(entry.data.email) + - "?s=128&pg&d=identicon", - width: "128px", - }), - h( - "figcaption", - {}, - h("h4", { className: "fw-bold" }, entry.data.title) - ) - ), - h("hr"), - widgetFor("body"), - h("hr"), - h( - "ul", - { className: "list-inline" }, - entry.data.email - ? h( - "li", - { className: "list-inline-item" }, - h("i", { className: "mdi mdi-at" }) - ) - : null - ) - ) - ) - ) - ) - ), - ]; + return [ + PageHeader(entry), + h( + "section", + { className: "section-sm bg-light" }, + h( + "div", + { className: "container" }, + h( + "div", + { className: "row" }, + h( + "div", + { className: "col-lg-10 mx-auto" }, + h( + "div", + { className: "text-center" }, + h( + "figure", + {}, + h("img", { + className: "rounded-circle img-fluid mb-4", + src: + imageUrl ?? + "https://www.gravatar.com/avatar/" + + md5(entry.data.email) + + "?s=128&pg&d=identicon", + width: "128px", + }), + h( + "figcaption", + {}, + h("h4", { className: "fw-bold" }, entry.data.title) + ) + ), + h("hr"), + widgetFor("body"), + h("hr"), + h( + "ul", + { className: "list-inline" }, + entry.data.email + ? h( + "li", + { className: "list-inline-item" }, + h("i", { className: "mdi mdi-at" }) + ) + : null + ) + ) + ) + ) + ) + ), + ]; }; export default AuthorPreview; diff --git a/static/admin/previews/page-previews/blog-preview.js b/static/admin/previews/page-previews/blog-preview.js index 61297bdd..aefb5cb2 100644 --- a/static/admin/previews/page-previews/blog-preview.js +++ b/static/admin/previews/page-previews/blog-preview.js @@ -1,89 +1,89 @@ import { - DateFormat, - PageHeader, - Section, - Container, - Col12, - Row, + DateFormat, + PageHeader, + Section, + Container, + Col12, + Row, } from "./components/index.js"; const BlogPreview = ({ widgetFor, entry, fields, collection }) => { - const imageField = useMemo(() => { - return fields.find((field) => field.name === "image"); - }, [fields]); + const imageField = useMemo(() => { + return fields.find((field) => field.name === "image"); + }, [fields]); - const imageUrl = useMediaAsset( - entry.data.image, - collection, - imageField, - entry - ); - return [ - PageHeader(entry), - Section( - Container( - Row([ - h( - "div", - { key: "cover-image", className: "col-12 mb-4" }, - h("img", { className: "img-fluid w-100", src: imageUrl }) - ), - Col12( - h( - "div", - { className: "row mb-3" }, - h( - "div", - { className: "col-6 mb-md-0 text-light" }, - h("span", { className: "fw-bold me-1" }, "Geschrieben von:"), - entry.data.author - ), - h( - "div", - { className: "col-6 mb-3 mb-md-0 text-light" }, - h("span", { className: "fw-bold me-1" }, "Datum:"), - entry.data.date - ? DateFormat({ - date: entry.data.date, - format: { - day: "numeric", - month: "short", - year: "numeric", - }, - }) - : "" - ) - ) - ), - Row( - h( - "div", - { className: "col-12 mb-md-0 text-light" }, - h("span", { className: "fw-bold me-1" }, "Kategorie:"), - entry.data.categories - ? entry.data.categories.map( - (category, index) => (index != 0 ? ", " : "") + category - ) - : "" - ) - ), - h( - "div", - { key: "border-bottom", className: "col-12 my-4" }, - h("div", { className: "border-bottom" }) - ), - h( - "div", - { - key: "body-content", - className: "col-12 mb-5 content content-justify", - }, - widgetFor("body") - ), - ]) - ) - ), - ]; + const imageUrl = useMediaAsset( + entry.data.image, + collection, + imageField, + entry + ); + return [ + PageHeader(entry), + Section( + Container( + Row([ + h( + "div", + { key: "cover-image", className: "col-12 mb-4" }, + h("img", { className: "img-fluid w-100", src: imageUrl }) + ), + Col12( + h( + "div", + { className: "row mb-3" }, + h( + "div", + { className: "col-6 mb-md-0 text-light" }, + h("span", { className: "fw-bold me-1" }, "Geschrieben von:"), + widgetFor("author") + ), + h( + "div", + { className: "col-6 mb-3 mb-md-0 text-light" }, + h("span", { className: "fw-bold me-1" }, "Datum:"), + entry.data.date + ? DateFormat({ + date: entry.data.date, + format: { + day: "numeric", + month: "short", + year: "numeric", + }, + }) + : "" + ) + ) + ), + Row( + h( + "div", + { className: "col-12 mb-md-0 text-light" }, + h("span", { className: "fw-bold me-1" }, "Kategorie:"), + entry.data.categories + ? entry.data.categories.map( + (category, index) => (index != 0 ? ", " : "") + category + ) + : "" + ) + ), + h( + "div", + { key: "border-bottom", className: "col-12 my-4" }, + h("div", { className: "border-bottom" }) + ), + h( + "div", + { + key: "body-content", + className: "col-12 mb-5 content content-justify", + }, + widgetFor("body") + ), + ]) + ) + ), + ]; }; export default BlogPreview; diff --git a/static/admin/previews/page-previews/cantorpreis-preview.js b/static/admin/previews/page-previews/cantorpreis-preview.js index 0cd225d5..f3fe546d 100644 --- a/static/admin/previews/page-previews/cantorpreis-preview.js +++ b/static/admin/previews/page-previews/cantorpreis-preview.js @@ -1,49 +1,49 @@ import { - PageHeader, - Section, - Container, - Row, - Content, + PageHeader, + Section, + Container, + Row, + Content, } from "./components/index.js"; const CantorpreisPreview = ({ widgetFor, entry, fields, collection }) => { - const imageField = useMemo( - () => fields.find((field) => field.name === "image"), - [fields] - ); + const imageField = useMemo( + () => fields.find((field) => field.name === "image"), + [fields] + ); - const imageUrl = useMediaAsset( - entry.data.image, - collection, - imageField, - entry - ); + const imageUrl = useMediaAsset( + entry.data.image, + collection, + imageField, + entry + ); - return [ - PageHeader(entry), - Section( - Container( - Row([ - h( - "div", - { className: "col-md-5 mb-5" }, - h("img", { - className: "img-fluid w-75", - src: imageUrl, - alt: entry.data.name, - }) - ), - h( - "div", - { className: "col-md-7 mb-5" }, - h("h3", {}, entry.data.name), - h("h6", { className: "text-color" }, entry.data.title), - Content(widgetFor("body")) - ), - ]) - ) - ), - ]; + return [ + PageHeader(entry), + Section( + Container( + Row([ + h( + "div", + { className: "col-md-5 mb-5" }, + h("img", { + className: "img-fluid w-75", + src: imageUrl, + alt: entry.data.name, + }) + ), + h( + "div", + { className: "col-md-7 mb-5" }, + h("h3", {}, entry.data.name), + h("h6", { className: "text-color" }, entry.data.title), + Content(widgetFor("body")) + ), + ]) + ) + ), + ]; }; export default CantorpreisPreview; diff --git a/static/admin/previews/page-previews/chronik-index-preview.js b/static/admin/previews/page-previews/chronik-index-preview.js index 97076751..a255f6bf 100644 --- a/static/admin/previews/page-previews/chronik-index-preview.js +++ b/static/admin/previews/page-previews/chronik-index-preview.js @@ -1,113 +1,113 @@ import { PageHeader } from "./components/index.js"; const ChronikIndexPreview = ({ - widgetFor, - widgetsFor, - entry, - fields, - collection, + widgetFor, + widgetsFor, + entry, + fields, + collection, }) => { - const imageField = useMemo( - () => fields.find((field) => field.name === "image"), - [fields] - ); + const imageField = useMemo( + () => fields.find((field) => field.name === "image"), + [fields] + ); - const imageUrl = useMediaAsset( - widgetsFor("infocard").data.image, - collection, - imageField, - entry - ); - return [ - PageHeader(entry), - h( - "section", - { className: "section-sm" }, - h("div", { className: "container" }, widgetFor("body")), - widgetsFor("infocard").data.enable - ? h( - "div", - { className: "container" }, - h( - "div", - { className: "card mb-3" }, - h( - "div", - { className: "row g-0" }, - h( - "div", - { className: "col-md-3" }, - h("img", { - className: "img-fluid rounded w-100", - src: imageUrl, - }) - ), - h( - "div", - { className: "col-md-9 d-flex align-items-center" }, - h( - "div", - { className: "card-body" }, - h( - "p", - { className: "h2 card-title" }, - widgetsFor("infocard").data.quote - ), - h( - "p", - { className: "card-text" }, - h( - "small", - { className: "text-muted" }, - widgetsFor("infocard").data.author - ) - ) - ) - ) - ) - ) - ) - : null, - h( - "div", - { className: "container" }, - h("h2", { className: "section-title" }, "Informationsseiten"), - h( - "div", - { className: "row" }, - widgetsFor("links").map((element) => - h( - "div", - { className: "col-lg-4 col-sm-6" }, - h( - "div", - { - className: "card border-primary rounded-0 hover-shadow mb-4", - }, - h( - "div", - { className: "card-body" }, - h( - "h4", - { className: "card-title text-truncate" }, - h("a", { href: element.data.link }, element.data.title) - ), - h( - "a", - { - className: "btn btn-primary btn-sm", - href: element.data.link, - }, - "Mehr anzeigen" - ) - ) - ) - ) - ) - ) - ) - ), - ]; + const imageUrl = useMediaAsset( + widgetsFor("infocard").data.image, + collection, + imageField, + entry + ); + return [ + PageHeader(entry), + h( + "section", + { className: "section-sm" }, + h("div", { className: "container" }, widgetFor("body")), + widgetsFor("infocard").data.enable + ? h( + "div", + { className: "container" }, + h( + "div", + { className: "card mb-3" }, + h( + "div", + { className: "row g-0" }, + h( + "div", + { className: "col-md-3" }, + h("img", { + className: "img-fluid rounded w-100", + src: imageUrl, + }) + ), + h( + "div", + { className: "col-md-9 d-flex align-items-center" }, + h( + "div", + { className: "card-body" }, + h( + "p", + { className: "h2 card-title" }, + widgetsFor("infocard").data.quote + ), + h( + "p", + { className: "card-text" }, + h( + "small", + { className: "text-muted" }, + widgetsFor("infocard").data.author + ) + ) + ) + ) + ) + ) + ) + : null, + h( + "div", + { className: "container" }, + h("h2", { className: "section-title" }, "Informationsseiten"), + h( + "div", + { className: "row" }, + widgetsFor("links").map((element) => + h( + "div", + { className: "col-lg-4 col-sm-6" }, + h( + "div", + { + className: "card border-primary rounded-0 hover-shadow mb-4", + }, + h( + "div", + { className: "card-body" }, + h( + "h4", + { className: "card-title text-truncate" }, + h("a", { href: element.data.link }, element.data.title) + ), + h( + "a", + { + className: "btn btn-primary btn-sm", + href: element.data.link, + }, + "Mehr anzeigen" + ) + ) + ) + ) + ) + ) + ) + ), + ]; }; export default ChronikIndexPreview; diff --git a/static/admin/previews/page-previews/chronik-preview.js b/static/admin/previews/page-previews/chronik-preview.js index fe5e81da..1de5179d 100644 --- a/static/admin/previews/page-previews/chronik-preview.js +++ b/static/admin/previews/page-previews/chronik-preview.js @@ -1,7 +1,7 @@ import { PageHeader } from "./components/index.js"; const ChronikPreview = ({ widgetFor, widgetsFor, entry, document, window }) => { - /*return [PageHeader, + /*return [PageHeader, h('section', {className: "section-sm"}, h('div', {className: "container"}, h('div', {className: "row"}, diff --git a/static/admin/previews/page-previews/components/base.js b/static/admin/previews/page-previews/components/base.js index ecb995d4..71d77ada 100644 --- a/static/admin/previews/page-previews/components/base.js +++ b/static/admin/previews/page-previews/components/base.js @@ -1,5 +1,5 @@ const Section = (children) => - h("section", { className: "section-sm" }, children); + h("section", { className: "section-sm" }, children); const Container = (children) => h("div", { className: "container" }, children); const Row = (children) => h("div", { className: "row" }, children); const Content = (children) => h("div", { className: "content" }, children); diff --git a/static/admin/previews/page-previews/components/date-format.js b/static/admin/previews/page-previews/components/date-format.js index 2149f20e..112dc9a3 100644 --- a/static/admin/previews/page-previews/components/date-format.js +++ b/static/admin/previews/page-previews/components/date-format.js @@ -1,5 +1,5 @@ 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; diff --git a/static/admin/previews/page-previews/components/page-header.js b/static/admin/previews/page-previews/components/page-header.js index 40595fa9..61586fc5 100644 --- a/static/admin/previews/page-previews/components/page-header.js +++ b/static/admin/previews/page-previews/components/page-header.js @@ -1,51 +1,51 @@ const PageHeader = (entry) => { - return h( - "section", - { - key: "page-header", - className: "page-title-section overlay", - style: { - backgroundImage: - 'url("/media/titelbild.webp"),url("/media/titelbild.webp")', - }, - }, - h( - "div", - { className: "container" }, - h( - "div", - { className: "row" }, - h( - "div", - { className: "col-md-8 position-relative" }, - h( - "ul", - { className: "list-inline" }, - h( - "li", - { className: "list-inline-item h2" }, - h( - "font", - { className: "text-primary font-secondary", href: "" }, - "Startseite" - ) - ), - h( - "li", - { className: "list-inline-item h2" }, - h("i", { className: "mdi mdi-chevron-double-right text-white" }) - ), - h( - "li", - { className: "list-inline-item text-white h2 font-secondary" }, - entry.data.title - ) - ), - h("p", { className: "text-lighten" }, entry.data.description) - ) - ) - ) - ); + return h( + "section", + { + key: "page-header", + className: "page-title-section overlay", + style: { + backgroundImage: + 'url("/media/titelbild.webp"),url("/media/titelbild.webp")', + }, + }, + h( + "div", + { className: "container" }, + h( + "div", + { className: "row" }, + h( + "div", + { className: "col-md-8 position-relative" }, + h( + "ul", + { className: "list-inline" }, + h( + "li", + { className: "list-inline-item h2" }, + h( + "font", + { className: "text-primary font-secondary", href: "" }, + "Startseite" + ) + ), + h( + "li", + { className: "list-inline-item h2" }, + h("i", { className: "mdi mdi-chevron-double-right text-white" }) + ), + h( + "li", + { className: "list-inline-item text-white h2 font-secondary" }, + entry.data.title + ) + ), + h("p", { className: "text-lighten" }, entry.data.description) + ) + ) + ) + ); }; export default PageHeader; diff --git a/static/admin/previews/page-previews/contest-preview.js b/static/admin/previews/page-previews/contest-preview.js index 74a089d3..9cdd374b 100644 --- a/static/admin/previews/page-previews/contest-preview.js +++ b/static/admin/previews/page-previews/contest-preview.js @@ -1,65 +1,64 @@ import { Container, PageHeader, Row, Section } from "./components/index.js"; const ContestPreview = ({ widgetFor, entry, fields, collection }) => { - const imageField = useMemo(() => { - return fields.find((field) => field.name === "image"); - }, [fields]); + const imageField = useMemo(() => { + return fields.find((field) => field.name === "image"); + }, [fields]); - const imageUrl = useMediaAsset( - entry.data.image, - collection, - imageField, - entry - ); - return [ - PageHeader(entry), - Section( - Container([ - entry.data.image && - entry.data.image != "/media/image.webp" - ? Row( - h( - "div", - { className: "col-12 mb-4" }, - h("img", { className: "img-fluid w-100", src: imageUrl }) - ) - ) - : null, - h( - "div", - { className: "row mb-4" }, - h( - "div", - { className: "col-7" }, - h( - "div", - { className: "d-flex align-items-center" }, - h("i", { className: "mdi mdi-crowd text-primary icon-md me-2" }), - h( - "div", - { className: "text-start" }, - h("h6", { className: "mb-0" }, "KLASSE(N)"), - h("p", { className: "mb-0" }, entry.data.class) - ) - ) - ), - entry.data.web_url - ? h( - "div", - { className: "col-5 text-end mb-4 mb-xl-0" }, - h("a", { className: "btn btn-primary" }, "Website") - ) - : null, - h( - "div", - { className: "col-12 mt-4" }, - h("div", { className: "border-bottom border-primary" }) - ) - ), - Row(h("div", { className: "col-12 content" }, widgetFor("body"))), - ]) - ), - ]; + const imageUrl = useMediaAsset( + entry.data.image, + collection, + imageField, + entry + ); + return [ + PageHeader(entry), + Section( + Container([ + entry.data.image && entry.data.image != "/media/image.webp" + ? Row( + h( + "div", + { className: "col-12 mb-4" }, + h("img", { className: "img-fluid w-100", src: imageUrl }) + ) + ) + : null, + h( + "div", + { className: "row mb-4" }, + h( + "div", + { className: "col-7" }, + h( + "div", + { className: "d-flex align-items-center" }, + h("i", { className: "mdi mdi-crowd text-primary icon-md me-2" }), + h( + "div", + { className: "text-start" }, + h("h6", { className: "mb-0" }, "KLASSE(N)"), + h("p", { className: "mb-0" }, entry.data.class) + ) + ) + ), + entry.data.web_url + ? h( + "div", + { className: "col-5 text-end mb-4 mb-xl-0" }, + h("a", { className: "btn btn-primary" }, "Website") + ) + : null, + h( + "div", + { className: "col-12 mt-4" }, + h("div", { className: "border-bottom border-primary" }) + ) + ), + Row(h("div", { className: "col-12 content" }, widgetFor("body"))), + ]) + ), + ]; }; export default ContestPreview; diff --git a/static/admin/previews/page-previews/event-preview.js b/static/admin/previews/page-previews/event-preview.js index dde93b90..40e124c4 100644 --- a/static/admin/previews/page-previews/event-preview.js +++ b/static/admin/previews/page-previews/event-preview.js @@ -1,147 +1,147 @@ import { PageHeader, DateFormat } from "./components/index.js"; function isFuture(date, enddate) { - let date1 = new Date(date ? date : 0); - let date2 = new Date(enddate ? enddate : 0); - let present = new Date(); - if (date1 >= present || date2 >= present) { - return true; - } else { - return false; - } + let date1 = new Date(date ? date : 0); + let date2 = new Date(enddate ? enddate : 0); + let present = new Date(); + if (date1 >= present || date2 >= present) { + return true; + } else { + return false; + } } const EventPreview = ({ widgetsFor, entry }) => { - return [ - PageHeader(entry), - h( - "section", - { className: "section-sm" }, - h( - "div", - { className: "container" }, - h( - "div", - { className: "row" }, - h( - "div", - { className: "col-12" }, - h( - "div", - { className: "row" }, - h( - "div", - { className: "col-12" }, - h( - "ul", - { className: "list-inline text-center filter-controls mb-5" }, - h( - "li", - { className: "list-inline-item m-3 text-uppercase active" }, - "Alle" - ), - h( - "li", - { className: "list-inline-item m-3 text-uppercase" }, - "Anstehend" - ), - h( - "li", - { className: "list-inline-item m-3 text-uppercase" }, - "Vergangen" - ) - ) - ) - ), - h( - "div", - { className: "filtr-container" }, - widgetsFor("events").map((event) => - h( - "div", - { className: "mb-2 mt-2 col-12 filtr-item" }, - h( - "div", - { - className: - "card d-md-table w-100 hover-shadow border-primary ps-0 pe-0 mb-4", - }, - h( - "div", - { - className: - "d-md-table-cell text-center p-4 bg-primary text-white mb-4 mb-md-0 termin-tc rounded", - }, - h( - "span", - { className: "h2 d-block" }, - event.data.date != null && event.data.date != "" - ? DateFormat({ - date: event.data.date, - format: { day: "numeric" }, - }) - : null - ), - h( - "span", - { className: "d-block" }, - event.data.date != null && event.data.date != "" - ? DateFormat({ - date: event.data.date, - format: { month: "short", year: "numeric" }, - }) - : null - ), - event.data.enddate != null && event.data.enddate != "" - ? [ - h("br"), - "bis " + - DateFormat({ - date: event.data.enddate, - format: { - day: "numeric", - month: "short", - year: "numeric", - }, - }), - ] - : null - ), - h( - "div", - { - className: - "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) - ), - event.data.location - ? h( - "div", - { - className: - "d-md-table-cell text-end pe-md-4 p-2 vertical-align-middle", - }, - h( - "p", - {}, - h("i", { - className: - "mdi mdi-map-marker-radius-outline icon-s text-primary me-2", - }), - event.data.location - ) - ) - : null - ) - ) - ) - ) - ) - ) - ) - ), - ]; + return [ + PageHeader(entry), + h( + "section", + { className: "section-sm" }, + h( + "div", + { className: "container" }, + h( + "div", + { className: "row" }, + h( + "div", + { className: "col-12" }, + h( + "div", + { className: "row" }, + h( + "div", + { className: "col-12" }, + h( + "ul", + { className: "list-inline text-center filter-controls mb-5" }, + h( + "li", + { className: "list-inline-item m-3 text-uppercase active" }, + "Alle" + ), + h( + "li", + { className: "list-inline-item m-3 text-uppercase" }, + "Anstehend" + ), + h( + "li", + { className: "list-inline-item m-3 text-uppercase" }, + "Vergangen" + ) + ) + ) + ), + h( + "div", + { className: "filtr-container" }, + widgetsFor("events").map((event) => + h( + "div", + { className: "mb-2 mt-2 col-12 filtr-item" }, + h( + "div", + { + className: + "card d-md-table w-100 hover-shadow border-primary ps-0 pe-0 mb-4", + }, + h( + "div", + { + className: + "d-md-table-cell text-center p-4 bg-primary text-white mb-4 mb-md-0 termin-tc rounded", + }, + h( + "span", + { className: "h2 d-block" }, + event.data.date != null && event.data.date != "" + ? DateFormat({ + date: event.data.date, + format: { day: "numeric" }, + }) + : null + ), + h( + "span", + { className: "d-block" }, + event.data.date != null && event.data.date != "" + ? DateFormat({ + date: event.data.date, + format: { month: "short", year: "numeric" }, + }) + : null + ), + event.data.enddate != null && event.data.enddate != "" + ? [ + h("br"), + "bis " + + DateFormat({ + date: event.data.enddate, + format: { + day: "numeric", + month: "short", + year: "numeric", + }, + }), + ] + : null + ), + h( + "div", + { + className: + "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) + ), + event.data.location + ? h( + "div", + { + className: + "d-md-table-cell text-end pe-md-4 p-2 vertical-align-middle", + }, + h( + "p", + {}, + h("i", { + className: + "mdi mdi-map-marker-radius-outline icon-s text-primary me-2", + }), + event.data.location + ) + ) + : null + ) + ) + ) + ) + ) + ) + ) + ), + ]; }; export default EventPreview; diff --git a/static/admin/previews/page-previews/forms-preview.js b/static/admin/previews/page-previews/forms-preview.js index 30c48904..1cff908e 100644 --- a/static/admin/previews/page-previews/forms-preview.js +++ b/static/admin/previews/page-previews/forms-preview.js @@ -1,64 +1,64 @@ import { PageHeader } from "./components/index.js"; const FormsPreview = ({ widgetsFor, widgetFor, entry }) => { - return [ - PageHeader(entry), - h( - "section", - { className: "section-sm" }, - h( - "div", - { className: "container" }, - h( - "div", - { className: "row" }, - h( - "div", - { className: "col-12" }, - h("h2", { className: "section-title" }, entry.data.title) - ) - ), - h( - "div", - { className: "row" }, - h( - "div", - { className: "col-12 content" }, - widgetsFor("files").map((file) => - h( - "div", - { className: "container mb-0" }, - h( - "div", - { - className: - "card border-primary rounded-0 hover-shadow mb-5", - }, - h( - "div", - { className: "card-body mb-0" }, - h("h4", { className: "card-title" }, file.data.title), - h( - "a", - { - className: - "text-decoration-none btn btn-primary btn-sm mb-0", - }, - h("i", { - className: "mdi mdi-tray-arrow-down mb-0 me-2", - }), - "Download" - ) - ) - ) - ) - ), - widgetFor("body") - ) - ) - ) - ), - ]; + return [ + PageHeader(entry), + h( + "section", + { className: "section-sm" }, + h( + "div", + { className: "container" }, + h( + "div", + { className: "row" }, + h( + "div", + { className: "col-12" }, + h("h2", { className: "section-title" }, entry.data.title) + ) + ), + h( + "div", + { className: "row" }, + h( + "div", + { className: "col-12 content" }, + widgetsFor("files").map((file) => + h( + "div", + { className: "container mb-0" }, + h( + "div", + { + className: + "card border-primary rounded-0 hover-shadow mb-5", + }, + h( + "div", + { className: "card-body mb-0" }, + h("h4", { className: "card-title" }, file.data.title), + h( + "a", + { + className: + "text-decoration-none btn btn-primary btn-sm mb-0", + }, + h("i", { + className: "mdi mdi-tray-arrow-down mb-0 me-2", + }), + "Download" + ) + ) + ) + ) + ), + widgetFor("body") + ) + ) + ) + ), + ]; }; export default FormsPreview; diff --git a/static/admin/previews/page-previews/ganztag-preview.js b/static/admin/previews/page-previews/ganztag-preview.js index 1bc5263d..f2c4e6cc 100644 --- a/static/admin/previews/page-previews/ganztag-preview.js +++ b/static/admin/previews/page-previews/ganztag-preview.js @@ -1,127 +1,127 @@ import { - Col12, - Container, - PageHeader, - Row, - Section, + Col12, + Container, + PageHeader, + Row, + Section, } from "./components/index.js"; const GanztagPreview = ({ - widgetFor, - widgetsFor, - entry, - fields, - collection, + widgetFor, + widgetsFor, + entry, + fields, + collection, }) => { - const imageField = useMemo(() => { - return fields.find((field) => field.name === "image"); - }, [fields]); + const imageField = useMemo(() => { + return fields.find((field) => field.name === "image"); + }, [fields]); - const imageUrl = useMediaAsset( - entry.data.image, - collection, - imageField, - entry - ); - return [ - PageHeader(entry), - Section( - Container([ - Row( - h( - "div", - { className: "col-12 mb-4" }, - h("img", { className: "img-fluid w-100", src: imageUrl }) - ) - ), - h("h2", {}, entry.data.title), - h( - "div", - { className: "row align-items-center mb-4" }, - Col12( - Row([ - h( - "div", - { className: "col-lg-3 col-sm-6 mb-3 mb-sm-0" }, - h( - "div", - { className: "d-flex align-items-center" }, - h("i", { - className: - "mdi mdi-calendar-today-outline text-primary icon-md me-2", - }), - h( - "div", - { className: "text-start" }, - h("h6", { className: "mb-0" }, "ZEIT"), - h("p", { className: "mb-0" }, entry.data.schedule) - ) - ) - ), - h( - "div", - { className: "col-lg-3 col-sm-6 mb-3 mb-sm-0" }, - h( - "div", - { className: "d-flex align-items-center" }, - h("i", { - className: "mdi mdi-timer-sand text-primary icon-md me-2", - }), - h( - "div", - { className: "text-start" }, - h("h6", { className: "mb-0" }, "DAUER"), - h("p", { className: "mb-0" }, entry.data.duration) - ) - ) - ), - h( - "div", - { className: "col-lg-3 col-sm-6 mb-3 mb-sm-0" }, - h( - "div", - { className: "d-flex align-items-center" }, - h("i", { - className: "mdi mdi-crowd text-primary icon-md me-2", - }), - h( - "div", - { className: "text-start" }, - h("h6", { className: "mb-0" }, "KLASSE(N)"), - h("p", { className: "mb-0" }, entry.data.class) - ) - ) - ), - h( - "div", - { className: "col-lg-3 col-sm-6 mb-3 mb-sm-0" }, - h( - "div", - { className: "d-flex align-items-center" }, - h("i", { - className: - "mdi mdi-map-marker-radius-outline text-primary icon-md me-2", - }), - h( - "div", - { className: "text-start" }, - h("h6", { className: "mb-0" }, "RAUM"), - h("p", { className: "mb-0" }, entry.data.room) - ) - ) - ), - ]) - ), - h( - "div", - { className: "col-12 mt-4" }, - h("div", { className: "border-bottom border-primary" }) - ) - ), - Row(h("div", { className: "col-12 content" }, widgetFor("body"))), - ]) - ), - ]; + const imageUrl = useMediaAsset( + entry.data.image, + collection, + imageField, + entry + ); + return [ + PageHeader(entry), + Section( + Container([ + Row( + h( + "div", + { className: "col-12 mb-4" }, + h("img", { className: "img-fluid w-100", src: imageUrl }) + ) + ), + h("h2", {}, entry.data.title), + h( + "div", + { className: "row align-items-center mb-4" }, + Col12( + Row([ + h( + "div", + { className: "col-lg-3 col-sm-6 mb-3 mb-sm-0" }, + h( + "div", + { className: "d-flex align-items-center" }, + h("i", { + className: + "mdi mdi-calendar-today-outline text-primary icon-md me-2", + }), + h( + "div", + { className: "text-start" }, + h("h6", { className: "mb-0" }, "ZEIT"), + h("p", { className: "mb-0" }, entry.data.schedule) + ) + ) + ), + h( + "div", + { className: "col-lg-3 col-sm-6 mb-3 mb-sm-0" }, + h( + "div", + { className: "d-flex align-items-center" }, + h("i", { + className: "mdi mdi-timer-sand text-primary icon-md me-2", + }), + h( + "div", + { className: "text-start" }, + h("h6", { className: "mb-0" }, "DAUER"), + h("p", { className: "mb-0" }, entry.data.duration) + ) + ) + ), + h( + "div", + { className: "col-lg-3 col-sm-6 mb-3 mb-sm-0" }, + h( + "div", + { className: "d-flex align-items-center" }, + h("i", { + className: "mdi mdi-crowd text-primary icon-md me-2", + }), + h( + "div", + { className: "text-start" }, + h("h6", { className: "mb-0" }, "KLASSE(N)"), + h("p", { className: "mb-0" }, entry.data.class) + ) + ) + ), + h( + "div", + { className: "col-lg-3 col-sm-6 mb-3 mb-sm-0" }, + h( + "div", + { className: "d-flex align-items-center" }, + h("i", { + className: + "mdi mdi-map-marker-radius-outline text-primary icon-md me-2", + }), + h( + "div", + { className: "text-start" }, + h("h6", { className: "mb-0" }, "RAUM"), + h("p", { className: "mb-0" }, entry.data.room) + ) + ) + ), + ]) + ), + h( + "div", + { className: "col-12 mt-4" }, + h("div", { className: "border-bottom border-primary" }) + ) + ), + Row(h("div", { className: "col-12 content" }, widgetFor("body"))), + ]) + ), + ]; }; export default GanztagPreview; diff --git a/static/admin/previews/page-previews/index.js b/static/admin/previews/page-previews/index.js index df4c976e..1f2b4772 100644 --- a/static/admin/previews/page-previews/index.js +++ b/static/admin/previews/page-previews/index.js @@ -19,22 +19,22 @@ import AbiturientenPreview from "./abiturienten-preview.js"; import PreviewStyles from "./styles.js"; export { - AboutPreview, - BlogPreview, - ContestPreview, - GanztagPreview, - PagePreview, - EventPreview, - AnmeldungPreview, - HeaderPreview, - ChronikPreview, - KontaktPreview, - AnmeldeformularPreview, - ChronikIndexPreview, - AuthorPreview, - FormsPreview, - CantorpreisPreview, - ProjektwochePreview, - AbiturientenPreview, - PreviewStyles, + AboutPreview, + BlogPreview, + ContestPreview, + GanztagPreview, + PagePreview, + EventPreview, + AnmeldungPreview, + HeaderPreview, + ChronikPreview, + KontaktPreview, + AnmeldeformularPreview, + ChronikIndexPreview, + AuthorPreview, + FormsPreview, + CantorpreisPreview, + ProjektwochePreview, + AbiturientenPreview, + PreviewStyles, }; diff --git a/static/admin/previews/page-previews/kontakt-preview.js b/static/admin/previews/page-previews/kontakt-preview.js index 1c16267a..f24fe318 100644 --- a/static/admin/previews/page-previews/kontakt-preview.js +++ b/static/admin/previews/page-previews/kontakt-preview.js @@ -1,98 +1,98 @@ import { PageHeader } from "./components/index.js"; const KontaktPreview = ({ widgetsFor, entry }) => { - return [ - PageHeader(entry), - h( - "section", - { className: "section-sm bg-gray" }, - h( - "div", - { className: "container" }, - h( - "div", - { className: "row" }, - h( - "div", - { className: "col-lg-6 mb-4 mb-lg-0" }, - h( - "form", - {}, - h("input", { - className: "form-control form-control-lg mb-3", - type: "text", - placeholder: "Ihr Name", - }), - h("input", { - className: "form-control form-control-lg mb-3", - type: "text", - placeholder: "Ihre E-Mail Adresse", - }), - h("input", { - className: "form-control form-control-lg mb-3", - type: "text", - placeholder: "Betreff", - }), - h("textarea", { - className: "form-control form-control-lg mb-3", - placeholder: "Nachricht", - }), - h("button", { className: "btn btn-primary" }, "Senden") - ) - ), - h( - "div", - { className: "col-lg-6" }, - h( - "div", - { className: "card" }, - h("div", { className: "card-header fw-bold" }, "Kontaktdaten"), - h( - "ul", - { className: "list-group list-group-flush" }, - widgetsFor("kontaktdaten").map((person) => - h( - "li", - { className: "list-group-item" }, - h("p", { className: "card-title mb-0" }, person.data.name), - h( - "p", - { className: "text-muted mb-0" }, - person.data.position - ), - h( - "p", - { className: "card-text" }, - h("i", { - className: "mdi mdi-email-multiple-outline me-2", - }), - person.data.email.replace("@", "(at)") - ) - ) - ), - h( - "li", - { className: "list-group-item" }, - h( - "p", - { className: "card-text" }, - h("i", { className: "mdi mdi-phone-outline me-2" }), - "Telefon: +49-0345/6903156" - ), - h( - "p", - { className: "card-text" }, - h("i", { className: "mdi mdi-fax me-2" }), - "Fax: +49-0345/6903157" - ) - ) - ) - ) - ) - ) - ) - ), - ]; + return [ + PageHeader(entry), + h( + "section", + { className: "section-sm bg-gray" }, + h( + "div", + { className: "container" }, + h( + "div", + { className: "row" }, + h( + "div", + { className: "col-lg-6 mb-4 mb-lg-0" }, + h( + "form", + {}, + h("input", { + className: "form-control form-control-lg mb-3", + type: "text", + placeholder: "Ihr Name", + }), + h("input", { + className: "form-control form-control-lg mb-3", + type: "text", + placeholder: "Ihre E-Mail Adresse", + }), + h("input", { + className: "form-control form-control-lg mb-3", + type: "text", + placeholder: "Betreff", + }), + h("textarea", { + className: "form-control form-control-lg mb-3", + placeholder: "Nachricht", + }), + h("button", { className: "btn btn-primary" }, "Senden") + ) + ), + h( + "div", + { className: "col-lg-6" }, + h( + "div", + { className: "card" }, + h("div", { className: "card-header fw-bold" }, "Kontaktdaten"), + h( + "ul", + { className: "list-group list-group-flush" }, + widgetsFor("kontaktdaten").map((person) => + h( + "li", + { className: "list-group-item" }, + h("p", { className: "card-title mb-0" }, person.data.name), + h( + "p", + { className: "text-muted mb-0" }, + person.data.position + ), + h( + "p", + { className: "card-text" }, + h("i", { + className: "mdi mdi-email-multiple-outline me-2", + }), + person.data.email.replace("@", "(at)") + ) + ) + ), + h( + "li", + { className: "list-group-item" }, + h( + "p", + { className: "card-text" }, + h("i", { className: "mdi mdi-phone-outline me-2" }), + "Telefon: +49-0345/6903156" + ), + h( + "p", + { className: "card-text" }, + h("i", { className: "mdi mdi-fax me-2" }), + "Fax: +49-0345/6903157" + ) + ) + ) + ) + ) + ) + ) + ), + ]; }; export default KontaktPreview; diff --git a/static/admin/previews/page-previews/page-preview.js b/static/admin/previews/page-previews/page-preview.js index 75323b42..a5cf457f 100644 --- a/static/admin/previews/page-previews/page-preview.js +++ b/static/admin/previews/page-previews/page-preview.js @@ -1,26 +1,26 @@ import { PageHeader } from "./components/index.js"; const PagePreview = ({ widgetFor, entry }) => { - return [ - PageHeader(entry), - h( - "section", - { className: "section-sm" }, - h( - "div", - { className: "container" }, - h( - "div", - { className: "row" }, - h( - "div", - { className: "col-12" }, - h("div", { className: "content" }, widgetFor("body")) - ) - ) - ) - ), - ]; + return [ + PageHeader(entry), + h( + "section", + { className: "section-sm" }, + h( + "div", + { className: "container" }, + h( + "div", + { className: "row" }, + h( + "div", + { className: "col-12" }, + h("div", { className: "content" }, widgetFor("body")) + ) + ) + ) + ), + ]; }; export default PagePreview; diff --git a/static/admin/previews/page-previews/projektwoche-preview.js b/static/admin/previews/page-previews/projektwoche-preview.js index 3580f1d8..3ac8134c 100644 --- a/static/admin/previews/page-previews/projektwoche-preview.js +++ b/static/admin/previews/page-previews/projektwoche-preview.js @@ -1,55 +1,55 @@ import { Container, PageHeader, Row, Section } from "./components/index.js"; const ProjektwochePreview = ({ widgetsFor, widgetFor, entry }) => { - return [ - PageHeader(entry), - Section([ - Container( - Row(h("div", { className: "col-12 mb-4 content" }, widgetFor("body"))) - ), - Container( - Row([ - widgetsFor("tiles").map((tile) => - h( - "div", - { className: "col-lg-4 col-sm-6" }, - h( - "div", - { - className: "card border-primary rounded-0 hover-shadow mb-4", - }, - h( - "div", - { - className: "container fb-tile-color", - style: { backgroundColor: tile.data.bg_color }, - }, - h("i", { - className: (tile.data.icon ?? "") + " fb-tile-icon", - style: { color: tile.data.font_color }, - }) - ), - h( - "div", - { className: "card-body" }, - h( - "h4", - { className: "card-title text-truncate" }, - tile.data.title - ), - h( - "button", - { type: "button", className: "btn btn-primary btn-sm" }, - "Mehr anzeigen" - ) - ) - ) - ) - ), - ]) - ), - ]), - ]; + return [ + PageHeader(entry), + Section([ + Container( + Row(h("div", { className: "col-12 mb-4 content" }, widgetFor("body"))) + ), + Container( + Row([ + widgetsFor("tiles").map((tile) => + h( + "div", + { className: "col-lg-4 col-sm-6" }, + h( + "div", + { + className: "card border-primary rounded-0 hover-shadow mb-4", + }, + h( + "div", + { + className: "container fb-tile-color", + style: { backgroundColor: tile.data.bg_color }, + }, + h("i", { + className: (tile.data.icon ?? "") + " fb-tile-icon", + style: { color: tile.data.font_color }, + }) + ), + h( + "div", + { className: "card-body" }, + h( + "h4", + { className: "card-title text-truncate" }, + tile.data.title + ), + h( + "button", + { type: "button", className: "btn btn-primary btn-sm" }, + "Mehr anzeigen" + ) + ) + ) + ) + ), + ]) + ), + ]), + ]; }; export default ProjektwochePreview; diff --git a/static/admin/previews/page-previews/styles.js b/static/admin/previews/page-previews/styles.js index 0f1b8129..4b8b7ea1 100644 --- a/static/admin/previews/page-previews/styles.js +++ b/static/admin/previews/page-previews/styles.js @@ -1,9 +1,9 @@ const PreviewStyles = [ - "https://assets.cantorgymnasium.de/bootstrap/v5/css/bootstrap.min.css", - "https://assets.cantorgymnasium.de/fonts/fira/fira.css", - "https://assets.cantorgymnasium.de/fonts/ubuntu/ubuntu.css", - "https://assets.cantorgymnasium.de/fonts/mdi/v7/css/materialdesignicons.min.css", - "https://cantorgymnasium.de/scss/style.css", + "https://assets.cantorgymnasium.de/bootstrap/v5/css/bootstrap.min.css", + "https://assets.cantorgymnasium.de/fonts/fira/fira.css", + "https://assets.cantorgymnasium.de/fonts/ubuntu/ubuntu.css", + "https://assets.cantorgymnasium.de/fonts/mdi/v7/css/materialdesignicons.min.css", + "https://cantorgymnasium.de/scss/style.css", ]; export default PreviewStyles; diff --git a/static/admin/shortcodes/audio.js b/static/admin/shortcodes/audio.js index 5a9941cc..42c5420f 100644 --- a/static/admin/shortcodes/audio.js +++ b/static/admin/shortcodes/audio.js @@ -1,67 +1,67 @@ import { Card, TextField } from "./components/index.js"; const AudioShortcode = { - label: "Audiodatei", - openTag: "{{< ", - closeTag: " >}}", - separator: " ", - toProps: (args) => { - if (args.length > 0) { - const src = - args - .find((arg) => arg.startsWith("src=")) - ?.split("=")[1] - .replaceAll('"', "") ?? ""; - return { src: src }; - } - return { src: "" }; - }, - toArgs: ({ src }) => { - return [`src=\"${src}\"`]; - }, - control: ({ src, onChange, controlProps }) => { - const { collection, field } = controlProps; + label: "Audiodatei", + openTag: "{{< ", + closeTag: " >}}", + separator: " ", + toProps: (args) => { + if (args.length > 0) { + const src = + args + .find((arg) => arg.startsWith("src=")) + ?.split("=")[1] + .replaceAll('"', "") ?? ""; + return { src: src }; + } + return { src: "" }; + }, + toArgs: ({ src }) => { + return [`src=\"${src}\"`]; + }, + control: ({ src, onChange, controlProps }) => { + const { collection, field } = controlProps; - const handleChange = ({ path }) => { - onChange({ src: path }); - }; + const handleChange = ({ path }) => { + onChange({ src: path }); + }; - const handleOpenMediaLibrary = useMediaInsert( - src, - { collection, field }, - handleChange - ); + const handleOpenMediaLibrary = useMediaInsert( + src, + { collection, field }, + handleChange + ); - return Card([ - TextField({ - label: "Audiodatei", - value: src, - onChange: (event) => { - onChange({ src: event.target.value }); - }, - }), - h( - "span", - { key: "audio-button", className: "flex gap-2 pt-2 px-2" }, - h( - "button", - { - type: "button", - onClick: handleOpenMediaLibrary, - className: "btn btn-contained-primary", - }, - "wählen" - ) - ), - ]); - }, - preview: ({ src }) => { - return h( - "div", - { className: "card" }, - h("audio", { src: src, controls: true }) - ); - }, + return Card([ + TextField({ + label: "Audiodatei", + value: src, + onChange: (event) => { + onChange({ src: event.target.value }); + }, + }), + h( + "span", + { key: "audio-button", className: "flex gap-2 pt-2 px-2" }, + h( + "button", + { + type: "button", + onClick: handleOpenMediaLibrary, + className: "btn btn-contained-primary", + }, + "wählen" + ) + ), + ]); + }, + preview: ({ src }) => { + return h( + "div", + { className: "card" }, + h("audio", { src: src, controls: true }) + ); + }, }; export default AudioShortcode; diff --git a/static/admin/shortcodes/card.js b/static/admin/shortcodes/card.js index 1278a8cb..cf677f8e 100644 --- a/static/admin/shortcodes/card.js +++ b/static/admin/shortcodes/card.js @@ -1,75 +1,75 @@ import { Card, TextField } from "./components/index.js"; const CardShortcode = { - label: "Link-Karte", - openTag: "{{< ", - closeTag: " >}}", - separator: " ", - toProps: (args) => { - if (args.length > 0) { - var title = ""; - var link = ""; - const linkIndex = args.findIndex((arg) => arg.startsWith('link="')); - const titleIndex = args.findIndex((arg) => arg.startsWith('title="')); - for (let arg of args.slice(titleIndex, linkIndex)) { - title += " " + arg.replaceAll("title=", "").replaceAll('"', ""); - } - for (let arg of args.slice(linkIndex)) { - link += " " + arg.replaceAll("link=", "").replaceAll('"', ""); - } - return { title: title.trim(), link: link.trim() }; - } + label: "Link-Karte", + openTag: "{{< ", + closeTag: " >}}", + separator: " ", + toProps: (args) => { + if (args.length > 0) { + var title = ""; + var link = ""; + const linkIndex = args.findIndex((arg) => arg.startsWith('link="')); + const titleIndex = args.findIndex((arg) => arg.startsWith('title="')); + for (let arg of args.slice(titleIndex, linkIndex)) { + title += " " + arg.replaceAll("title=", "").replaceAll('"', ""); + } + for (let arg of args.slice(linkIndex)) { + link += " " + arg.replaceAll("link=", "").replaceAll('"', ""); + } + return { title: title.trim(), link: link.trim() }; + } - return { title: "", link: "" }; - }, - toArgs: ({ title, link }) => { - return [`title=\"${title}\"`, `link=\"${link}\"`]; - }, - control: ({ title, link, onChange }) => { - return Card([ - TextField({ - label: "Titel", - value: title, - onChange: (event) => { - onChange({ title: event.target.value, link }); - }, - }), - TextField({ - label: "Link", - value: link, - onChange: (event) => { - onChange({ title, link: event.target.value }); - }, - }), - ]); - }, - preview: ({ title, link }) => { - return h( - "div", - { className: "container mb-0" }, - h( - "div", - { className: "card border-primary rounded-0 hover-shadow mb-5" }, - h( - "div", - { className: "card-body mb-0" }, - h( - "h4", - { className: "card-title" }, - h("a", { className: "text-decoration-none", href: link }, title) - ), - h( - "a", - { - className: "mb-0 btn btn-primary btn-sm text-decoration-none", - href: link, - }, - "Mehr anzeigen" - ) - ) - ) - ); - }, + return { title: "", link: "" }; + }, + toArgs: ({ title, link }) => { + return [`title=\"${title}\"`, `link=\"${link}\"`]; + }, + control: ({ title, link, onChange }) => { + return Card([ + TextField({ + label: "Titel", + value: title, + onChange: (event) => { + onChange({ title: event.target.value, link }); + }, + }), + TextField({ + label: "Link", + value: link, + onChange: (event) => { + onChange({ title, link: event.target.value }); + }, + }), + ]); + }, + preview: ({ title, link }) => { + return h( + "div", + { className: "container mb-0" }, + h( + "div", + { className: "card border-primary rounded-0 hover-shadow mb-5" }, + h( + "div", + { className: "card-body mb-0" }, + h( + "h4", + { className: "card-title" }, + h("a", { className: "text-decoration-none", href: link }, title) + ), + h( + "a", + { + className: "mb-0 btn btn-primary btn-sm text-decoration-none", + href: link, + }, + "Mehr anzeigen" + ) + ) + ) + ); + }, }; export default CardShortcode; diff --git a/static/admin/shortcodes/components/card.js b/static/admin/shortcodes/components/card.js index e3d62ccb..90252619 100644 --- a/static/admin/shortcodes/components/card.js +++ b/static/admin/shortcodes/components/card.js @@ -1,12 +1,12 @@ const Card = (child, opts = { vertical: false }) => - h( - "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" + - (opts.vertical ? " flex-col" : ""), - }, - child - ); + h( + "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 top-3 bottom-3" + + (opts.vertical ? " flex-col" : ""), + }, + child + ); export default Card; diff --git a/static/admin/shortcodes/components/image.js b/static/admin/shortcodes/components/image.js index f5f79895..889a96e6 100644 --- a/static/admin/shortcodes/components/image.js +++ b/static/admin/shortcodes/components/image.js @@ -1,41 +1,41 @@ const Image = ({ label, assetSource, handleOpenMediaLibrary }) => - h( - "span", - { className: "flex flex-col w-full" }, - h( - "label", - { - className: - "w-full flex text-xs font-bold dark:font-semibold group-focus-within/active:text-blue-500 group-hover/active:text-blue-500 cursor-text text-slate-500 dark:text-slate-400 px-3 pt-3", - }, - label - ), - h( - "span", - { className: "flex flex-col gap-2 px-3 pt-2" }, - h( - "span", - {}, - h("img", { - role: "presentation", - src: assetSource, - className: "object-cover max-w-full overflow-hidden", - }) - ), - h( - "span", - { className: "flex gap-2" }, - h( - "button", - { - type: "button", - onClick: handleOpenMediaLibrary, - className: "btn btn-contained-primary", - }, - "Bild auswählen" - ) - ) - ) - ); + h( + "span", + { className: "flex flex-col w-full" }, + h( + "label", + { + className: + "w-full flex text-xs font-bold dark:font-semibold group-focus-within/active:text-blue-500 group-hover/active:text-blue-500 cursor-text text-slate-500 dark:text-slate-400 px-3 pt-3", + }, + label + ), + h( + "span", + { className: "flex flex-col gap-2 px-3 pt-2" }, + h( + "span", + {}, + h("img", { + role: "presentation", + src: assetSource, + className: "object-cover max-w-full overflow-hidden", + }) + ), + h( + "span", + { className: "flex gap-2" }, + h( + "button", + { + type: "button", + onClick: handleOpenMediaLibrary, + className: "btn btn-contained-primary", + }, + "Bild auswählen" + ) + ) + ) + ); export default Image; diff --git a/static/admin/shortcodes/components/text-field.js b/static/admin/shortcodes/components/text-field.js index 1fa164f1..56e01179 100644 --- a/static/admin/shortcodes/components/text-field.js +++ b/static/admin/shortcodes/components/text-field.js @@ -1,21 +1,21 @@ const TextField = ({ label, value, onChange }) => - h( - "span", - { key: "text-" + label, className: "flex flex-col w-full" }, - h( - "label", - { - className: - "w-full flex text-xs font-bold dark:font-semibold group-focus-within/active:text-blue-500 group-hover/active:text-blue-500 cursor-text text-slate-500 dark:text-slate-400 px-3 pt-3", - }, - label - ), - h("input", { - className: - "MuiInout-Input w-full h-6 px-3 bg-transparent outline-none text-sm font-medium text-gray-900 dark:text-gray-100 cursor-default", - value, - onChange, - }) - ); + h( + "span", + { key: "text-" + label, className: "flex flex-col w-full" }, + h( + "label", + { + className: + "w-full flex text-xs font-bold dark:font-semibold group-focus-within/active:text-blue-500 group-hover/active:text-blue-500 cursor-text text-slate-500 dark:text-slate-400 px-3 pt-3", + }, + label + ), + h("input", { + className: + "MuiInout-Input w-full h-6 px-3 bg-transparent outline-none text-sm font-medium text-gray-900 dark:text-gray-100 cursor-default", + value, + onChange, + }) + ); export default TextField; diff --git a/static/admin/shortcodes/download.js b/static/admin/shortcodes/download.js index bf22e1ae..2dda2ee8 100644 --- a/static/admin/shortcodes/download.js +++ b/static/admin/shortcodes/download.js @@ -1,76 +1,76 @@ import { Card, TextField } from "./components/index.js"; const DownloadShortcode = { - label: "Download-Karte", - openTag: "{{< ", - closeTag: " >}}", - separator: " ", - toProps: (args) => { - if (args.length > 0) { - var title = ""; - var link = ""; - const linkIndex = args.findIndex((arg) => arg.startsWith('link="')); - const titleIndex = args.findIndex((arg) => arg.startsWith('title="')); - for (let arg of args.slice(titleIndex, linkIndex)) { - title += " " + arg.replaceAll("title=", "").replaceAll('"', ""); - } - for (let arg of args.slice(linkIndex)) { - link += " " + arg.replaceAll("link=", "").replaceAll('"', ""); - } - return { title: title.trim(), link: link.trim() }; - } + label: "Download-Karte", + openTag: "{{< ", + closeTag: " >}}", + separator: " ", + toProps: (args) => { + if (args.length > 0) { + var title = ""; + var link = ""; + const linkIndex = args.findIndex((arg) => arg.startsWith('link="')); + const titleIndex = args.findIndex((arg) => arg.startsWith('title="')); + for (let arg of args.slice(titleIndex, linkIndex)) { + title += " " + arg.replaceAll("title=", "").replaceAll('"', ""); + } + for (let arg of args.slice(linkIndex)) { + link += " " + arg.replaceAll("link=", "").replaceAll('"', ""); + } + return { title: title.trim(), link: link.trim() }; + } - return { title: "", link: "" }; - }, - toArgs: ({ title, link }) => { - return [`title=\"${title}\"`, `link=\"${link}\"`]; - }, - control: ({ title, link, onChange }) => { - return Card([ - TextField({ - label: "Titel", - value: title, - onChange: (event) => { - onChange({ title: event.target.value, link }); - }, - }), - TextField({ - label: "Download-Link", - value: link, - onChange: (event) => { - onChange({ title, link: event.target.value }); - }, - }), - ]); - }, - preview: ({ title, link }) => { - return h( - "div", - { className: "container mb-0" }, - h( - "div", - { className: "card border-primary rounded-0 hover-shadow mb-5" }, - h( - "div", - { className: "card-body mb-0" }, - h( - "h4", - { className: "card-title" }, - h("a", { className: "text-decoration-none", href: link }, title) - ), - h( - "a", - { - className: "mb-0 btn btn-primary btn-sm text-decoration-none", - href: link, - }, - h("i", { className: "mdi mdi-tray-arrow-down mb-0 me-2" }), - "Download" - ) - ) - ) - ); - }, + return { title: "", link: "" }; + }, + toArgs: ({ title, link }) => { + return [`title=\"${title}\"`, `link=\"${link}\"`]; + }, + control: ({ title, link, onChange }) => { + return Card([ + TextField({ + label: "Titel", + value: title, + onChange: (event) => { + onChange({ title: event.target.value, link }); + }, + }), + TextField({ + label: "Download-Link", + value: link, + onChange: (event) => { + onChange({ title, link: event.target.value }); + }, + }), + ]); + }, + preview: ({ title, link }) => { + return h( + "div", + { className: "container mb-0" }, + h( + "div", + { className: "card border-primary rounded-0 hover-shadow mb-5" }, + h( + "div", + { className: "card-body mb-0" }, + h( + "h4", + { className: "card-title" }, + h("a", { className: "text-decoration-none", href: link }, title) + ), + h( + "a", + { + className: "mb-0 btn btn-primary btn-sm text-decoration-none", + href: link, + }, + h("i", { className: "mdi mdi-tray-arrow-down mb-0 me-2" }), + "Download" + ) + ) + ) + ); + }, }; export default DownloadShortcode; diff --git a/static/admin/shortcodes/gallery.js b/static/admin/shortcodes/gallery.js index 19b92ddd..a8117793 100644 --- a/static/admin/shortcodes/gallery.js +++ b/static/admin/shortcodes/gallery.js @@ -1,73 +1,73 @@ import { Card, TextField } from "./components/index.js"; const GalleryShortcode = { - label: "Bildergallerie", - openTag: "{{< ", - closeTag: " >}}", - separator: " ", - toProps: (args) => { - if (args.length > 0) { - return { - dir: - args - .find((arg) => arg.startsWith("dir=")) - ?.split("=")[1] - .replaceAll('"', "") ?? "", - }; - } - return { dir: "" }; - }, - toArgs: ({ dir }) => { - return [`dir=\"${dir}\"`]; - }, - control: ({ dir, onChange, controlProps }) => { - const { collection, field } = controlProps; + label: "Bildergallerie", + openTag: "{{< ", + closeTag: " >}}", + separator: " ", + toProps: (args) => { + if (args.length > 0) { + return { + dir: + args + .find((arg) => arg.startsWith("dir=")) + ?.split("=")[1] + .replaceAll('"', "") ?? "", + }; + } + return { dir: "" }; + }, + toArgs: ({ dir }) => { + return [`dir=\"${dir}\"`]; + }, + control: ({ dir, onChange, controlProps }) => { + const { collection, field } = controlProps; - const handleChange = ({ path }) => { - onChange({ dir: path }); - }; + const handleChange = ({ path }) => { + onChange({ dir: path }); + }; - const handleOpenMediaLibrary = useMediaInsert( - dir, - { collection, field, forFolder: true }, - handleChange - ); + const handleOpenMediaLibrary = useMediaInsert( + dir, + { collection, field, forFolder: true }, + handleChange + ); - return Card([ - TextField({ - label: "Gallerie-Ordner", - value: dir, - onChange: (event) => { - onChange({ dir: event.target.value }); - }, - }), - h( - "span", - { key: "gallery-button", className: "flex gap-2 pt-2 px-2" }, - h( - "button", - { - type: "button", - onClick: handleOpenMediaLibrary, - className: "btn btn-contained-primary", - }, - "wählen" - ) - ), - ]); - }, - preview: ({ dir }) => { - return h( - "div", - { className: "card mb-4" }, - h( - "div", - { className: "card-body mb-0" }, - h("div", { className: "card-title h4" }, "Gallerie-Ordner"), - h("div", { className: "card-text" }, dir) - ) - ); - }, + return Card([ + TextField({ + label: "Gallerie-Ordner", + value: dir, + onChange: (event) => { + onChange({ dir: event.target.value }); + }, + }), + h( + "span", + { key: "gallery-button", className: "flex gap-2 pt-2 px-2" }, + h( + "button", + { + type: "button", + onClick: handleOpenMediaLibrary, + className: "btn btn-contained-primary", + }, + "wählen" + ) + ), + ]); + }, + preview: ({ dir }) => { + return h( + "div", + { className: "card mb-4" }, + h( + "div", + { className: "card-body mb-0" }, + h("div", { className: "card-title h4" }, "Gallerie-Ordner"), + h("div", { className: "card-text" }, dir) + ) + ); + }, }; export default GalleryShortcode; diff --git a/static/admin/shortcodes/image.js b/static/admin/shortcodes/image.js index a4c28b98..7256f404 100644 --- a/static/admin/shortcodes/image.js +++ b/static/admin/shortcodes/image.js @@ -2,63 +2,63 @@ import { Card, Image } from "./components/index.js"; import { md5 } from "../previews/page-previews/components/index.js"; const ImageShortcode = { - label: "Bild", - openTag: "{{< ", - closeTag: " >}}", - separator: " ", - toProps: (args) => { - if (args.length > 0) { - return { - src: - args - .find((arg) => arg.startsWith("src=")) - ?.split("=")[1] - .replaceAll('"', "") ?? "", - }; - } + label: "Bild", + openTag: "{{< ", + closeTag: " >}}", + separator: " ", + toProps: (args) => { + if (args.length > 0) { + return { + src: + args + .find((arg) => arg.startsWith("src=")) + ?.split("=")[1] + .replaceAll('"', "") ?? "", + }; + } - return { src: "" }; - }, - toArgs: ({ src }) => { - return [`src=\"${src}\"`]; - }, - control: ({ src, onChange, controlProps }) => { - const { collection, field, entry } = controlProps; + return { src: "" }; + }, + toArgs: ({ src }) => { + return [`src=\"${src}\"`]; + }, + control: ({ src, onChange, controlProps }) => { + const { collection, field, entry } = controlProps; - const handleChange = ({ path }) => { - onChange({ src: path }); - }; + const handleChange = ({ path }) => { + onChange({ src: path }); + }; - const handleOpenMediaLibrary = useMediaInsert( - src, - { collection, field }, - handleChange - ); - const assetSource = useMediaAsset(src, collection, field, entry); + const handleOpenMediaLibrary = useMediaInsert( + src, + { collection, field }, + handleChange + ); + const assetSource = useMediaAsset(src, collection, field, entry); - return Card( - Image({ - label: "Bild", - assetSource, - handleOpenMediaLibrary, - }) - ); - }, - preview: ({ src }) => { - return h( - "div", - { className: "col-lg-3 col-md-4 col-sm-6" }, - h( - "a", - { className: "vb-gallery", "data-gall": md5(src) }, - h("img", { - className: "img-thumbnail w-100 h-100", - style: { objectFit: "cover" }, - src, - }) - ) - ); - }, + return Card( + Image({ + label: "Bild", + assetSource, + handleOpenMediaLibrary, + }) + ); + }, + preview: ({ src }) => { + return h( + "div", + { className: "col-lg-3 col-md-4 col-sm-6" }, + h( + "a", + { className: "vb-gallery", "data-gall": md5(src) }, + h("img", { + className: "img-thumbnail w-100 h-100", + style: { objectFit: "cover" }, + src, + }) + ) + ); + }, }; export default ImageShortcode; diff --git a/static/admin/shortcodes/index.js b/static/admin/shortcodes/index.js index 673d3134..385c103a 100644 --- a/static/admin/shortcodes/index.js +++ b/static/admin/shortcodes/index.js @@ -7,11 +7,11 @@ import AudioShortcode from "./audio.js"; import SliderShortcode from "./slider.js"; export { - GalleryShortcode, - ImageShortcode, - DownloadShortcode, - CardShortcode, - YoutubeShortcode, - AudioShortcode, - SliderShortcode, + GalleryShortcode, + ImageShortcode, + DownloadShortcode, + CardShortcode, + YoutubeShortcode, + AudioShortcode, + SliderShortcode, }; diff --git a/static/admin/shortcodes/slider.js b/static/admin/shortcodes/slider.js index 3fd73e56..2b4045a0 100644 --- a/static/admin/shortcodes/slider.js +++ b/static/admin/shortcodes/slider.js @@ -1,73 +1,73 @@ import { Card, TextField } from "./components/index.js"; const SliderShortcode = { - label: "Bilderkarussell", - openTag: "{{< ", - closeTag: " >}}", - separator: " ", - toProps: (args) => { - if (args.length > 0) { - return { - dir: - args - .find((arg) => arg.startsWith("dir=")) - ?.split("=")[1] - .replaceAll('"', "") ?? "", - }; - } - return { dir: "" }; - }, - toArgs: ({ dir }) => { - return [`dir=\"${dir}\"`]; - }, - control: ({ dir, onChange, controlProps }) => { - const { collection, field } = controlProps; + label: "Bilderkarussell", + openTag: "{{< ", + closeTag: " >}}", + separator: " ", + toProps: (args) => { + if (args.length > 0) { + return { + dir: + args + .find((arg) => arg.startsWith("dir=")) + ?.split("=")[1] + .replaceAll('"', "") ?? "", + }; + } + return { dir: "" }; + }, + toArgs: ({ dir }) => { + return [`dir=\"${dir}\"`]; + }, + control: ({ dir, onChange, controlProps }) => { + const { collection, field } = controlProps; - const handleChange = ({ path }) => { - onChange({ dir: path }); - }; + const handleChange = ({ path }) => { + onChange({ dir: path }); + }; - const handleOpenMediaLibrary = useMediaInsert( - dir, - { collection, field, forFolder: true }, - handleChange - ); + const handleOpenMediaLibrary = useMediaInsert( + dir, + { collection, field, forFolder: true }, + handleChange + ); - return Card([ - TextField({ - label: "Bilderkarussell", - value: dir, - onChange: (event) => { - onChange({ dir: event.target.value }); - }, - }), - h( - "span", - { key: "slider-button", className: "flex gap-2 pt-2 px-2" }, - h( - "button", - { - type: "button", - onClick: handleOpenMediaLibrary, - className: "btn btn-contained-primary", - }, - "wählen" - ) - ), - ]); - }, - preview: ({ dir }) => { - return h( - "div", - { className: "card mb-4" }, - h( - "div", - { className: "card-body mb-0" }, - h("div", { className: "card-title h4" }, "Bilderkarussell"), - h("div", { className: "card-text" }, dir) - ) - ); - }, + return Card([ + TextField({ + label: "Bilderkarussell", + value: dir, + onChange: (event) => { + onChange({ dir: event.target.value }); + }, + }), + h( + "span", + { key: "slider-button", className: "flex gap-2 pt-2 px-2" }, + h( + "button", + { + type: "button", + onClick: handleOpenMediaLibrary, + className: "btn btn-contained-primary", + }, + "wählen" + ) + ), + ]); + }, + preview: ({ dir }) => { + return h( + "div", + { className: "card mb-4" }, + h( + "div", + { className: "card-body mb-0" }, + h("div", { className: "card-title h4" }, "Bilderkarussell"), + h("div", { className: "card-text" }, dir) + ) + ); + }, }; export default SliderShortcode; diff --git a/static/admin/shortcodes/youtube.js b/static/admin/shortcodes/youtube.js index 105ca3a5..15cef635 100644 --- a/static/admin/shortcodes/youtube.js +++ b/static/admin/shortcodes/youtube.js @@ -1,59 +1,59 @@ import { Card, TextField } from "./components/index.js"; const YoutubeShortcode = { - label: "YouTube-Video", - openTag: "{{< ", - closeTag: " >}}", - separator: " ", - toProps: (args) => { - if (args.length > 0) { - return { src: args[0] }; - } + label: "YouTube-Video", + openTag: "{{< ", + closeTag: " >}}", + separator: " ", + toProps: (args) => { + if (args.length > 0) { + return { src: args[0] }; + } - return { src: "" }; - }, - toArgs: ({ src }) => { - return [src]; - }, - control: ({ src, onChange }) => { - return Card( - [ - TextField({ - label: "YouTube-Video-ID", - value: src, - onChange: (event) => { - onChange({ src: event.target.value }); - }, - }), - h( - "iframe", - { - width: "100%", - height: "360", - src: `https://piped.kavin.rocks/embed/${src}`, - className: "px-3 pt-3", - }, - "" - ), - ], - { vertical: true } - ); - }, - preview: ({ src }) => { - return h( - "span", - {}, - h( - "iframe", - { - width: "420", - height: "315", - src: `https://piped.kavin.rocks/embed/${src}`, - }, - "" - ) - ); - }, + return { src: "" }; + }, + toArgs: ({ src }) => { + return [src]; + }, + control: ({ src, onChange }) => { + return Card( + [ + TextField({ + label: "YouTube-Video-ID", + value: src, + onChange: (event) => { + onChange({ src: event.target.value }); + }, + }), + h( + "iframe", + { + width: "100%", + height: "360", + src: `https://piped.kavin.rocks/embed/${src}`, + className: "px-3 pt-3", + }, + "" + ), + ], + { vertical: true } + ); + }, + preview: ({ src }) => { + return h( + "span", + {}, + h( + "iframe", + { + width: "420", + height: "315", + src: `https://piped.kavin.rocks/embed/${src}`, + }, + "" + ) + ); + }, }; export default YoutubeShortcode; diff --git a/static/schulchronik/admin/index.html b/static/schulchronik/admin/index.html index ddd71115..fca6e144 100644 --- a/static/schulchronik/admin/index.html +++ b/static/schulchronik/admin/index.html @@ -3,8 +3,14 @@ - - + + Chronikverwaltung @@ -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,15 +101,12 @@ ].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) => - CMS.registerFieldPreview(collection, "description", BodyPreview) + ["cantorpreis-index", "abiturienten-index", "cantorfora"].forEach( + (collection) => + CMS.registerFieldPreview(collection, "description", BodyPreview) ); CMS.registerFieldPreview("chronikseiten", "title", BodyPreview);