diff options
| author | Elias Haugsbakk <[email protected]> | 2026-07-22 14:14:24 +0200 |
|---|---|---|
| committer | Elias Haugsbakk <[email protected]> | 2026-07-22 14:14:24 +0200 |
| commit | 5ac83efd59ab85d0bdf82d5847fe9fe0b11232d9 (patch) | |
| tree | d45dde720f638853695940b79a6eb6a2d978ded8 /clams-server/src/main/resources/templates/posts.html | |
| parent | 8d86458282efae6c3fc26ab8fb4bd61d1a4e01e3 (diff) | |
update article to post on the backend and blog on the frontend
Diffstat (limited to 'clams-server/src/main/resources/templates/posts.html')
| -rw-r--r-- | clams-server/src/main/resources/templates/posts.html | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/clams-server/src/main/resources/templates/posts.html b/clams-server/src/main/resources/templates/posts.html new file mode 100644 index 0000000..3eecd62 --- /dev/null +++ b/clams-server/src/main/resources/templates/posts.html @@ -0,0 +1,38 @@ +{% extends "templates/layout.html" %} + +{% block content %} +<main class="main-container"> + <a href="/" class="back-link-top">← back</a> + <header> + <h1>Blog</h1> + <p class="intro-text">My blog posts.</p> + + <form action="/posts" method="GET" class="search-form"> + <input type="text" name="search" value="{{ search_value }}" placeholder="Search posts..." + aria-label="Search posts"> + <button type="submit" class="pill-button">Search</button> + </form> + </header> + + <section id="all" class="posts-section"> + <h2>All Posts</h2> + {% for group in posts_by_year %} + <details class="year-accordion" {% if loop.first %}open{% endif %}> + <summary class="year-toggle">{{ group.key }}</summary> + <ul class="post-list"> + {% for post in group.value %} + <li class="post-list-item"> + <span class="post-date">{{ post.formattedDate }}</span> + <a href="/posts/{{ post.slug }}">{{ post.title }}</a> + {% if post.summary is not empty %} + <br> + <span class="search-result-summary">-- {{ post.summary }}</span> + {% endif %} + </li> + {% endfor %} + </ul> + </details> + {% endfor %} + </section> +</main> +{% endblock %} |
