-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathlist.j2
53 lines (51 loc) · 1.85 KB
/
list.j2
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
{% from "macros.j2" import render_item %}
{% block style %}
<link rel="stylesheet" href="{{ static_url }}ueno.css">
{% endblock %}
{% block body %}
<div class="body">
{% include "./_side.j2" %}
<div class="main">
<div class="inner main_mark">
{% if page.type == 'tag' %}
{% set tag = page.topic %}
<section class="main_head">
<h1>{{ tag.title }}</h1>
{% if tag.summary %}<h2>{{ tag.summary }}</h2>{% endif %}
</section>
{% elif page.type == 'lang' %}
<section class="main_head">
<h1>{{ page.topic.name }}</h1>
</section>
{% elif page.type == 'author' %}
{% set author = page.topic %}
<section class="main_head author">
{% if author.avatar %}
<a class="author_image" href="{{ linkify(author.url) }}">
<img src="{{ author.avatar|thumbnail('ss') }}" alt="avatar of {{ author.name }}" width="80" height="80">
</a>
{% endif %}
<div class="author_info">
<h1><a class="h-card" rel="me" href="{{ linkify(author.url) }}">{{ author.name }}</a></h1>
{% if author.bio_html %}
<div>{{ author.bio_html|safe }}</div>
{% endif %}
</div>
</section>
{% endif %}
{% for subject in page.items %}
{{ render_item(site, subject) }}
{% endfor %}
{% if page.years %}
<div class="navigation">
{% for year in page.years|reverse %}
{%- set url = page.base_url + year|string + '/' -%}
<a{% if page.year == year %} class="active"{% endif %} href="{{ linkify(url) }}">{{ year }}</a>
{% endfor %}
</div>
{% endif %}
</div>
</div>
</div>
{% include "./_foot.j2" %}
{% endblock %}