-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathlist.j2
96 lines (90 loc) · 3.07 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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
{% include "./_partials/common.j2" %}
{% from "macros.j2" import render_item %}
{% block style%}
<link rel="stylesheet" href="{{ static_url }}nezu.css">
{% if nezu and nezu.css_files %}
{% for src in nezu.css_files %}
<link rel="stylesheet" href="{{ src }}">
{% endfor %}
{% else %}
<link rel="preconnect" href="https://use.typkit.net" crossorigin>
<link rel="stylesheet" href="https://use.typekit.net/zbe5yhf.css">
{% endif %}
{% endblock %}
{% macro render_author_head(user) %}
<div class="p-author h-card" itemscope itemtype="http://schema.org/Person">
{% if user.avatar %}
<div class="author_image">
<img class="u-photo" itemprop="image" src="{{ user.avatar|thumbnail('ss') }}" alt="{{ user.name }}">
</div>
{% endif %}
<div class="author_main">
<div class="author_meta">
<strong class="p-name" itemprop="name">{{ user.name }}</strong>
{% if user.metadata.twitter %}
<a href="https://twitter.com/{{ user.metadata.twitter }}">
<i class="icon icon-twitter" aria-label="Twitter"></i>
</a>
{% endif %}
</div>
{% if user.bio_html %}
<div class="author_bio" itemprop="description">{{ user.bio_html|safe }}</div>
{% endif %}
</div>
</div>
{% endmacro %}
{% macro render_tag_head(tag) %}
<h1 class="info_title">{{ tag.title }}</h1>
{% if tag.summary %}<h2 class="info_subtitle">{{ tag.summary }}</h2>{% endif %}
{% endmacro %}
{% block body %}
{% include "./_partials/head.j2" %}
<div class="body">
{% if page.type == 'tag' %}
<div class="info">
<div class="inner">
{{ render_tag_head(page.topic) }}
</div>
</div>
{% elif page.type == 'author' %}
<div class="info">
<div class="entry-authors inner">
{{ render_author_head(page.topic) }}
</div>
</div>
{% elif page.type == 'audio_list' and site.podcast %}
{% include "./_partials/podcast_info.j2" %}
{% else %}
<div class="info">
<div class="inner">
<h1 class="info_title">{{ page.title }}</h1>
{% if page.years %}
<div class="info_years">
{% 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>
{% endif %}
<div class="main">
<div class="inner">
{% for subject in page.items %}
{{ render_item(site, subject) }}
{% endfor %}
{% if page.prev_url or page.next_url %}
<div class="navigation">
{% if page.prev_url %}
<a class="prev" href="{{ linkify(page.prev_url) }}">← {{ page.prev_year }}</a>
{% endif %}
{% if page.next_url %}
<a class="next" href="{{ linkify(page.next_url) }}">{{ page.next_year }} →</a>
{% endif %}
</div>
{% endif %}
</div>
</div>
</div>
{% endblock %}