From 8e27c3af5de3294e746a56cf30d017690c90cec1 Mon Sep 17 00:00:00 2001 From: Stephan Date: Sat, 6 Feb 2021 15:13:13 +0100 Subject: [PATCH] =?UTF-8?q?Header=20vom=20Layout=20separiert.=20Erm=C3=B6g?= =?UTF-8?q?licht=20custom=20Claims=20auf=20allen=20Seiten.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- content/about/contents.lr | 17 ++++++++ models/header.ini | 19 +++++++++ models/homepage.ini | 17 +------- models/multisection.ini | 1 + models/page.ini | 1 + templates/header.html | 85 +++++++++++++++++++++++++++++++++++++ templates/homepage.html | 2 +- templates/layout.html | 83 +----------------------------------- templates/multisection.html | 2 +- 9 files changed, 127 insertions(+), 100 deletions(-) create mode 100644 models/header.ini create mode 100644 templates/header.html diff --git a/content/about/contents.lr b/content/about/contents.lr index f6881959..6f578d55 100644 --- a/content/about/contents.lr +++ b/content/about/contents.lr @@ -1,5 +1,22 @@ _model: page --- +claim_heading: + +## Werde Teilchen­beschleu­nigerIn
in der chaosnahen Genossenschaft. +--- +claim_content: + +Booste Projekte mit Unterstütung von 150 GenossInnen
Genossen­schaftlich & solidarisch. +--- +subclaim_heading: + +## Genossenschaft zur Erschließung neuer
Betätigungs­formen in der Informations­technologie. +--- +subclaim_content: + +Wir halten Mitglieder und Interessierte durch regelmäßige Rundmails, Beiträge im Wiki und unseren Podcast auf dem Laufenden.
+Unseren Podcast findest du auf [vebit.xyz/podcast](https://vebit.xyz/pocast). +--- title: About this Website --- body: diff --git a/models/header.ini b/models/header.ini new file mode 100644 index 00000000..f488af9b --- /dev/null +++ b/models/header.ini @@ -0,0 +1,19 @@ +[model] +name = Header +label = Header + +[fields.claim_heading] +label = Claim Heading +type = markdown + +[fields.claim_content] +label = Claim Content +type = markdown + +[fields.subclaim_heading] +label = Subclaim Heading +type = markdown + +[fields.subclaim_content] +label = Subclaim Content +type = markdown diff --git a/models/homepage.ini b/models/homepage.ini index c213ebf5..e2890fc1 100644 --- a/models/homepage.ini +++ b/models/homepage.ini @@ -1,26 +1,11 @@ [model] name = Homepage label = Homepage +inherits = header [fields.title] label = Title type = string -[fields.claim_heading] -label = Claim Heading -type = markdown - -[fields.claim_content] -label = Claim Content -type = markdown - -[fields.subclaim_heading] -label = Subclaim Heading -type = markdown - -[fields.subclaim_content] -label = Subclaim Content -type = markdown - [children] order_by = sort_key diff --git a/models/multisection.ini b/models/multisection.ini index 6fc4ef12..70b3c9b1 100644 --- a/models/multisection.ini +++ b/models/multisection.ini @@ -1,6 +1,7 @@ [model] name = Multisection label = Multisection +inherits = header [fields.title] label = Title diff --git a/models/page.ini b/models/page.ini index dcddfe82..580f5b6c 100644 --- a/models/page.ini +++ b/models/page.ini @@ -1,6 +1,7 @@ [model] name = Page label = {{ this.title }} +inherits = header [fields.title] label = Title diff --git a/templates/header.html b/templates/header.html new file mode 100644 index 00000000..b1157515 --- /dev/null +++ b/templates/header.html @@ -0,0 +1,85 @@ +{% extends "layout.html" %} +{% block header %} +
+
+ + + +
+ +
+
+ + +
+
+
+
+
+
+
+
+
+ +
+ + {{ this.claim_heading }} + {{ this.claim_content }} +
+
+
+ {{ this.subclaim_heading }} + {{ this.subclaim_content }} +
+ + +
+
+{% endblock %} diff --git a/templates/homepage.html b/templates/homepage.html index c440cc4d..a6cfee78 100644 --- a/templates/homepage.html +++ b/templates/homepage.html @@ -1,4 +1,4 @@ -{% extends "layout.html" %} +{% extends "header.html" %} {% from "macros/multisection.html" import render_section %} {% block body %}
diff --git a/templates/layout.html b/templates/layout.html index 41c1aeb8..d73569b8 100644 --- a/templates/layout.html +++ b/templates/layout.html @@ -32,88 +32,7 @@
-
-
- - - -
- -
-
- - -
-
-
-
-
-
-
-
-
- -
- - {{ this.claim_heading }} - {{ this.claim_content }} -
-
-
- {{ this.subclaim_heading }} - {{ this.subclaim_content }} -
- - -
-
+ {% block header %}{% endblock %}
diff --git a/templates/multisection.html b/templates/multisection.html index 5b66129e..cba52cfc 100644 --- a/templates/multisection.html +++ b/templates/multisection.html @@ -1,4 +1,4 @@ -{% extends "layout.html" %} +{% extends "header.html" %} {% from "macros/multisection.html" import render_section %} {% block body %} {% for child in this.children %}