-
Notifications
You must be signed in to change notification settings - Fork 0
/
lang.j2
70 lines (64 loc) · 2.35 KB
/
lang.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
{% set locale = page.topic.locale %}
{% block lang %}{{ locale }}{% endblock %}
{% block title %}{{ site.name }}{% endblock %}
{% 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">
{% endblock %}
{% block body %}
{% if not features.head_html %}
{% include "./_partials/head.j2" %}
{% endif %}
<div class="search">
{% if site.cover %}
<div class="js-cover" data-src="{{ site.cover.src|thumbnail('l') }}">
<div class="cover-mask"></div>
</div>
{% endif %}
<div class="inner">
<input class="js-search" type="text" placeholder="Search..."
{% if features.algolia %}data-id="{{ site.algolia_id }}" data-key="{{ site.algolia_key }}"{% endif %}>
</div>
</div>
{% set tags = query.tags(lang=locale) %}
{% if tags %}
<div class="cover-tags">
<div class="inner">
{% if locale in ('zh', 'zh-hans') %}
<div class="section-title">分类浏览</div>
{% else %}
<div class="section-title">Browser by collections</div>
{% endif %}
<div class="scrollable">
{% for tag in tags %}
<div class="cover-tag">
<a href="{{ linkify(tag.url) }}"{% if tag.cover %} class="js-cover" data-src="{{ tag.cover.src|thumbnail }}"{% endif %}>
<span>{{ tag.title }}</span>
</a>
</div>
{% endfor %}
</div>
</div>
</div>
{% endif %}
<div class="posts">
<div class="inner">
{% if locale in ('zh', 'zh-hans') %}
<div class="section-title">最近更新</div>
{% else %}
<div class="section-title">Recent updates</div>
{% endif %}
<div class="updates">
{% for post in page.items %}
<div class="post" lang="{{ post.lang }}">
<h3><a href="{{ linkify(post.url) }}">{{ post.title }}</a></h3>
<time datetime="{{ post.published_at|xmldatetime }}">{{ post.published_at.strftime('%b %d, %Y') }}</time>
</div>
{% endfor %}
</div>
</div>
</div>
{% include "_snippets/brand_foot.j2" %}
{% endblock %}