-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrecord.twig
104 lines (91 loc) · 2.77 KB
/
record.twig
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
{% extends 'partials/_master.twig' %}
{% block content %}
{# the first thing is to check if this record shall be password protected #}
{% if record.use_password_protection %}
{% if not app.extensions.get('Bobdenotter/PasswordProtect') is null %}
{{ include(template_from_string("{{ passwordprotect() }}")) }}
{% else %}
<p class="warning">
Warning: This theme suggests you install the 'Bobdenotter/PasswordProtect' extension.
Otherwise the password protection will not work!
</p>
{% endif %}
{% endif %}
<div id="header">
<h1>
{{ record.title }}
</h1>
{% if record.subtitle %}
<div class="text-center">
{{ record.subtitle |markdown }}
</div>
{% endif %}
{% block recordinfos %}
{% include('partials/_recordinfos.twig') %}
{% endblock recordinfos %}
</div>
{% block recordcontent %}
{% if record.show_image_above_body and record.image %}
<p>
<img src="{{ record.image|thumbnail('leadimage_840w') }}"
class="img-responsive"
srcset="{{ record.image|thumbnail('leadimage_350w') }} 350w,
{{ record.image|thumbnail('leadimage_500w') }} 500w,
{{ record.image|thumbnail('leadimage_840w') }} 840w">
</p>
{% endif %}
{% if record.body %}
{% set maincontent = record.body %}
{% elseif record.content %}
{% set maincontent = record.content %}
{% endif %}
{% if "/preview/" in app.request.uri %}
{{ maincontent |raw |markdown }}
{% else %}
{{ maincontent }}
{% endif %}
{% if record.gpx %}
{% include('partials/_gpx.twig') %}
{% endif %}
{% if record.gallery %}
{% include('partials/_gallery.twig') %}
{% endif %}
{% if record.copyright and record.copyright != "" %}
<dl class="copyright">
<dt>
<i class="fa fa-copyright"></i>
</dt>
<dd>
{{ record.copyright|markdown }}
</dd>
</dl>
{% endif %}
{% block othercontent %}
{% endblock %}
{% endblock recordcontent %}
{% set relatedrecords = record.related() %}
{% if relatedrecords is not empty %}
<div class="related">
<h4>
{{ __('general.phrase.related-content') }}
</h4>
<ul class="related-posts">
{% for related in relatedrecords %}
<li>
<h5>
<a href="{{ related.link }}">
{{ related.title }}
</a>
</h5>
<small>
{{ related.datepublish|localedatetime("%d.%m.%Y") }}
{% if related.use_password_protection %}
<i class="fa fa-lock"></i>
{% endif %}
</small>
</li>
{% endfor %}
</ul>
</div>
{% endif %}
{% endblock content %}