From c0d63ab5f38c53c266b285c4c2b3e55a7f29b820 Mon Sep 17 00:00:00 2001 From: Froge Date: Wed, 23 Jul 2025 09:52:56 +1000 Subject: [PATCH] Update page templating to centralize header and metatada, add 404 page --- templates/404.html | 11 +++++++++++ templates/base.html | 14 +------------- templates/index.html | 26 +++++++++++++++++++------- templates/page.html | 36 +++++++++--------------------------- 4 files changed, 40 insertions(+), 47 deletions(-) create mode 100644 templates/404.html diff --git a/templates/404.html b/templates/404.html new file mode 100644 index 0000000..b6a14a0 --- /dev/null +++ b/templates/404.html @@ -0,0 +1,11 @@ +{% extends "base.html" %} + +{% block content %} +
+
+

|| 404 Not Found ||

+ +
+
+
+{% endblock content %} diff --git a/templates/base.html b/templates/base.html index d642fc1..720988e 100644 --- a/templates/base.html +++ b/templates/base.html @@ -17,19 +17,7 @@ ██████ ██ ██████ ███████ ██ ██ ██ ██ ██ ██████ ██████ ██ ██ ██ ███████
-
-
-

Welcome

-

This blog is made with 💜 and Zola!

-

It's currently running on Vultr and OpenBSD -

-
-
-
-

View the latest posts

- {% block content %} {% endblock %} -
-
+ {% block content %} {% endblock content %} diff --git a/templates/index.html b/templates/index.html index ce6db9e..94f6fb2 100644 --- a/templates/index.html +++ b/templates/index.html @@ -1,11 +1,23 @@ {% extends "base.html" %} {% block content %} - +
+
+

Welcome

+

This blog is made with 💜 and Zola!

+

It's currently running on Vultr and OpenBSD +

+
+
+
+

View the latest posts

+
    + + {% for page in section.pages %} +
  • {{ page.date }} // {{ page.title }}
  • + {% endfor %} +
+
+
{% endblock content %} diff --git a/templates/page.html b/templates/page.html index a4658c1..9168758 100644 --- a/templates/page.html +++ b/templates/page.html @@ -1,32 +1,14 @@ - - - - - - 🐸 CyberFrog - +{% extends "base.html" %} - -
- - -
-
-
-

{{ page.title }}

- -
+{% block content %} +
+
+

{{ page.title }}

+ +
{{ page.content | safe }}
-
- - - +
+{% endblock content %}