-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlist.j2
54 lines (48 loc) · 1.62 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
{% block style %}
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Source+Sans+Pro:ital,wght@0,300;0,400;0,600;0,700;1,400&display=swap" rel="stylesheet">
<link rel="stylesheet" href="{{ static_url }}akasaka.css">
<link rel="stylesheet" href="{{ static_url }}assets/list.css">
{% endblock %}
{% if page.type == 'tag' %}
{% block lang %}{{ page.topic.lang }}{% endblock %}
{% endif %}
{% macro render_item(post) %}
<div class="item">
<h2><a href="{{ linkify(post.url) }}">{{ post.title }}</a></h2>
{% if post.subtitle %}
<h3><a href="{{ linkify(post.url) }}">{{ post.subtitle }}</a></h3>
{% endif %}
</div>
{% endmacro %}
{% block body %}
{% if not features.head_html %}
{% include "./_partials/head.j2" %}
{% endif %}
<div class="list-head">
<div class="inner">
<h1>{{ page.title }}</h1>
{% if page.topic.summary %}<div class="summary">{{ page.topic.summary }}</div>{% endif %}
{% if page.type == 'tag' %}
<nav class="tags">
{% for tag in query.tags(lang=page.topic.lang) %}
<a href="{{ linkify(tag.url) }}">{{ tag.title }}</a>
{% endfor %}
</nav>
{% endif %}
</div>
</div>
<div class="items">
<div class="inner">
{% set items = page.items %}
{% if page.type == 'tag' %}
{% set items = items|reverse %}
{% endif %}
{% for post in items %}
{{ render_item(post) }}
{% endfor %}
</div>
</div>
{% include "_snippets/brand_foot.j2" %}
{% endblock %}