forked from nestordedios/bolt-theme-editorial
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.twig
75 lines (59 loc) · 1.78 KB
/
index.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
{% extends 'partials/_master.twig' %}
{% block main %}
<!-- Banner -->
{% setcontent entries = 'entries/latest/7' %}
{% for entry in entries|slice(0, 1) %}
<section id="banner">
<div class="content">
<header>
<h1>{{ entry.title }}</h1>
<p>{{ entry.teaser }}</p>
</header>
<p>{{ entry.body|excerpt('250') }}</p>
<ul class="actions">
<li><a href="{{ entry.link }}" class="button big">Read More</a></li>
</ul>
</div>
<span class="image object">
<img src="{{ record.image|thumbnail(849, 591) }}" alt="" />
</span>
</section>
{% endfor %}
<!-- Section -->
{% setcontent featuresBlocks = 'blocks/random/4' %}
{% set featuresClassesMap = { 0: 'fa-diamond', 1: 'fa-paper-plane', 2: 'fa-rocket', 3: 'fa-signal'} %}
<section>
<header class="major">
<h2>Erat lacinia</h2>
</header>
<div class="features">
{% for featureBlock in featuresBlocks %}
<article>
<span class="icon {{ featuresClassesMap[loop.index0] }}"></span>
<div class="content">
<h3>{{ featureBlock.title }}</h3>
{{ featureBlock.content }}
</div>
</article>
{% endfor %}
</div>
</section>
<!-- Section -->
<section>
<header class="major">
<h2>Ipsum sed dolor</h2>
</header>
<div class="posts">
{% for entry in entries|slice(1, 7) %}
<article>
<a href="{{ entry.link }}" class="image"><img src="{{ entry.image|thumbnail(403, 248) }}" alt="" /></a>
<h3>{{ entry.title }}</h3>
{{ entry.teaser }}
<ul class="actions">
<li><a href="{{ entry.link }} " class="button">More</a></li>
</ul>
</article>
{% endfor %}
</div>
</section>
{% endblock main %}