-
-
Notifications
You must be signed in to change notification settings - Fork 68
/
custom-featured-posts-archive.hbs
55 lines (49 loc) · 1.95 KB
/
custom-featured-posts-archive.hbs
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
{{!-- Custom Template: Featured Posts Archive | 2019.06.23--}}
{{!< default}}
{{!-- The tag above means: insert everything in this file
into the {body} of the default.hbs template --}}
{{!-- page meta --}}
{{#post}}
{{#if feature_image}}
<section class="hero tag-list-header is-bold bg-cover-center" style="background-image:url({{img_url feature_image size="wide"}});">
{{else}}
<section class="hero tag-list-header is-bold bg-cover-center" style="background-image: linear-gradient(to bottom right, #acffc5, #078ddb);">
{{/if}}
<div class="hero-body has-darker-modal is-montserrat">
<div class="container has-text-centered">
<h1 class="title is-vmargin-2 is-capitalized has-text-white is-marginless-bottom">
<span class="is-padding-05-15 round-border-6">
<i class="iconfont icon-star"></i> {{title}}
</span>
</h1>
<h2 class="subtitle is-vmargin-2 has-text-white is-centered is-margin-auto" style="max-width:760px;">
{{content}}
</h2>
</div>
</div>
</section>
{{/post}}
{{#get "posts" include="tags,authors" filter="featured:true" limit="all" order="published_at desc"}}
<main class="section">
<div class="columns">
<div class="column is-hidden-touch is-1-desktop is-1-widescreen is-2-fullhd"></div>
<div class="column is-12-tablet is-10-desktop is-10-widescreen is-8-fullhd">
{{#foreach posts}}
{{!-- exclude #noindex --}}
{{#has tag="#noindex"}}
{{!-- nothing --}}
{{else}}
{{> list_card}}
{{/has}}
{{!-- inject something for every 3 items --}}
{{#has number="nth:3"}}
{{!-- {{> "something"}} --}}
{{/has}}
{{else}}
{{t "There is no post yet."}}
{{/foreach}}
</div>
<div class="column is-hidden-touch"></div>
</div>
</main>
{{/get}}