-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathposts.twig
More file actions
77 lines (56 loc) · 1.98 KB
/
Copy pathposts.twig
File metadata and controls
77 lines (56 loc) · 1.98 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
<div class="w-100 bg-custom-blue pa2 pa5-m pa5-l">
<div class="mw8 center">
{% if widgets %}
{% for index,widget in widgets %}
<div id="{{ index }}">
{{ widget }}
</div>
{% endfor %}
{% else %}
<input type="text" class="center w-100 bw0 pa3 mb2" id="searchinput" placeholder="{{ settings.themes.knowledge.searchplaceholder }}">
{% endif %}
</div>
<div class="flex-l mw8 center mt2-m mt2-l">
<article class="w-70-l bg-white pv5 ph4 ph5-l lh-copy mv1">
{% include 'partials/breadcrumb.twig' %}
<h1>{{ title }}</h1>
{{ content }}
<section>
{% set pagesize = 10 %}
{% set pages = ( item.folderContent|length / pagesize)|round(0, 'ceil') %}
{% set currentpage = currentpage ? currentpage : 1 %}
{% set currentposts = (currentpage - 1) * pagesize %}
<ul class="list pl0 pv3">
{% for element in item.folderContent|slice(currentposts, pagesize) %}
{% set post = getPageMeta(settings, element) %}
{% set date = element.order[0:4] ~ '-' ~ element.order[4:2] ~ '-' ~ element.order[6:2] %}
<li class="dib w-100 bt b--light-gray pv3">
<a class="link dark-gray hover-dark-gray" href="{{ element.urlAbs }}">
<h2 class="mb2">{{ post.meta.title }}</h2>
</a>
<small class="gray">{{ post.meta.author }} | {{ date | date("d.m.Y") }}</small>
<p class="mv3">{{ post.meta.description }}</p>
</li>
{% endfor %}
</ul>
{% if pages > 1 %}
<hr class="mv4">
<p>Page:
{% for i in 1 .. pages %}
{% if i == currentpage %}
{{i}}
{% else %}
<a class="page" href="{{ item.urlAbs }}/p/{{i}}">{{i}}</a>
{% endif %}
{% endfor %}
</p>
{% endif %}
</section>
</article>
<aside class="w-100 w-30-l">
<nav id="navigation" class="center">
{% include 'partials/navigation.twig' with { 'navclass' : 'w-100', 'navclassinner' : 'pa3 pa4-m pa4-l bg-white mv1 ml1-l'} %}
</nav>
</aside>
</div>
</div>