-
Notifications
You must be signed in to change notification settings - Fork 189
/
Copy patharticle.html
155 lines (145 loc) · 6.53 KB
/
article.html
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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
{% extends 'base.html' %}
{% block title %}
{{ article.title|striptags|e }} {% if article.subtitle %} - {{ article.subtitle|striptags|e }} {% endif %} · {{ super() }}
{% endblock title %}
{% block head_description %}
{% if article.summary %}
{{ article.summary|striptags|e }}
{% endif %}
{% endblock head_description %}
{% block meta_tags_in_head %}
{% if article.redirect %}
<meta http-equiv="refresh" content="0;URL={{ article.redirect }}" />
{% endif %}
{{ super() }}
{% if article.tags or article.category or article.keywords %}
<meta name="keywords" content="{{ [article.tags|join(', '), article.category, article.keywords]|join(', ') }}" />
{% endif %}
{% from '_includes/smo_metadata.html' import smo_metadata with context %}
{{ smo_metadata(article) }}
{% endblock meta_tags_in_head %}
{% block head_links %}
{{ super() }}
{% include '_includes/photos_header.html' %}
{% endblock head_links %}
{% block content %}
<article itemscope>
<div class="row-fluid">
<header class="page-header span10 offset2">
<h1>
<a href="{{ SITEURL }}/{{ article.url }}">
{{ article.title }}
{% if article.subtitle %}
<small class="subtitle">
{{ article.subtitle }}
</small>
{% endif %}
</a>
</h1>
</header>
</div>
<div class="row-fluid">
{% if article.toc %}
<div class="span2 table-of-content">
<nav>
<h4>Contents</h4>
{{ article.toc }}
</nav>
</div>
<div class="span8 article-content">
{% else %}
<div class="span8 offset2 article-content">
{% endif %}
{% import '_includes/translations.html' as translations with context %}
{{ translations.translations_for(article) }}
{{ article.content }}
{% if article.photo_gallery %}
<div class="gallery">
{% for title, gallery in article.photo_gallery %}
<h1>{{ title }}</h1>
{% for name, photo, thumb, exif, caption in gallery %}
<a href="{{ SITEURL }}/{{ photo }}" title="{{ name }}" exif="{{ exif }}" caption="{{ caption }}"><img
src="{{ SITEURL }}/{{ thumb }}"></a>
{% endfor %}
{% endfor %}
</div>
{% endif %}
{% from '_includes/applause_button.html' import applause_button with context %}
{{ applause_button(article) }}
{% from '_includes/share_links.html' import share_links with context %}
{{ share_links(article) }}
{% from '_includes/article_author.html' import article_author with context %}
{{ article_author(article) }}
{% from '_includes/comments.html' import comments_section with context %}
{{ comments_section(article) }}
<hr/>
{% include '_includes/related_posts.html' with context %}
{% if article.prev_article or article.next_article %}
<aside>
<nav>
<ul class="articles-timeline">
{% if article.prev_article %}
{% set ptitle = article.prev_article.title|striptags|e %}
{% set pv_title = article.prev_article.title|striptags %}
{% if article.prev_article.subtitle %}
{% set pv_title = pv_title + ' ' + '<small class="subtitle">' + article.prev_article.subtitle|striptags + '</small>' %}
{% set ptitle = ptitle + ' - ' + article.prev_article.subtitle|e %}
{% endif %}
<li class="previous-article">« <a href="{{ SITEURL }}/{{ article.prev_article.url }}" title="Previous: {{ ptitle }}">{{ pv_title }}</a></li>
{% endif %}
{% if article.next_article %}
{% set ntitle = article.next_article.title|striptags|e %}
{% set nv_title = article.next_article.title|striptags %}
{% if article.next_article.subtitle %}
{% set nv_title = nv_title + ' ' + '<small class="subtitle">' + article.next_article.subtitle|striptags + '</small>' %}
{% set ntitle = ntitle + ' - ' + article.next_article.subtitle|e %}
{% endif %}
<li class="next-article"><a href="{{ SITEURL }}/{{ article.next_article.url }}" title="Next: {{ ntitle }}">{{ nv_title }}</a> »</li>
{% endif %}
</ul>
</nav>
</aside>
{% endif %}
</div>
<section id="article-sidebar" class="span2">
{% include '_includes/post_stats.html' %}
{% if article.date %}
<h4>Published</h4>
{% set day = article.date.strftime('%d')|int %}
<time itemprop="dateCreated" datetime="{{ article.date.isoformat() }}">{{ article.locale_date }}</time>
{% endif %}
{% include '_includes/last_updated.html' %}
{% include '_includes/series.html' %}
{% if article.category|trim|count > 0 %}
<h4>Category</h4>
{% from '_includes/_defaults.html' import CATEGORIES_URL with context %}
<a class="category-link" href="{{ SITEURL }}/{{ CATEGORIES_URL }}#{{ category.slug }}-ref">{{ article.category }}</a>
{% endif %}
{% if article.tags and article.tags[0]|trim|count > 0 %}
{% from '_includes/_defaults.html' import TAGS_URL with context %}
<h4>Tags</h4>
<ul class="list-of-tags tags-in-article">
{% for tag in article.tags|sort %}
<li><a href="{{ SITEURL }}/{{ TAGS_URL }}#{{ tag.slug }}-ref">{{ tag }}
{% for aTag, tagged_articles in tags if aTag == tag %}
<span class="superscript">{{ tagged_articles|count }}</span>
{% endfor %}</a></li>
{% endfor %}
</ul>
{% endif %}
{% include '_includes/social_links.html' %}
{% from '_includes/mailchimp.html' import mailchimp with context %}
{{ mailchimp(article) }}
{% from '_includes/freelists.html' import freelists with context %}
{{ freelists(article) }}
</section>
</div>
</article>
{% include '_includes/photoswipe.html' %}
{% endblock content %}
{% block script %}
{{ super() }}
{% from '_includes/comments.html' import comments_script with context %}
{{ comments_script() }}
{% include '_includes/photos_footer.html' %}
{% endblock script %}