From 47a7e1149209131e6798c1cfcce261cbb05fbb6a Mon Sep 17 00:00:00 2001
From: Dominik George <dominik.george@teckids.org>
Date: Wed, 13 Mar 2024 00:02:50 +0100
Subject: [PATCH] Unify page and post templates

---
 templates/blog/post.html | 17 ++++++-----------
 templates/page.html      | 18 +++++++++---------
 2 files changed, 15 insertions(+), 20 deletions(-)

diff --git a/templates/blog/post.html b/templates/blog/post.html
index 6131ecd6..4ec3456c 100644
--- a/templates/blog/post.html
+++ b/templates/blog/post.html
@@ -1,13 +1,8 @@
-{% extends "base.html" %}
+{% extends "page.html" %}
 
-{% block main %}
-    <h1>{{ page.title }}</h1>
-    <div class="my-4">
-            <div class="section">
-                <div class="content container">
-                  <img src="{{ page.extra.depiction.image | safe }}" alt="{{ page.extra.depiction.alt }}" />
-                  {{ page.content }}
-                </div>
-            </div>
-    </div>
+{% block content %}
+  <div class="content">
+    <img src="{{ page.extra.depiction.image | safe }}" alt="{{ page.extra.depiction.alt }}" />
+    {{ page.content }}
+  </div>
 {% endblock %}
diff --git a/templates/page.html b/templates/page.html
index cb90ee49..bb85e8f9 100644
--- a/templates/page.html
+++ b/templates/page.html
@@ -1,14 +1,14 @@
 {% extends "base.html" %}
 
 {% block main %}
-    <div class="my-4">
-            <div class="section">
-               <div class="container">
-                <h1 class="title is-1">{{ page.title }}</h1>
-                <div class="content">
-                  {{ page.content | safe }}
-                </div>
-            </div>
-            </div>
+  <section class="section">
+    <div class="container">
+      <h1 class="title is-1">{{ page.title }}</h1>
+      {% block content %}
+        <div class="content">
+          {{ page.content | safe }}
+        </div>
+      {% endblock content %}
     </div>
+  </section>
 {% endblock %}
-- 
GitLab