aboutsummaryrefslogtreecommitdiff
path: root/templates/weblog.html
blob: c99524216cec0e74e20f164d6bd644cdc14cb21e (plain)
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
{% extends "base.html" %}
{% block title %}
	{% if section.permalink is containing("weblog") %}
		{% if lang == "ru" %}
			Веб-журнал Ярослава де ла Пенья Смирнова
		{% elif lang == "es" %}
			Weblog de Yaroslav de la Peña Smirnov
		{% else %}
			Yaroslav de la Peña Smirnov's weblog
		{% endif %}
	{% elif section.permalink is containing("food") %}
		{% if lang == "ru" %}
			Сборник рецептов Ярослава де ла Пенья Смирнова
		{% elif lang == "es" %}
			Recetario de Yaroslav de la Peña Smirnov
		{% else %}
			Yaroslav de la Peña Smirnov's collection of recipes
		{% endif %}
	{% else %}
	Yaroslav de la Peña Smirnov's website
	{% endif %}
{% endblock %}
{% block header %}
	{% if section.permalink is containing("weblog") %}
	<h1>
		{%- if lang == "ru" -%}
			Веб-журнал Ярослава
		{%- elif lang == "es" -%}
			Weblog de Yaroslav
		{%- else -%}
			Yaroslav's weblog
		{%- endif -%}
	</h1>
	{% elif section.permalink is containing("food") %}
	<h1>
		{%- if lang == "ru" -%}
			Книга рецептов Ярослава
		{%- elif lang == "es" -%}
			Recetario de Yaroslav
		{%- else -%}
			Yaroslav's recipe book
		{%- endif -%}
	</h1>
	{% else %}
	<h1>Yaroslav's website</h1>
	{% endif %}
	<ul class="nav-container">
		<li>
			<a href="{% if lang != "en" %}/{{ lang }}{% endif %}/">
				{{ trans(key="back_home", lang=lang) }}
			</a>
		</li>
		{% if section.permalink is containing("weblog") %}
		<li>
			<a href="{% if lang != "en" %}/{{ lang }}{% endif %}/weblog/archive">{{ trans(key="archive", lang=lang) }}</a>
		</li>
		{% if lang != "en" %}
		<li>
			<a href="/weblog/">🇺🇸 English</a>
		</li>
		{% endif %}
		{% if lang != "ru" %}
		<li>
			<a href="/ru/weblog/">🇷🇺 Русский</a>
		</li>
		{% endif %}
		{% if lang != "es" %}
		<li>
			<a href="/es/weblog/">🇲🇽 Español</a>
		</li>
		{% endif %}
		{% elif section.permalink is containing("food") %}
		<li>

			<a href="{% if lang != "en" %}/{{ lang }}{% endif %}/food/archive">{{ trans(key="archive", lang=lang) }}</a>
		</li>
		{% if lang != "en" %}
		<li>
			<a href="/food/">🇺🇸 English</a>
		</li>
		{% endif %}
		{% if lang != "ru" %}
		<li>
			<a href="/ru/food/">🇷🇺 Русский</a>
		</li>
		{% endif %}
		{% if lang != "es" %}
		<li>
			<a href="/es/food/">🇲🇽 Español</a>
		</li>
		{% endif %}
		{% endif %}
	</ul>
{% endblock %}
{% block content %}
	<div class="posts-list">
		{% for post in paginator.pages %}
		{% if post.date %}
			<div class="post-container partial">
				<h2>
					<a href="{{ post.permalink }}">{{ post.title }}</a>
					{% if post.date %}
					<span class="publish-date">{{ post.date | date }}</span>
					{% endif %}
				</h2>
				{% if post.summary %}
					{{ post.summary | safe }}
				{% endif %}
			</div>
		{% endif %}
		{% endfor %}
	</div>
	{% if paginator %}
		{% if paginator.number_pagers > 1 %}
			<div class="paginator">
				{% if paginator.previous %}
					<a href="{{ paginator.first }}">
						<span class="icon">|←</span> First
					</a>
					<a href="{{ paginator.previous }}">
						<span class="icon"></span> Page 
						{{ paginator.current_index - 1 }}
					</a>
				{% endif %}
				{% if paginator.next %}
					<a href="{{ paginator.next }}">
						Page {{ paginator.current_index + 1 }} 
						<span class="icon"></span>
					</a>
					<a href="{{ paginator.last }}">
						Last <span class="icon">→|</span>
					</a>
				{% endif %}
			</div>
		{% endif %}
	{% endif %}
{% endblock %}