blob: 96a2a4afdea0cb1c812238665c2dc79409f3e822 (
plain) (
blame)
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
|
{% extends "base.html" %}
{% block title %}{{ category|striptags }}{% endblock %}
{% block content %}
<div class="category-page-container">
<div class="category-logo">
{% if category|string in BLOG_CATEGORIES and BLOG_CATEGORIES.get(category|string).logo %}
<a href="{{ SITEURL }}/{{ category.url }}" rel="bookmark" title="Permalink to {{ category|striptags }}"><img src="{{ BLOG_CATEGORIES.get(category|string).logo }}" alt="{{ category|striptags }}"/></a>
{% else %}
<h1><a href="{{ SITEURL }}/{{ category.url }}" rel="bookmark" title="Permalink to {{ category|striptags }}">{{ category }}</a></h1>
{% endif %}
</div>
<div class="section-header">
Latest
</div>
{% set i = 0 %}
{% for article in articles_page.object_list %}
{% if i == 0 %}
<div class="pure-g article-row">
{% if article.cover or article.thumbnail %}
<div class="pure-u-1 pure-u-md-2-3">
<div class="col">
{% if article.cover %}
<a href="{{ SITEURL }}/{{ article.url }}" class="article-thumbnail article-thumbnail-1" style="background-image:url({{ article.cover }})"><span class="header">{{ article.title }}</span></a>
{% elif article.thumbnail %}
<a href="{{ SITEURL }}/{{ article.url }}" class="article-thumbnail article-thumbnail-1" style="background-image:url({{ article.thumbnail }})"><span class="header">{{ article.title }}</span></a>
{% endif %}
</div>
</div>
{% endif %}
<div class="pure-u-1{% if article.cover or article.thumbnail %} pure-u-md-1-3{% endif %} article-info">
<div class="col">
<h1><a href="{{ SITEURL }}/{{ article.url }}">{{ article.title }}</a></h1>
{{ article.summary }}
{% for author in article.authors %}
<div class="post-meta pure-g">
{% if author|string in BLOG_AUTHORS %}
<div class="pure-u">
<img src="{{ BLOG_AUTHORS.get(author|string).image }}" class="post-avatar" alt="Go to the profile of {{ author|striptags }}">
</div>
{% endif %}
<div class="pure-u-3-4 meta-data">
<a href="{{ SITEURL }}/{{ author.url }}" class="category">{{ author }}</a><br />
<abbr title="{{ article.date.isoformat() }}">{{ article.locale_date }}</abbr>
{% if article.readtime_minutes %}
— {{ article.readtime_minutes }} min read
{% endif %}
</div>
</div>
{% endfor %}
</div>
</div>
</div>
{% elif i < 3 %}
{% if i == 1 %}
<div class="pure-g article-row">
{% endif %}
<div class="pure-u-1 pure-u-sm-1-2 article-info">
<div class="col">
{% if article.cover %}
<a href="{{ SITEURL }}/{{ article.url }}" class="article-thumbnail article-thumbnail-2" style="background-image:url({{ article.cover }})"><span class="header">{{ article.title }}</span></a>
{% elif article.thumbnail %}
<a href="{{ SITEURL }}/{{ article.url }}" class="article-thumbnail article-thumbnail-2" style="background-image:url({{ article.thumbnail }})"><span class="header">{{ article.title }}</span></a>
{% endif %}
<h2><a href="{{ SITEURL }}/{{ article.url }}">{{ article.title }}</a></h2>
{{ article.summary }}
{% for author in article.authors %}
<div class="post-meta pure-g">
{% if author|string in BLOG_AUTHORS %}
<div class="pure-u">
<img src="{{ BLOG_AUTHORS.get(author|string).image }}" class="post-avatar" alt="Go to the profile of {{ author|striptags }}">
</div>
{% endif %}
<div class="pure-u-3-4 meta-data">
<a href="{{ SITEURL }}/{{ author.url }}" class="category">{{ author }}</a><br />
<abbr title="{{ article.date.isoformat() }}">{{ article.locale_date }}</abbr>
{% if article.readtime_minutes %}
— {{ article.readtime_minutes }} min read
{% endif %}
</div>
</div>
{% endfor %}
</div>
</div>
{% if i == 2 %}
</div>
{% endif %}
{% else %}
{% if i % 3 == 0 %}
<div class="pure-g article-row">
{% endif %}
<div class="pure-u-1 pure-u-lg-1-3 article-info">
<div class="col">
{% if article.cover %}
<a href="{{ SITEURL }}/{{ article.url }}" class="article-thumbnail article-thumbnail-3" style="background-image:url({{ article.cover }})"><span class="header">{{ article.title }}</span></a>
{% elif article.thumbnail %}
<a href="{{ SITEURL }}/{{ article.url }}" class="article-thumbnail article-thumbnail-3" style="background-image:url({{ article.thumbnail }})"><span class="header">{{ article.title }}</span></a>
{% endif %}
<h2><a href="{{ SITEURL }}/{{ article.url }}">{{ article.title }}</a></h2>
{{ article.summary }}
{% for author in article.authors %}
<div class="post-meta pure-g">
{% if author|string in BLOG_AUTHORS %}
<div class="pure-u">
<img src="{{ BLOG_AUTHORS.get(author|string).image }}" class="post-avatar" alt="Go to the profile of {{ author|striptags }}">
</div>
{% endif %}
<div class="pure-u-3-4 meta-data">
<a href="{{ SITEURL }}/{{ author.url }}" class="category">{{ author }}</a><br />
<abbr title="{{ article.date.isoformat() }}">{{ article.locale_date }}</abbr>
{% if article.readtime_minutes %}
— {{ article.readtime_minutes }} min read
{% endif %}
</div>
</div>
{% endfor %}
</div>
</div>
{% if i % 3 == 2 %}
</div>
{% endif %}
{% endif %}
{% set i = i + 1 %}
{% endfor %}
{% if articles_page.object_list|length % 3 != 0 %}
</div>
{% endif %}
{% include "pagination.html" %}
</div>
{% endblock %}
|