forked from TryGhost/Casper
-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
home.hbs
45 lines (43 loc) · 2.48 KB
/
home.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
{{!< default}}
<main class="site-main outer">
<div class="inner">
<h1 class="text-4xl font-heading leading-5 mb-4 tracking-tight text-center sm:text-5xl lg:text-6xl text-anthracite">{{@custom.hero_title}}</h1>
<div class="py-2 my-4 text-lg text-center">{{{@custom.hero_description}}}</div>
<!-- Carousel Section -->
<section class="carousel py-12">
<h2 class="text-2xl font-heading text-anthracite mb-6">Latest Posts</h2>
<div class="carousel-wrapper flex overflow-x-auto space-x-4">
{{#foreach posts}}
<div class="post-card bg-white border-r-2 border-gray-100 hover:border-gray-300 p-4 w-80 flex-shrink-0">
<a href="{{url}}" class="block">
<div class="post-card-tags mb-1 flex items-center">
{{#primary_tag}}
<span class="hashtag text-xs mr-1">#</span>
<span class="post-card-primary-tag text-xs">{{name}}</span>
{{/primary_tag}}
</div>
{{#if feature_image}}
<div class="post-card-image mb-4">
<img src="{{img_url feature_image size="small"}}" alt="{{title}}"
class="w-full h-40 object-cover rounded-lg">
</div>
{{else}}
<div class="post-card-image mb-4">
<img src="https://placeimg.com/640/480/any" alt="Placeholder Image"
class="w-full h-40 object-cover rounded-lg">
</div>
{{/if}}
<div class="flex items-center justify-center">
{{#if featured}}
<span class="post-card-featured text-xs text-orangeValencia mr-2 flame-icon">{{> "icons/fire"}}</span>
{{/if}}
<h3 class="text-xl font-bold">{{title}}</h3>
</div>
<p class="post-card-excerpt text-sm text-anthracite font-mono">{{excerpt words="20"}}</p>
</a>
</div>
{{/foreach}}
</div>
</section>
</div>
</main>