This repository has been archived by the owner on Jan 7, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 7
/
listing.twig
82 lines (60 loc) · 2.42 KB
/
listing.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
{% include '_head.twig' %}
{% include '_menu.twig' %}
<!-- Main Content -->
<div class="container">
<div class="row">
<div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
{# if used for listing a taxonomy: #}
{% if taxonomytype is defined %}
<h2>
{{ __('Posts for') }}
{% if taxonomy.options[slug] is defined %}
{{ taxonomy.options[slug] }}
{% else %}
{{ slug }}
{% endif %}
</h2>
{% endif %}
{# This is also the default template for searchresults. If 'search' is defined,
we display an appropriate title. The 'records' array contains all of the
records matching the current query. If there are no results, the
code in the 'else' part of the for-loop is used. #}
{% if search is defined %}
<h1 style="color: #ECECEC">
{{ __('Results for <b style="color: #2283FF;"> %search% </b>.', { '%search%': search }) }}
</h1>
{% endif %}
<hr>
{% for record in records %}
<div class="post-preview">
<a href="{{ record.link }}">
<h2 class="post-title">
{{ record.title }}
</h2>
<h3 class="post-subtitle">
{{ record.teaser|excerpt(100) }}
</h3>
</a>
<p class="post-meta">{% include '_recordfooter.twig' with {record: record} %}</p>
</div>
<hr>
{% else %}
<article>
<h2>No content found.</h2>
<p>
Unfortunately, no content could be found. Try another page, or go to the
<a href="{{ paths.root }}">homepage</a>.
</p>
{#
optionally, you can redirect the browser to another page. Just uncomment the next line to do so.
{{ redirect('/') }}
#}
</article>
{% endfor %}
<!-- Pager -->
{{ pager() }}
</div>
</div>
</div>
<hr>
{% include '_footer.twig' %}