-
Notifications
You must be signed in to change notification settings - Fork 2
/
index.hbs
55 lines (50 loc) · 2.55 KB
/
index.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
55
{{!< default}}
<div class="wrapper">
<header class="flex flex-wrap items-center mb-20">
<article class="w-full md:w-1/2 md:pr-5">
<h1 class="text-6xl font-bold mb-5">{{t "Hello there!"}}</h1>
<p>{{@site.description}}</p>
</article>
<img class="w-full pt-10 md:pt-0 md:w-1/2 md:pl-5"
srcset="{{img_url @site.cover_image size="s"}} 300w,
{{img_url @site.cover_image size="m"}} 600w,
{{img_url @site.cover_image size="l"}} 1000w,
{{img_url @site.cover_image size="xl"}} 2000w"
sizes="(max-width: 1000px) 400px, 800px"
src="{{img_url feature_image size="m"}}"
alt="{{@site.title}}"
loading="lazy"
/>
</header>
<section>
{{#get "tags" limit="all" include="count.posts" order="count.posts desc"}}
{{#if tags}}
<nav>
<h2 class="text-5xl font-bold mb-5">{{t "Topics"}}</h2>
<span class="hidden md:inline-block">
<a class="button bg-gray-100 mr-2 tag" disabled="true"><i class="fas fa-tags"></i></a>
</span>
{{#foreach tags}}
<a onclick="loadTab('{{slug}}')" id="{{slug}}-front-page-tab"
class="front-page-tab button text-lg font-bold mr-2 mb-5 text-gray-800 rounded bg-gray-100 tag {{#has number="1" }}active{{/has}}">{{name}}</a>
{{/foreach}}
</nav>
{{#foreach tags}}
<div class="front-page-post flex flex-wrap {{#has number="1"}}{{else}}hidden{{/has}}" id="{{slug}}-posts">
{{#get "posts" include="tags" limit=5 filter="tag:{{slug}}"}}
{{#foreach posts}}
{{> "post-card"}}
{{/foreach}}
{{/get}}
<div class="w-full md:w-1/2 lg:w-1/3 p-5 text-center">
<div class="h-0 md:h-40 lg:h-30 w-full"></div>
<p class="text-7xl text-primary"><i class="fas fa-binoculars"></i></p>
<p class="text-2xl font-bold mb-5">{{t "Looking for more?"}}</p>
<a class="button text-white bg-primary" href="{{url}}">{{t "Browse articles"}}</a>
</div>
</div>
{{/foreach}}
{{/if}}
{{/get}}
</section>
</div>