summaryrefslogtreecommitdiff
path: root/templates/notes/section.html
blob: 4fc2675f505d0894081d671b08ad31af0a2670c3 (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 "base.html" %}

{% block title %}{{ section.title }} | {{ config.title }}{% endblock title %}
{% block description %}{{ section.description }}{% endblock description %}

{% block content %}
<div class="site-container listing-page">
  <header class="page-header">
    <h1>{{ section.title }}</h1>
    <p>{{ section.description }}</p>
  </header>

  {% if section.pages %}
  <div class="archive">
    {% for year, pages in section.pages | group_by(attribute="year") %}
    <section class="archive-year" aria-labelledby="year-{{ year }}">
      <h2 id="year-{{ year }}">{{ year }}</h2>
      <div class="note-list">
        {% for note in pages %}
        {% set item = note %}
        {% include "partials/note-list-item.html" %}
        {% endfor %}
      </div>
    </section>
    {% endfor %}
  </div>
  {% else %}
  <p class="empty-state">Notesはまだありません。</p>
  {% endif %}
</div>
{% endblock content %}