summaryrefslogtreecommitdiff
path: root/templates/index.html
blob: 61bab588e919889843b75d4cde739c01c6b4ab28 (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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
{% extends "base.html" %}

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

{% block content %}
{% set about_url = get_url(path='@/about.md') %}
{% set notes_url = get_url(path='@/notes/_index.md') %}
{% set software_url = get_url(path='@/software/_index.md') %}
{% set software = get_section(path='software/_index.md') %}
{% set notes = get_section(path='notes/_index.md') %}

<div class="site-container home-sections">
  <section class="home-section" aria-labelledby="latest-notes">
    <div class="section-heading">
      <h2 id="latest-notes">最近のNotes</h2>
      <a href="{{ notes_url }}">すべてのNotes</a>
    </div>
    {% if notes.pages %}
    <div class="note-list compact-list">
      {% for note in notes.pages %}
      {% if loop.index <= config.extra.home_notes_limit %}
      {% set item = note %}
      {% include "partials/note-list-item.html" %}
      {% endif %}
      {% endfor %}
    </div>
    {% else %}
    <p class="empty-state">ノートは準備中です。新しい記録はここに追加されます。</p>
    {% endif %}
  </section>

  <section class="home-section" aria-labelledby="home-software">
    <div class="section-heading">
      <h2 id="home-software">Software</h2>
      <a href="{{ software_url }}">すべてのSoftware</a>
    </div>
    {% if software.pages %}
    <div class="software-list compact-list">
      {% for software_item in software.pages %}
      {% if loop.index <= config.extra.home_software_limit %}
      {% set item = software_item %}
      {% include "partials/software-list-item.html" %}
      {% endif %}
      {% endfor %}
    </div>
    {% else %}
    <p class="empty-state">Softwareは準備中です。</p>
    {% endif %}
  </section>
</div>
{% endblock content %}