From 0080db66f5fbd20ae0c9aa1f0656aa686f238458 Mon Sep 17 00:00:00 2001 From: Tobias Feigel Date: Wed, 9 Jul 2025 16:18:46 +0200 Subject: [PATCH] feat: introduce news section with blueprint and template Added a new `news.yml` blueprint and `news.php` template to create a dedicated news section. Integrated structured content with support for various block types, including FEN and PGN formats. Enhanced layout with author details, publication date, and customizable headlines. --- site/blueprints/pages/news.yml | 63 ++++++++++++++++++++++++++++++++++ site/templates/news.php | 57 ++++++++++++++++++++++++++++++ 2 files changed, 120 insertions(+) create mode 100644 site/blueprints/pages/news.yml create mode 100644 site/templates/news.php diff --git a/site/blueprints/pages/news.yml b/site/blueprints/pages/news.yml new file mode 100644 index 0000000..7e6168b --- /dev/null +++ b/site/blueprints/pages/news.yml @@ -0,0 +1,63 @@ +title: Block Page + +columns: + main: + width: 2/3 + sections: + content: + type: fields + fields: + blocks: + type: blocks + pretty: true + fieldsets: + - heading + - text + - image + - line + - gallery + - type: fen + label: FEN-Diagramm + preview: fields + wysiwyg: true + fields: + fen: + type: text + label: FEN-Position + - type: pgn4web + label: PGN-Datei + preview: fields + fields: + pgn: + label: PGN-Datei + type: files + + sidebar: + width: 1/3 + sections: + publishing: + type: fields + fields: + image: + label: Titelbild + type: files + headline: + label: Überschrift + type: text + subheadline: + label: Untertitel + type: text + summary: + label: Zusammenfassung + type: textarea + size: small + author: + label: Autor + type: users + default: true + date: + label: Datum + type: date + display: DD.MM.YYYY + default: today + diff --git a/site/templates/news.php b/site/templates/news.php new file mode 100644 index 0000000..f2c4d05 --- /dev/null +++ b/site/templates/news.php @@ -0,0 +1,57 @@ + + + + +

date()->toDate("d.m.Y") ?> - subheadline() ?>

+ +

headline() ?>

+ +
+ +
+ +
+ blocks()->toBlocks() ?> +
+ + author()->toUser()): ?> +
+
+ +
+

+ + +

+ +

+

role()->title() ?>

+
+
+
+ + + \ No newline at end of file