summaryrefslogtreecommitdiff
path: root/clams-server/src/main/resources/templates/blog.html
blob: 896cf56b36f92f1be8bf8fda6e325508d00d80e2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
{% extends "templates/layout.html" %}

{% block content %}
<main class="main-container">
    <a href="/" class="back-link-top">&larr; back</a>
    <header>
        <h1>Elias Haugsbakk's Blog</h1>
        <p class="intro-text">A collection of my writings and thoughts.</p>

        <form action="/blog" method="GET" class="search-form">
            <input type="text" name="search" value="{{ search_value }}" placeholder="Search posts..."
                   aria-label="Search blog posts">
            <button type="submit">Search</button>
        </form>
    </header>

    <section id="all" class="blog-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><a href="/blog/{{ post.slug }}">{{ post.title }}</a></li>
                {% endfor %}
            </ul>
        </details>
        {% endfor %}
    </section>
</main>
{% endblock %}