From 463c202d80f57efb8e46bab4ee4ad7038444b25d Mon Sep 17 00:00:00 2001 From: Elias Haugsbakk Date: Mon, 6 Jul 2026 21:12:40 +0200 Subject: implement post searching --- .../src/main/resources/templates/blog-search.html | 41 ++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 clams-server/src/main/resources/templates/blog-search.html (limited to 'clams-server/src/main/resources/templates/blog-search.html') diff --git a/clams-server/src/main/resources/templates/blog-search.html b/clams-server/src/main/resources/templates/blog-search.html new file mode 100644 index 0000000..e2188cf --- /dev/null +++ b/clams-server/src/main/resources/templates/blog-search.html @@ -0,0 +1,41 @@ +{% extends "templates/layout.html" %} + +{% block content %} +
+ ← back +
+

Elias Haugsbakk's Blog

+

For search: "{{ search_term }}" -- Found {{ results_count }} matching posts

+ +
+ + +
+
+ +
+ {% if results is empty %} +
+ {% if search_term is empty %} +

Please enter a search term to search the blog posts. Or go back to all posts.

+ {% else %} +

Found no posts matching "{{ search_term }}".
+ Go back to all posts.

+ {% endif %} +
+ {% else %} +
    + {% for post in results %} +
  • + {{ post.formattedDate }} + {{ post.title }} + {% if post.summary is not empty %} + -- {{ post.summary }} + {% endif %} +
  • + {% endfor %} +
+ {% endif %} +
+
+{% endblock %} -- cgit v1.2.3