Merge pull request 'cms optimizations' (#194) from cantortechnik/gcg-website:master into master

Reviewed-on: https://git.cantorgymnasium.de/gcg/gcg-website/pulls/194
This commit is contained in:
Denys Konovalov 2023-02-06 22:57:41 +01:00
commit abdea66f1c
2 changed files with 44 additions and 22 deletions

View File

@ -13,7 +13,7 @@ backend:
local_backend: true local_backend: true
media_folder: "static/media" media_folder: "/static/media"
public_folder: "/media" public_folder: "/media"
site_url: https://cantorgymnasium.de site_url: https://cantorgymnasium.de
display_url: https://cantorgymnasium.de display_url: https://cantorgymnasium.de
@ -33,14 +33,14 @@ collections:
description: "Hier können die Basiseinstellungen der Website geändert werden." description: "Hier können die Basiseinstellungen der Website geändert werden."
editor: editor:
preview: false preview: false
media_folder: "static/media" media_folder: "/static/media"
public_folder: "media" public_folder: "/media"
files: files:
- name: "homepage-config" - name: "homepage-config"
label: "Startseitenkonfiguration" label: "Startseitenkonfiguration"
file: "data/de/homepage.yml" file: "data/de/homepage.yml"
media_folder: "/static/media/home" media_folder: "/static/media/home"
public_folder: "media/home" public_folder: "/media/home"
format: yml format: yml
fields: fields:
- label: "Banner" - label: "Banner"
@ -66,7 +66,7 @@ collections:
collapsed: true collapsed: true
fields: fields:
- {label: "Aktivieren", name: "enable", widget: "boolean", required: false} - {label: "Aktivieren", name: "enable", widget: "boolean", required: false}
- {label: "Hintergrundbild", name: "bg_image", widget: "image", required: false} - {label: "Hintergrundbild", name: "bg_image", widget: "image", required: false, media_library: { config: { max_file_size: 2048000 } } }
- {label: "Titel", name: "title", widget: "string", required: false} - {label: "Titel", name: "title", widget: "string", required: false}
- label: "Elemente" - label: "Elemente"
label_singular: "Element" label_singular: "Element"
@ -126,14 +126,14 @@ collections:
collapsed: true collapsed: true
fields: fields:
- {label: "Aktivieren", name: "enable", widget: "boolean", required: false} - {label: "Aktivieren", name: "enable", widget: "boolean", required: false}
- {label: "Bild", name: "image", widget: "image", required: false} - {label: "Bild", name: "image", widget: "image", required: false, media_library: { config: { max_file_size: 2048000 } } }
- label: "Elemente" - label: "Elemente"
name: "feature_item" name: "feature_item"
widget: "list" widget: "list"
fields: fields:
- {label: "Bezeichnung", name: "name", widget: "string", required: false} - {label: "Bezeichnung", name: "name", widget: "string", required: false}
- {label: "Symbol", name: "icon", widget: "string", required: false, hint: "Liste unter https://fontawesome.com/search"} - {label: "Symbol", name: "icon", widget: "string", required: false, hint: "Liste unter https://fontawesome.com/search"}
- {label: "Bild", name: "image", widget: "image", required: false} - {label: "Bild", name: "image", widget: "image", required: false, media_library: { config: { max_file_size: 2048000 } } }
- {label: "Inhalt", name: "content", widget: "markdown", required: false} - {label: "Inhalt", name: "content", widget: "markdown", required: false}
- label: "Ganztagsangebote" - label: "Ganztagsangebote"
name: "ganztagsangebote" name: "ganztagsangebote"
@ -163,7 +163,7 @@ collections:
collapsed: true collapsed: true
fields: fields:
- {label: "Aktivieren", name: "enable", widget: "boolean", required: false} - {label: "Aktivieren", name: "enable", widget: "boolean", required: false}
- {label: "Hintergrundbild", name: "bg_image", widget: "image", required: false} - {label: "Hintergrundbild", name: "bg_image", widget: "image", required: false, media_library: { config: { max_file_size: 2048000 } } }
- {label: "Titel", name: "title", widget: "string", required: false} - {label: "Titel", name: "title", widget: "string", required: false}
- {label: "Inhalt", name: "content", widget: "text", required: false} - {label: "Inhalt", name: "content", widget: "text", required: false}
- {label: "Video-Link", name: "video_link", widget: "string", required: false} - {label: "Video-Link", name: "video_link", widget: "string", required: false}
@ -181,7 +181,7 @@ collections:
fields: fields:
- {label: "Aktivieren", name: "enable", widget: "boolean", required: false} - {label: "Aktivieren", name: "enable", widget: "boolean", required: false}
- {label: "Titel", name: "title", widget: "string", required: false} - {label: "Titel", name: "title", widget: "string", required: false}
- {label: "Bild", name: "image", widget: "image", required: false} - {label: "Bild", name: "image", widget: "image", required: false, media_library: { config: { max_file_size: 2048000 } } }
- {label: "Inhalt", name: "content", widget: "markdown", required: false} - {label: "Inhalt", name: "content", widget: "markdown", required: false}
- label: "Logo-Banner (unten)" - label: "Logo-Banner (unten)"
name: "footer_logos" name: "footer_logos"
@ -236,7 +236,7 @@ collections:
widget: "list" widget: "list"
fields: fields:
- {label: "Link", name: "link", widget: "string"} - {label: "Link", name: "link", widget: "string"}
- {label: "Logo", name: "logo", widget: "image"} - {label: "Logo", name: "logo", widget: "image", media_library: { config: { max_file_size: 2048000 } } }
- {label: "Autor", name: "author", widget: "string"} - {label: "Autor", name: "author", widget: "string"}
- {label: "Adresse", name: "address", widget: "string"} - {label: "Adresse", name: "address", widget: "string"}
- {label: "Route (Link)", name: "route_link", widget: "string"} - {label: "Route (Link)", name: "route_link", widget: "string"}
@ -259,8 +259,8 @@ collections:
widget: "object" widget: "object"
fields: fields:
- {label: "Aktivieren", name: "enable", widget: "boolean", required: false} - {label: "Aktivieren", name: "enable", widget: "boolean", required: false}
- {label: "Logo", name: "preloader", widget: "image"} - {label: "Logo", name: "preloader", widget: "image", media_library: { config: { max_file_size: 2048000 } } }
- {label: "Ladeanimation", name: "loader", widget: "image"} - {label: "Ladeanimation", name: "loader", widget: "image", media_library: { config: { max_file_size: 2048000 } } }
- label: "Soz. Netzwerke" - label: "Soz. Netzwerke"
name: "social" name: "social"
widget: "list" widget: "list"
@ -387,7 +387,7 @@ collections:
- {label: "Titel", name: "title", widget: "string"} - {label: "Titel", name: "title", widget: "string"}
- {label: "Entwurf", name: "draft", widget: "boolean", default: false, required: false} - {label: "Entwurf", name: "draft", widget: "boolean", default: false, required: false}
- {label: "Hintergrundbild", name: "bg_image", widget: "hidden", default: "/media/backgrounds/page-title.webp"} - {label: "Hintergrundbild", name: "bg_image", widget: "hidden", default: "/media/backgrounds/page-title.webp"}
- {label: "Bild", name: "image", widget: "image", default: "/media/image.webp", required: false} - {label: "Bild", name: "image", widget: "image", default: "/media/image.webp", required: false, media_library: { config: { max_file_size: 2048000 } } }
- {label: "Metabeschreibung", name: "description", widget: "text", required: false} - {label: "Metabeschreibung", name: "description", widget: "text", required: false}
- label: "Statistik" - label: "Statistik"
name: "stats" name: "stats"
@ -547,7 +547,7 @@ collections:
- {label: "Hintergrundbild", name: "bg_image", widget: "hidden", default: "/media/backgrounds/page-title.webp"} - {label: "Hintergrundbild", name: "bg_image", widget: "hidden", default: "/media/backgrounds/page-title.webp"}
- {label: "Metabeschreibung", name: "description", widget: "text", default: "", required: false} - {label: "Metabeschreibung", name: "description", widget: "text", default: "", required: false}
- {label: "Gravatar-E-Mail", name: "email", widget: "string", required: false} - {label: "Gravatar-E-Mail", name: "email", widget: "string", required: false}
- {label: "Foto", name: "image", widget: "image", required: false} - {label: "Foto", name: "image", widget: "image", required: false, media_library: { config: { max_file_size: 2048000 } } }
- label: "Kontaktdaten" - label: "Kontaktdaten"
label_singular: " " label_singular: " "
name: "social" name: "social"
@ -603,7 +603,7 @@ collections:
- {label: "Entwurf", name: "draft", widget: "boolean", default: false, required: false} - {label: "Entwurf", name: "draft", widget: "boolean", default: false, required: false}
- {label: "Hintergrundbild", name: "bg_image", widget: "hidden", default: "/media/backgrounds/page-title.webp"} - {label: "Hintergrundbild", name: "bg_image", widget: "hidden", default: "/media/backgrounds/page-title.webp"}
- {label: "Metabeschreibung", name: "description", widget: "text", default: "", required: false} - {label: "Metabeschreibung", name: "description", widget: "text", default: "", required: false}
- {label: "Beitragsbild", name: "image", widget: "image", default: "/media/blog/image.webp"} - {label: "Beitragsbild", name: "image", widget: "image", default: "/media/blog/image.webp", media_library: { config: { max_file_size: 2048000 } } }
- label: "Beitragsautor" - label: "Beitragsautor"
name: "author" name: "author"
widget: "relation" widget: "relation"
@ -682,7 +682,7 @@ collections:
- {label: "Entwurf", name: "draft", widget: "boolean", default: false, required: false} - {label: "Entwurf", name: "draft", widget: "boolean", default: false, required: false}
- {label: "Hintergrundbild", name: "bg_image", widget: "hidden", default: "/media/backgrounds/page-title.webp"} - {label: "Hintergrundbild", name: "bg_image", widget: "hidden", default: "/media/backgrounds/page-title.webp"}
- {label: "Beschreibung", name: "description", widget: "text", required: false} - {label: "Beschreibung", name: "description", widget: "text", required: false}
- {label: "Bild", name: "image", widget: "image", default: "/media/cantorpreis/image.webp", required: false} - {label: "Bild", name: "image", widget: "image", default: "/media/cantorpreis/image.webp", required: false, media_library: { config: { max_file_size: 2048000 } } }
- {label: "Name", name: "name", widget: "string"} - {label: "Name", name: "name", widget: "string"}
- label: "Kontaktdaten/Soz. Netzwerke" - label: "Kontaktdaten/Soz. Netzwerke"
name: "contact" name: "contact"
@ -726,7 +726,7 @@ collections:
- {label: "Entwurf", name: "draft", widget: "boolean", default: false, required: false} - {label: "Entwurf", name: "draft", widget: "boolean", default: false, required: false}
- {label: "Hintergrundbild", name: "bg_image", widget: "hidden", default: "/media/backgrounds/page-title.webp"} - {label: "Hintergrundbild", name: "bg_image", widget: "hidden", default: "/media/backgrounds/page-title.webp"}
- {label: "Metabeschreibung", name: "description", widget: "text", required: false} - {label: "Metabeschreibung", name: "description", widget: "text", required: false}
- {label: "Bild", name: "image", widget: "image", default: "/media/ganztagsangebote/image.webp", required: false} - {label: "Bild", name: "image", widget: "image", default: "/media/ganztagsangebote/image.webp", required: false, media_library: { config: { max_file_size: 2048000 } } }
- label: "Themenbereich" - label: "Themenbereich"
name: "category" name: "category"
widget: "relation" widget: "relation"
@ -761,7 +761,7 @@ collections:
- {label: "Entwurf", name: "draft", widget: "boolean", default: false, required: false} - {label: "Entwurf", name: "draft", widget: "boolean", default: false, required: false}
- {label: "Hintergrundbild", name: "bg_image", widget: "hidden", default: "/media/backgrounds/page-title.webp"} - {label: "Hintergrundbild", name: "bg_image", widget: "hidden", default: "/media/backgrounds/page-title.webp"}
- {label: "Metabeschreibung", name: "description", widget: "text", required: false} - {label: "Metabeschreibung", name: "description", widget: "text", required: false}
- {label: "Bild", name: "image", widget: "image", default: "/media/contests/image.webp", required: false} - {label: "Bild", name: "image", widget: "image", default: "/media/contests/image.webp", required: false, media_library: { config: { max_file_size: 2048000 } } }
- label: "Fach" - label: "Fach"
name: "category" name: "category"
widget: "relation" widget: "relation"
@ -793,7 +793,7 @@ collections:
- {label: "Entwurf", name: "draft", widget: "boolean", default: false, required: false} - {label: "Entwurf", name: "draft", widget: "boolean", default: false, required: false}
- {label: "Hintergrundbild", name: "bg_image", widget: "hidden", default: "/media/backgrounds/page-title.webp"} - {label: "Hintergrundbild", name: "bg_image", widget: "hidden", default: "/media/backgrounds/page-title.webp"}
- {label: "Metabeschreibung", name: "description", widget: "text", required: false} - {label: "Metabeschreibung", name: "description", widget: "text", required: false}
- {label: "Bild", name: "image", widget: "image", default: "/media/begabte/image.webp", required: false} - {label: "Bild", name: "image", widget: "image", default: "/media/begabte/image.webp", required: false, media_library: { config: { max_file_size: 2048000 } } }
- label: "Fach" - label: "Fach"
name: "category" name: "category"
widget: "relation" widget: "relation"
@ -849,7 +849,7 @@ collections:
- {label: "Titel", name: "title", widget: "string"} - {label: "Titel", name: "title", widget: "string"}
- {label: "Entwurf", name: "draft", widget: "boolean", default: false, required: false} - {label: "Entwurf", name: "draft", widget: "boolean", default: false, required: false}
- {label: "Hintergrundbild", name: "bg_image", widget: "hidden", default: "/media/backgrounds/page-title.webp"} - {label: "Hintergrundbild", name: "bg_image", widget: "hidden", default: "/media/backgrounds/page-title.webp"}
- {label: "Bild", name: "image", widget: "image", default: "/media/abiturienten/image.webp", required: false} - {label: "Bild", name: "image", widget: "image", default: "/media/abiturienten/image.webp", required: false, media_library: { config: { max_file_size: 2048000 } } }
- {label: "Mehrere Bilder", name: "multiple", widget: "boolean", default: false, required: false} - {label: "Mehrere Bilder", name: "multiple", widget: "boolean", default: false, required: false}
- {label: "Type", name: "type", widget: "hidden", default: "abiturienten"} - {label: "Type", name: "type", widget: "hidden", default: "abiturienten"}
- {label: "Gallerie-Komponente", name: "gallery", widget: "boolean", default: true, required: false, hint: "Benötigt für Gallerie bzw. Bildeinbettung"} - {label: "Gallerie-Komponente", name: "gallery", widget: "boolean", default: true, required: false, hint: "Benötigt für Gallerie bzw. Bildeinbettung"}
@ -881,7 +881,7 @@ collections:
- {label: "Entwurf", name: "draft", widget: "boolean", default: false, required: false} - {label: "Entwurf", name: "draft", widget: "boolean", default: false, required: false}
- {label: "Hintergrundbild", name: "bg_image", widget: "hidden", default: "/media/backgrounds/page-title.webp"} - {label: "Hintergrundbild", name: "bg_image", widget: "hidden", default: "/media/backgrounds/page-title.webp"}
- {label: "Metabeschreibung", name: "description", widget: "text", default: "", required: false} - {label: "Metabeschreibung", name: "description", widget: "text", default: "", required: false}
- {label: "Beitragsbild", name: "image", widget: "image", default: "/media/image.webp"} - {label: "Beitragsbild", name: "image", widget: "image", default: "/media/image.webp", media_library: { config: { max_file_size: 2048000 } } }
- {label: "Type", name: "type", widget: "hidden", default: "cantorfora"} - {label: "Type", name: "type", widget: "hidden", default: "cantorfora"}
- {label: "Gallerie-Komponente", name: "gallery", widget: "boolean", default: true, required: false, hint: "Benötigt für Gallerie bzw. Bildeinbettung"} - {label: "Gallerie-Komponente", name: "gallery", widget: "boolean", default: true, required: false, hint: "Benötigt für Gallerie bzw. Bildeinbettung"}
- {label: "Text", name: "body", widget: "markdown"} - {label: "Text", name: "body", widget: "markdown"}

View File

@ -20,7 +20,29 @@
CMS.registerIcon(icon[0], ({}) => { return(h('i', {"className": icon[1]})); }); CMS.registerIcon(icon[0], ({}) => { return(h('i', {"className": icon[1]})); });
}); });
const StatusPage = () => { const StatusPage = () => {
return h('a', {href: "https://drone.cantorgymnasium.de/gcg/gcg-website"}, h('img', {src: "https://drone.cantorgymnasium.de/api/badges/gcg/gcg-website/status.svg"})); return h('div', {className: "row"},
h('div', {className: "column"},
h('h2', {}, "Build-Status"),
h('div', {className: "row"},
"Produktivumgebung: ",
h('a', {href: "https://drone.cantorgymnasium.de/gcg/gcg-website", target: "_blank"}, h('img', {src: "https://drone.cantorgymnasium.de/api/badges/gcg/gcg-website/status.svg"})),
h('div', {className: "row"},
"Entwicklungsumgebung: ",
h('a', {href: "https://drone.cantorgymnasium.de/cantortechnik/gcg-website", target: "_blank"}, h('img', {src: "https://drone.cantorgymnasium.de/api/badges/cantortechnik/gcg-website/status.svg"}))
))),
h('div', {className: "column"},
h('h2', {}, "Verfügbarkeit"),
h('div', {className: "row"},
"cantorgymnasium.de: ",
h('a', {href: "https://cantorgymnasium.de/", target: "_blank"}, h('img', {src: "https://status.cantorgymnasium.de/api/badge/16/status?upLabel=online&downLabel=offline&style=for-the-badge"})),
h('div', {className: "row"},
"test.cantorgymnasium.de: ",
h('a', {href: "https://test.cantorgymnasium.de/", target: "_blank"}, h('img', {src: "https://status.cantorgymnasium.de/api/badge/25/status?upLabel=online&downLabel=offline&style=for-the-badge"})),
h('div', {className: "row"},
"dev.cantorgymnasium.de: ",
h('a', {href: "https://dev.cantorgymnasium.de/", target: "_blank"}, h('img', {src: "https://status.cantorgymnasium.de/api/badge/31/status?upLabel=online&downLabel=offline&style=for-the-badge"}))
))))
);
}; };
CMS.registerAdditionalLink({ CMS.registerAdditionalLink({
id: 'status', id: 'status',