From 19c9cb227b343377853321e2cdc4285b2ea23e3a Mon Sep 17 00:00:00 2001 From: Elias Haugsbakk Date: Wed, 1 Jul 2026 21:18:58 +0200 Subject: implement blog index page with featured and all posts --- clams-server/src/main/resources/templates/404.html | 51 +++++---------------- .../src/main/resources/templates/blog.html | 33 ++++---------- .../src/main/resources/templates/home.html | 53 ++++++++-------------- .../src/main/resources/templates/layout.html | 23 ++++++++++ .../src/main/resources/templates/post.html | 23 ++-------- .../src/main/resources/templates/projects.html | 27 ++--------- 6 files changed, 69 insertions(+), 141 deletions(-) create mode 100644 clams-server/src/main/resources/templates/layout.html (limited to 'clams-server/src/main/resources/templates') diff --git a/clams-server/src/main/resources/templates/404.html b/clams-server/src/main/resources/templates/404.html index 6bbcecd..bb4c4d5 100644 --- a/clams-server/src/main/resources/templates/404.html +++ b/clams-server/src/main/resources/templates/404.html @@ -1,41 +1,14 @@ - - - - - 404 - Page Not Found - - - - +{% extends "templates/layout.html" %} -
-
-
404
-

Page Not Found

-

The page you are looking for does not exist.

-

- Return to Home Page -

-
-
- - - - - + + +{% endblock %} diff --git a/clams-server/src/main/resources/templates/blog.html b/clams-server/src/main/resources/templates/blog.html index 168cfe1..200a144 100644 --- a/clams-server/src/main/resources/templates/blog.html +++ b/clams-server/src/main/resources/templates/blog.html @@ -1,13 +1,6 @@ - - - - - Elias Haugsbakk's Blog - - - - +{% extends "templates/layout.html" %} +{% block content %}

Elias Haugsbakk's Blog

@@ -21,28 +14,18 @@
-
-

{{ all_posts_title }}

- - {{ all_posts_by_year | raw }} +
+

All Posts

+ {{ all_posts| raw }}
-
-

Recent

+
+

Featured

{{ recent_posts | raw }}
- - - - +{% endblock %} diff --git a/clams-server/src/main/resources/templates/home.html b/clams-server/src/main/resources/templates/home.html index 199ae29..b5ff1d6 100644 --- a/clams-server/src/main/resources/templates/home.html +++ b/clams-server/src/main/resources/templates/home.html @@ -1,39 +1,22 @@ - - - - - Elias Haugsbakk - - - - +{% extends "templates/layout.html" %} -
-

Elias Haugsbakk's Webpage

- -
-
- Image of Elias Haugsbakk -

Hello! I am Elias and this is my webpage.

-
+{% block content %} +
+

Elias Haugsbakk's Webpage

-
-
    -
  • Blog -- personal projects and thoughts
  • -
  • GitHub -- home for my code
  • -
  • Projects -- the projects I have worked on
  • -
-
+
+
+ Image of Elias Haugsbakk +

Hello! I am Elias and this is my webpage.

-
- - - - +
+
    +
  • Blog -- personal projects and thoughts
  • +
  • GitHub -- home for my code
  • +
  • Projects -- the projects I have worked on
  • +
+
+
+
+{% endblock %} diff --git a/clams-server/src/main/resources/templates/layout.html b/clams-server/src/main/resources/templates/layout.html new file mode 100644 index 0000000..4c8b8dc --- /dev/null +++ b/clams-server/src/main/resources/templates/layout.html @@ -0,0 +1,23 @@ + + + + + + {{ page_title }} + + + + + +{% block content %}{% endblock %} + + + + + diff --git a/clams-server/src/main/resources/templates/post.html b/clams-server/src/main/resources/templates/post.html index 85f8977..40444b2 100644 --- a/clams-server/src/main/resources/templates/post.html +++ b/clams-server/src/main/resources/templates/post.html @@ -1,13 +1,6 @@ - - - - - {{ title }} - Elias Haugsbakk - - - - +{% extends "templates/layout.html" %} +{% block content %}
@@ -25,14 +18,4 @@ {{ next_post_link | raw }}
- - - - - +{% endblock %} diff --git a/clams-server/src/main/resources/templates/projects.html b/clams-server/src/main/resources/templates/projects.html index 8af0538..bab2a05 100644 --- a/clams-server/src/main/resources/templates/projects.html +++ b/clams-server/src/main/resources/templates/projects.html @@ -1,13 +1,6 @@ - - - - - Projects - Elias Haugsbakk - - - - +{% extends "templates/layout.html" %} +{% block content %}

Projects

@@ -64,24 +57,14 @@
  • Other Project One - A short one-line description. (Bash) - GitHub + GitHub
  • Other Project Two - A short one-line description. (Python, PostgreSQL) - GitHub + GitHub
  • - - - - - +{% endblock %} -- cgit v1.2.3