-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathitem.j2
85 lines (81 loc) · 3.73 KB
/
item.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
{% include "./_partials/common.j2" %}
{% from "macros.j2" import render_subject_content, render_subject_license, render_subject_authors %}
{% block style%}
<link rel="stylesheet" href="https://s3.typlog.com/npm/@typlog/[email protected]/yue.css">
<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 %}
{% block body %}
{% include "./_partials/head.j2" %}
<div class="body">
{% if page.cover and page.cover.src %}
<div class="entry-cover js-cover" data-src="{{ page.cover.src|thumbnail }}"
data-width="{{ page.cover.width }}" data-height="{{ page.cover.height }}"
{% if page.cover.width and page.cover.height %}style="height:{{ page.cover.height / page.cover.width * 100}}vw"{% endif%}>
<img class="u-photo" src="{{ page.cover.src|thumbnail }}" alt="{{ page.title }} cover" width="{{ page.cover.width }}" height="{{ page.cover.height }}">
</div>
{% endif %}
<div class="main inner">
<article role="main" class="h-entry" itemscope itemtype="http://schema.org/Article">
{% if page.type == 'audio' %}
{{ render_subject_authors(site, page) }}
{% endif %}
<div class="entry-meta">
{% if page.type == 'audio' %}
{% if page.season and page.episode %}
<span class="item-label">S{{ page.season }}E{{ page.episode }}</span>
{% endif %}
<span class="item-label">{{ page.duration }}</span>
{% endif %}
{% if page.published_at %}
<time class="dt-published" datetime="{{ page.published_at|xmldatetime }}"
itemprop="datePublished">{{ page.published_at.strftime('%b %d, %Y') }}</time>
{% endif %}
</div>
<h1 class="p-name" itemprop="headline">{{ page.title }}</h1>
{% if page.subtitle %}
<h2 class="p-summary">{{ page.subtitle }}</h2>
{% endif %}
<div class="e-content js-content yue" itemprop="articleBody">
{{ render_subject_content(site, page) }}
</div>
{% if page.tags %}
<div class="entry-tags">
{% for tag in page.tags %}
<a class="p-category" href="{{ linkify(tag.url) }}">{{ tag.title }}</a>
{% endfor %}
</div>
{% endif %}
{% if page.type == 'post' %}
{{ render_subject_authors(site, page) }}
{{ render_subject_license(site, page) }}
{% endif %}
</article>
{% if page.type != 'page' %}
<div class="entry-block">
<div class="entry-enjoy">
<button class="enjoy js-enjoy">Enjoy</button>
</div>
<div class="entry-share">
<a class="js-share" data-type="tw" href="#" aria-label="Share to Twitter"><i class="icon icon-twitter"></i></a>
{% if page.lang in ('zh', 'zh-hans') %}
<a class="js-share" data-type="wb" href="#" aria-label="分享到微博"><i class="icon icon-weibo"></i></a>
<a class="js-share" data-type="wx" href="#" aria-label="分享到微信"><i class="icon icon-wechat"></i></a>
{% else %}
<a class="js-share" data-type="fb" href="#" aria-label="Share to Facebook"><i class="icon icon-facebook"></i></a>
{% endif %}
<a class="js-share" data-type="tg" href="#" aria-label="Share to Telegram"><i class="icon icon-telegram"></i></a>
</div>
</div>
{% endif %}
</div>
{% include "_snippets/subject_foot.j2" %}
</div>
{% endblock %}