aboutsummaryrefslogtreecommitdiff
path: root/templates/page.html
blob: 12240b717fbda8b2377e29cd70ad400bb6a61720 (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
{% extends "base.html" %}
{% block extrahead %}
<meta property="og:title" content="{{ page.title }}" />
<meta property="og:url" content="{{ page.permalink }}" />
<meta property="og:type" content="article" />
{% if page.summary %}
<meta property="og:description" content="{{ page.summary }}" />
{% endif %}
{% if page.permalink is containing("food") %}
<meta property="og:image" content="recipe.jpg" />
{% endif %}
{% endblock %}
{% block title %}
{% if page.permalink is containing("weblog") %}
{{ page.title }} - Yaroslav's weblog
{% elif page.permalink is containing("food") %}
{{ page.title }} - Yaroslav's recipe book
{% else %}
{{ page.title }} - Yaroslav's website
{% endif %}
{% endblock %}
{% block header %}
<h1>{{ page.title }}</h1>
<p class="publish-date">
{% if page.date %}
	{{ trans(key="published", lang=lang) }}
	{{ page.date | date(format="%Y-%m-%d %H:%M UTC") }}
	{{ trans(key="published_on", lang=lang) }}
{% else %}
	{{ trans(key="not_published", lang=lang) }}
{% endif %}
	{% if page.permalink is containing("weblog") %}
	<a href="{% if lang != "en" %}/{{ lang }}{% endif %}/weblog">
		{{ trans(key="weblog_title", lang=lang) }}
	</a>
	{% elif page.permalink is containing("food") %}
	<a href="{% if lang != "en" %}/{{ lang }}{% endif %}/food">
		{{ trans(key="recipes_title", lang=lang) }}
	</a></p>
	{% endif %}
</p>
{% if page.updated %}
<p class="publish-date">
	{{ trans(key="edited", lang=lang) }}
	{{ page.updated | date(format="%Y-%m-%d %H:%M UTC") }}
</p>
{% endif %}
{% if page.translations | length > 1 %}
<p class="publish-date">
{{ trans(key="also_read", lang=lang) }}
{% for trans in page.translations %}
{% if trans.lang != lang %}
{% if trans.lang == "ru" %}
  <a href="{{ trans.permalink }}">Русский</a>
{% elif trans.lang == "es" %}
  <a href="{{ trans.permalink }}">Español</a>
{% else %}
  <a href="{{ trans.permalink }}">English</a>
{% endif %}
{% endif %}
{% endfor %}
</p>
{% endif %}
{% endblock %}
{% block content %}
  <div class="post-container full">
    {{ page.content | safe }}
  </div>
{% endblock %}