-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathlisting.twig
More file actions
134 lines (89 loc) · 4.5 KB
/
Copy pathlisting.twig
File metadata and controls
134 lines (89 loc) · 4.5 KB
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
{% include '_header.twig' %}
<body class="home blog">
<div id="parallax-bg"></div>
<div id="page" class="hfeed site">
{% include '_topbar.twig' %}
<div id="content" class="site-content row">
<div class="container col-md-12">
<div id="primary" class="content-area col-md-8">
<main id="main" class="site-main" role="main">
{# This template is used for 'listings': Generic pages that list a number of
records from a certain contenttype. These records are available as an array
called 'records'. In the for-loop below, we iterate over the records that
are on this page. It can be used for overview pages like 'all entries', or
'all records tagged with kittens' as well as search result. #}
{# if used for listing a taxonomy: #}
{% if taxonomytype is defined %}
<h1>
{{ __('Overview for') }}
{% if taxonomy.options[slug] is defined %}
{{ taxonomy.options[slug] }}
{% else %}
{{ slug }}
{% endif %}
</h1>
{# taxonomies are fetched unordered by design. If we specified an order in config.yml, sort them here: #}
{% set records = records|order(app.config.get('general/listing_sort')) %}
{% 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>
{{ __('Search results for <b> %search% </b>.', { '%search%': search|escape }) }}
</h1>
{% endif %}
{% for record in records %}
<article class="archive">
<div class="featured-thumb col-md-12 col-xs-12">
{% if record.image!="" %}
<a href="{{ image(record.image) }}">
<img src="{{ record.image|image() }}">
</a>
{% endif %}
</div>
<div class="article-rest col-md-12">
<header class="entry-header">
<h1 class="entry-title"><a href="{{ record.link }}" rel="bookmark">{{ record.title }}</a></h1>
<div class="entry-meta">
<span class="posted-on"><i class="icon-time"> </i> <a href="{{ record.link }}" rel="bookmark"><time class="entry-date published" datetime="{{ record.values.datepublish }}" title="{{ record.values.datepublish }}">{{ record.values.datepublish|localdate("%A %B %e") }}</time></span> <span class="byline"> <i class="icon-user"> </i> <span class="author vcard"><a class="url fn n" href="">{{record.user.displayname }}</a></span></span> </div><!-- .entry-meta -->
</header><!-- .entry-header -->
<div class="entry-content">
{# display something introduction-like.. #}
{% if record.introduction %}
{{ record.introduction }}
{% elseif record.teaser %}
{{ record.teaser }}
{% else %}
<p>{{ record.excerpt(300) }}</p>
{% endif %}
{# % include '_recordfooter.twig' with {record: record} % #}
</article>
<hr>
{% else %}
<article>
{% if search is defined %}
<p>
{{ __("No results found for '%search%'. Please try another search.", { '%search%': search|escape }) }}
</p>
{% else %}
<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>
{% endif %}
{#
optionally, you can redirect the browser to another page. Just uncomment the next line to do so.
{{ redirect('/') }}
#}
</article>
{% endfor %}
{# If there are more records than will fit on one page, the pager is shown. #}
{{ pager() }}
</div><!-- .entry-content -->
{% include '_aside.twig' %}
</div>
</div><!-- #content -->
{% include '_footer.twig' %}