summaryrefslogtreecommitdiff
path: root/templates/index.html
blob: 3f0c8c6bce1d660f5c5d492ba08b734f0b87d25c (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
53
54
55
56
57
58
59
60
61
62
{% 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') %}
<section class="site-container home-intro" aria-labelledby="home-title">
  <h1 id="home-title">{{ section.title }}</h1>
  <p>{{ section.description }}</p>
</section>

<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>

  <section class="home-about" aria-labelledby="home-about-title">
    <h2 id="home-about-title">このサイトについて</h2>
    <p>考えたこと、読んだこと、調べたことと、作成したソフトウェアを長期的に残すための個人アーカイブです。</p>
    <a href="{{ about_url }}">Aboutを読む</a>
  </section>
</div>
{% endblock content %}