-
-
Notifications
You must be signed in to change notification settings - Fork 200
/
godo-template-medium-sidebar.hbs
96 lines (85 loc) · 4.57 KB
/
godo-template-medium-sidebar.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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
{{!< default}}
{{!-- custom Styles For tag <body> --}}
{{#contentFor "special_body_class"}}medium-sidebar has-cover is-head-transparent{{/contentFor}}
{{#post}}
<div class="simply-hero-cover u-primaryGradient relative overflow-hidden pt-16">
<div class="mx-auto container relative flex justify-between flex-col items-center py-12 md:py-vw4 z-3 md:flex-row md:px-5">
<div class="md:pr-5 flex-none text-white text-center md:text-left md:max-w-md lg:max-w-xl">
<h1 class="text-5xl lg:text-6xl">{{title}}</h1>
{{#if custom_excerpt}}<p class="mt-6 text-22 opacity-80">{{custom_excerpt}}</p>{{/if}}
</div>
{{#if feature_image}}
<figure class="relative max-w-lg w-full hidden md:flex mt-12 md:mt-0">
<img class="blur-up lazyload object-center w-full"
src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="
data-srcset="{{img_url feature_image size="s"}} 300w,
{{img_url feature_image size="m"}} 600w,
{{img_url feature_image size="l"}} 1000w,
{{img_url feature_image size="xl"}} 2000w"
data-sizes="auto"
width="512"
height="384"
alt="{{#if feature_image_alt}}{{feature_image_alt}}{{else}}{{title}}{{/if}}"/>
</figure>
{{/if}}
</div>
</div>
{{/post}}
<div class="container mx-auto px-4 py-vmin8 grid gap-10 xl:gap-20 lg:grid-cols-sidebar">
<div>
<div class="js-feed-entry">
{{#foreach posts}}
<article class="js-story mb-12 flex justify-between items-center">
<header class="mr-5 w-full">
<div class="mb-2 flex flex-row items-center">
{{#primary_author}}
<a href="{{url}}" title="{{t "Go to the profile of"}} {{name}}">
<img class="w-5 h-5 object-cover rounded-full"
src="{{#if profile_image}}{{img_url profile_image size="xs"}}{{else}}{{asset "images/avatar.png"}}{{/if}}"
width="20"
height="20"
alt="{{t "Go to the profile of "}} {{name}}"/>
</a>
<div class="ml-2 text-sm">
<a href="{{url}}">{{name}}</a>
{{/primary_author}}
{{#if primary_tag}}<span class="text-gray-500">{{t "in"}}</span> <a href="{{primary_tag.url}}">{{primary_tag.name}}</a>{{/if}}
</div>
</div>
<a href="{{url}}">
<h2 class="text-2xl line-clamp-2 text-title leading-tight">{{title}}</h2>
{{#if excerpt}}<p class="mt-2 text-gray-500 text-base line-clamp-2">{{excerpt characters="150"}}</p>{{/if}}
</a>
{{!-- Date Time and reading Time - ./partials/components/datetime.hbs --}}
{{> "components/datetime" class="mt-3 text-gray-500 text-sm"}}
</header>
{{#if feature_image}}
<a href="{{url}}" class="flex-none">
<img class="block blur-up lazyload h-32 object-cover w-52"
src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="
data-srcset="{{img_url feature_image size="s"}} 400w,{{img_url feature_image size="m"}} 750w,{{img_url feature_image size="l"}} 960w"
data-sizes="auto"
width="208"
height="128"
alt="{{#if feature_image_alt}}{{feature_image_alt}}{{else}}{{title}}{{/if}}"/>
</a>
{{/if}}
</article>
{{/foreach}}
</div>
{{!-- Pagination - partials/pagination.hbs --}}
{{pagination}}
</div>
{{!-- sidebar --}}
<aside class="sidebar flex flex-col justify-start">
<div class="lg:sticky lg:top-28">
<h3 class="uppercase text-sm font-semibold mb-4">{{t "Discover more of what matters to you"}}</h3>
<div class="buttons">
{{#get "tags" limit="10" filter="visibility:public" order="count.posts desc"}}{{#foreach tags}}
<a href="{{url absolute="true"}}" title="{{name}}" class="button is-light font-medium text-sm capitalize">{{name}}</a>
{{/foreach}}{{/get}}
</div>
<hr>
</div>
</aside>
</div>