diff --git a/assets/scss/_common.scss b/assets/scss/_common.scss index 80f005f..d3148dc 100644 --- a/assets/scss/_common.scss +++ b/assets/scss/_common.scss @@ -432,7 +432,7 @@ details[open] summary { #wc-canvas { width: 100%; - height: 600px; + height: 400px; } .top-banner { @@ -445,4 +445,15 @@ details[open] summary { .content-justify { text-align: justify; +} + +.fb-tile-color { + display: flex; + justify-content: center; + align-items: center; + height: 195px; +} + +.fb-tile-icon { + font-size: 96px; } \ No newline at end of file diff --git a/config.yml b/config.yml index 2e23211..1f0731b 100644 --- a/config.yml +++ b/config.yml @@ -7,6 +7,7 @@ defaultContentLanguage: de enableEmoji: true enableRobotsTxt: true timeZone: Europe/Berlin +removePathAccents: true markup: defaultMarkdownHandler: goldmark goldmark: diff --git a/content/german/schulchronik/2018.md b/content/german/schulchronik/2018.md index d6849a7..9a7d407 100644 --- a/content/german/schulchronik/2018.md +++ b/content/german/schulchronik/2018.md @@ -23,10 +23,6 @@ topics: Inhalt - - {{< card >}} - - - title: Schulfest "Make Cantor great again" content: | Inhalt diff --git a/content/german/superhaufen/_index.md b/content/german/superhaufen/_index.md new file mode 100644 index 0000000..b7e34f8 --- /dev/null +++ b/content/german/superhaufen/_index.md @@ -0,0 +1,6 @@ +--- +title: Superhaufen +draft: false +bg_image: media/backgrounds/page-title.webp +description: null +--- \ No newline at end of file diff --git a/layouts/_default/superhaufen.html b/layouts/_default/superhaufen.html new file mode 100644 index 0000000..0ec4ac1 --- /dev/null +++ b/layouts/_default/superhaufen.html @@ -0,0 +1,7 @@ +
+
+

{{ .Title | truncate 20 }}

+ {{ i18n "show_more"}} +
+
+ \ No newline at end of file diff --git a/layouts/partials/head.html b/layouts/partials/head.html index af6ba4a..32221be 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -16,6 +16,8 @@ + + diff --git a/layouts/schulchronik/single.html b/layouts/schulchronik/single.html index 84dcba5..575caff 100644 --- a/layouts/schulchronik/single.html +++ b/layouts/schulchronik/single.html @@ -28,9 +28,18 @@ {{ partial "chronik-modal" (dict "id" "pretext" "title" .Title "content" .Params.pretext) }} {{ end }}
- {{ $topics := slice (slice .Params.Title 100 "pretext") }} + {{ $topics := slice }} + {{ if .Params.pretext }} + {{ $topics = $topics | append (slice (slice .Params.Title 200 "pretext")) }} + {{ else }} + {{ $topics = $topics | append (slice (slice .Params.Title 200)) }} + {{ end }} {{ range .Params.topics }} - {{ $topics = $topics | append (slice (slice .title 40 (md5 .title) )) }} + {{ if .superhaufen.enable }} + {{ $topics = $topics | append (slice (slice .title 30 (.superhaufen.link | urlize) "superhaufen" )) }} + {{ else }} + {{ $topics = $topics | append (slice (slice .title 30 (md5 .title) )) }} + {{ end }} {{ end }} {{ $topics = $topics | jsonify }} diff --git a/layouts/superhaufen/list.html b/layouts/superhaufen/list.html new file mode 100644 index 0000000..503437d --- /dev/null +++ b/layouts/superhaufen/list.html @@ -0,0 +1,15 @@ +{{ define "main" }} + +
+
+
+ {{ range .Data.Pages }} +
+ {{ .Render "superhaufen" }} +
+ {{ end }} +
+
+
+ +{{ end }} diff --git a/layouts/superhaufen/single.html b/layouts/superhaufen/single.html new file mode 100644 index 0000000..172bf70 --- /dev/null +++ b/layouts/superhaufen/single.html @@ -0,0 +1,60 @@ +{{ define "main" }} + +
+
+
+
+ {{ .Content }} +
+
+
+
+
+ {{ range .Params.tiles }} + +
+
+
+ +
+
+

{{ .title | truncate 55 }}

+ +
+
+
+ {{ end }} +
+
+
+ +{{ end }} \ No newline at end of file diff --git a/static/schulchronik/admin/config.yml b/static/schulchronik/admin/config.yml index 92fc10b..bd8dc97 100644 --- a/static/schulchronik/admin/config.yml +++ b/static/schulchronik/admin/config.yml @@ -136,6 +136,39 @@ collections: - {label: "Type", name: "type", widget: "hidden", default: "cantorpreis"} - {label: "Gallerie-Komponente", name: "gallery", widget: "boolean", default: false, required: false, hint: "Benötigt für Gallerie bzw. Bildeinbettung"} - {label: "Text", name: "body", widget: "markdown", required: false} + - name: "superhaufen" + icon: "superhaufen" + label: "Superhaufen" + label_singular: "Superhaufen" + folder: "content/german/superhaufen" + filter: {field: "type", value: "superhaufen"} + create: true + editor: + preview: false + media_folder: '/static/media/schulchronik/superhaufen' + public_folder: '/media/schulchronik/superhaufen' + fields: + - {label: "Titel", name: "title", widget: "string"} + - {label: "Entwurf", name: "draft", widget: "boolean", default: false, required: false} + - {label: "Hintergrundbild", name: "bg_image", widget: "hidden", default: "/media/backgrounds/page-title.webp"} + - {label: "Type", name: "type", widget: "hidden", default: "superhaufen"} + - label: "Kacheln" + name: "tiles" + widget: "list" + required: false + 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 + fields: + - {label: "Titel", name: "title", widget: "string", required: false} + - {label: "Inhalt", name: "content", widget: "markdown", required: true} - name: "schulchronik" icon: "pillar" label: "Schulchronik" @@ -156,10 +189,24 @@ collections: - 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} - required: false + - 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" diff --git a/static/schulchronik/admin/index.html b/static/schulchronik/admin/index.html index 8c0d609..308c25f 100644 --- a/static/schulchronik/admin/index.html +++ b/static/schulchronik/admin/index.html @@ -21,7 +21,7 @@ CMS.init();