66 < div class ="hx-mx-auto hx-flex {{ partial `utils/page-width` . }} ">
77 {{ partial "sidebar.html" (dict "context" . "disableSidebar" true "displayPlaceholder" true) }}
88 < article class ="hx-w-full hx-break-words hx-flex hx-min-h-[calc(100vh-var(--navbar-height))] hx-min-w-0 hx-justify-center hx-pb-8 hx-pr-[calc(env(safe-area-inset-right)-1.5rem)] ">
9- < main class ="hx-w-full hx-min-w-0 hx-max-w-6xl hx-px-6 hx-pt-4 md:hx-px-12 ">
9+ < main class ="hx-w-full hx-min-w-0 hx-max-w-6xl hx-px-6 hx-pt-4 md:hx-px-3 ">
1010 < br class ="hx-mt-1.5 hx-text-sm " />
11- {{/* {{ if .Title }}< h1 class ="hx-text-center hx-mt-2 hx-text-4xl hx-font-bold hx-tracking-tight hx-text-slate-900 dark:hx-text-slate-100 "> {{ .Title }}</ h1 > {{ end }} */}}
12- {{/* < div class ="content "> {{ .Content }}</ div > */}}
13- < h1 class ="hx-text-center "> Blogs with type hero</ h1 >
14- < div class ="blogs-wrapper ">
15- {{- $pages := where .Site.RegularPages "Type" "hero" -}}
16- {{- range $pages }}
17- < div class =" blog-card hx-mb-10 ">
18- < div class ="blog-card-image ">
19- {{ if .Params.image }}
20- < a href ="{{ .RelPermalink }} " class ="">
21- < img
22- src ={{ .Params.image }}
23- alt = {{ .Title }}
24- class ="blog-card-thumb " loading ="lazy " method ="Resize " options ="600x q80 webp ">
25- </ a >
26- {{ else}}
27- < a href ="{{ .RelPermalink }} " class ="">
28- < img
29- src ="{{ $imagePath | relURL }} "
30- alt = {{ .Title }}
31- class ="blog-card-thumb " loading ="lazy " method ="Resize " options ="600x q80 webp ">
32- </ a >
11+
12+ < div class ="grid-layout ">
13+ < ul class ="grid-layout__list ">
14+ < li class ="featured-gird-item ">
15+ {{ range first 1 (where .Pages "Params.tags" "intersect" (slice "featured")) }}
16+ < a href ="{{ .RelPermalink }} " class ="grid-layout__item-link ">
17+ < div class ="grid-layout__item ">
18+ < img src ="{{ .Params.image | default $imagePath }} " alt ="{{ .Title }} " class ="hx-w-full hx-h-48 hx-object-cover hx-rounded-md hx-mb-4 " />
19+ < div class ="grid-layout__item-content ">
20+ {{ with index .Params.tags 0 }}
21+ < span class ="hx-inline-block hx-bg-gray-200 hx-text-gray-800 hx-text-xs hx-font-semibold hx-px-2 hx-py-1 hx-rounded hx-mb-2 "> {{ . }}</ span >
22+ {{ end }}
23+ < h2 class ="hx-text-2xl hx-font-bold hx-text-gray-900 hx-mb-4 "> {{ .Title }}</ h2 >
24+ < p class ="blog-card-description hx-text-base hx-text-gray-700 ">
25+ {{- partial "utils/page-description" . -}}
26+ </ p >
27+ </ div >
28+ </ div >
29+ </ a >
3330 {{ end }}
34- </ div >
35- < h3 > < a style =" color: inherit; text-decoration: none; "
36- class =" blog-card-title hx-block hx-font-semibold hx-mt-4 hx-text-2xl "
37- href =" {{ .RelPermalink }} " > {{ .Title }} </ a > </ h3 >
38- {{- if site.Params.blog.list.displayTags -}}
39- {{ with .Params.tags }}
40- < p class =" blog-card-tags hx-opacity-100 hx-text-sm hx-leading-7 ">
41- {{- range . }}< a class =" blog-card-tag mona-sans hx-inline-block hx-mr-2 " > #{{ . }} </ a > {{ end -}}
42- </ p >
43- {{ end - }}
44- {{- end -}}
45- < a href =" {{ .RelPermalink }} " >
46- < p class =" blog-card.description hx-opacity-80 hx-mt-2 hx-leading-7 " >
47- {{- partial "utils/page- description" . -}} </ p >
48- </ a >
49- < p class =" hx-opacity-80 hx-mt-1 hx-leading-7 " >
50- < a class =" hx-text-[color:hsl(var(--primary-hue),100%,50%)] hx-underline hx-underline-offset-2 hx-decoration-from-font " href =" {{ .RelPermalink }} " >
51- {{- $readMore -}}
31+ </ li >
32+
33+
34+ {{ range first 3 (where .Site.RegularPages "Params.tags" "intersect" (slice "Notes")) }}
35+ < li class =" grid-item " >
36+ < a href =" {{ .RelPermalink }} " class =" grid-layout__item-link " >
37+ < div class ="grid-layout__item ">
38+ < img src =" {{ .Params.image | default $imagePath }} " alt =" {{ .Title }}" class ="hx-w-full hx-h-48 hx-object-cover hx-rounded-md hx-mb-4 " />
39+ < div class =" grid-layout__item-content " >
40+ {{ with index .Params.tags 0 }}
41+ < span class =" hx-inline-block hx-bg-gray-200 hx-text-gray-800 hx-text-xs hx-font-semibold hx-px-2 hx-py-1 hx-rounded hx-mb-2 " > {{ . }} </ span >
42+ {{ end }}
43+ < h2 class ="hx-text-xl hx-font-bold hx-text-gray-900 hx-mb-4 " > {{ .Title }} </ h2 >
44+ < p class =" blog-card- description hx-text-base hx-text-gray-700 " >
45+ {{- partial "utils/page-description" . -}}
46+ </ p >
47+ </ div >
48+ </ div >
5249 </ a >
53- </ p >
54- < hr class ="{{$borderClass}} dark:hx-border-neutral-800 contrast-more:hx-border-t contrast-more:hx-border-neutral-400 contrast-more:hx-shadow-none contrast-more:dark:hx-border-neutral-400 ">
55- </ div >
56- {{ end -}}
57- </ div >
58-
59- < h1 class ="hx-text-center "> Notes with type post</ h1 >
60-
61- < div class ="notes-blogs-wrapper ">
62- {{- $pages := where .Site.RegularPages "Type" "post" -}}
63- {{- range $pages }}
64- < div class ="hx-mb-10 notes-blog-card ">
65- < div class ="notes-blog-card-banner ">
66- {{/* < p class ="blog-category-tag popular "> Popular</ p > */}}
67- < a href ="{{ .RelPermalink }} " >
68- < img
69- src ={{ .Params.image }}
70- alt = {{ .Title }}
71- class ="notes-blog-card-thumb " loading ="lazy " method ="Resize " options ="600x q80 webp ">
72- </ a >
50+ </ li >
51+ {{ end }}
52+ </ ul >
7353 </ div >
74- < div class ="notes-blog-card-body ">
75- < h3 >
76- < a
77- style ="color: inherit; text-decoration: none "
78- class ="hx-block hx-font-semibold hx-text-2xl notes-blog-title "
79- href ="{{ .RelPermalink }} "
80- > {{ .Title }}</ a
81- >
82- </ h3 >
83- {{- if site.Params.blog.list.displayTags -}} {{ with .Params.tags }}
84- {{/* < p class ="hx-opacity-50 hx-text-sm hx-leading-7 notes-blog-tags ">
85- {{- range . }}< a class ="hx-inline-block hx-mr-2 notes-blog-tag "> {{ . }}</ a > {{ end
86- -}}
87- </ p > */}}
88- {{ end -}}
89- {{- end -}}
90- < a href ="{{ .RelPermalink }} " >
91- < p class ="hx-opacity-80 hx-leading-7 notes-blog-description ">
92- {{- partial "utils/page-description" . -}}
93- </ p >
94- </ a >
95- </ div >
96- {{/* < p class ="hx-opacity-80 hx-mt-1 hx-leading-7 ">
97- < a
98- class ="hx-text-[color:hsl(var(--primary-hue),100%,50%)] hx-underline hx-underline-offset-2 hx-decoration-from-font "
99- href ="{{ .RelPermalink }} "
100- >
101- {{- $readMore -}}
102- </ a >
103- </ p > */}}
104- </ div >
105- {{ end -}}
106- </ div >
107-
108- < h1 class ="hx-text-center "> Blog with featured tag</ h1 >
109- < div class ="blogs-wrapper ">
110- {{/* {{- $pages := partial "utils/sort-pages" (dict "page" . "by" site.Params.blog.list.sortBy "order" site.Params.blog.list.sortOrder) -}} */}}
111- {{- $pages := where .Site.RegularPages "Params.tags" "intersect" (slice "featured") -}}
112- {{- range $pages }}
113- {{/* {{- range where $pages "Params.tags" "intersect" (slice "featured") }} */}}
114- < div class =" blog-card hx-mb-10 ">
115- < div class ="blog-card-image ">
116- {{ if .Params.image }}
117- < a href ="{{ .RelPermalink }} " class ="">
118- < img
119- src ={{ .Params.image }}
120- alt = {{ .Title }}
121- class ="blog-card-thumb " loading ="lazy " method ="Resize " options ="600x q80 webp ">
122- </ a >
123- {{ else}}
124- < a href ="{{ .RelPermalink }} " class ="">
125- < img
126- src ="{{ $imagePath | relURL }} "
127- alt = {{ .Title }}
128- class ="blog-card-thumb " loading ="lazy " method ="Resize " options ="600x q80 webp ">
129- </ a >
130- {{ end }}
131- </ div >
132- < h3 > < a style ="color: inherit; text-decoration: none; "
133- class =" blog-card-title hx-block hx-font-semibold hx-mt-4 hx-text-2xl "
134- href ="{{ .RelPermalink }} "> {{ .Title }}</ a > </ h3 >
135- {{/* {{- if site.Params.blog.list.displayTags -}}
136- {{ with .Params.tags }}
137- < p class =" blog-card-tags hx-opacity-100 hx-text-sm hx-leading-7 ">
138- {{- range . }}< a class =" blog-card-tag mona-sans hx-inline-block hx-mr-2 " > #{{ . }}</ a > {{ end -}}
139- </ p >
140- {{ end -}}
141- {{- end -}} */}}
142- {{- if site.Params.blog.list.displayTags -}}
143- {{with .GetTerms "tags"}}
144- < p class =" blog-card-tags hx-opacity-100 hx-text-sm hx-leading-7 ">
145- {{- range . }}
146- < a class =" blog-card-tag mona-sans hx-inline-block hx-mr-2 " href ="{{.RelPermalink}} " > #{{ .Name }}</ a > {{ end -}}
147- </ p >
148- {{ end -}}
149- {{- end -}}
150-
151- < a href ="{{ .RelPermalink }} ">
152- < p class =" blog-card.description hx-opacity-80 hx-mt-2 hx-leading-7 ">
153- {{- partial "utils/page-description" . -}}</ p >
154- </ a >
155- < p class ="hx-opacity-80 hx-mt-1 hx-leading-7 ">
156- < a class ="hx-text-[color:hsl(var(--primary-hue),100%,50%)] hx-underline hx-underline-offset-2 hx-decoration-from-font " href ="{{ .RelPermalink }} ">
157- {{- $readMore -}}
158- </ a >
159- </ p >
160- < hr class ="{{$borderClass}} dark:hx-border-neutral-800 contrast-more:hx-border-t contrast-more:hx-border-neutral-400 contrast-more:hx-shadow-none contrast-more:dark:hx-border-neutral-400 ">
161- </ div >
162- {{ end -}}
163- </ div >
164-
165-
166- < h1 class ="hx-text-center "> Blog with Documentation series</ h1 >
167- < div class ="blogs-wrapper ">
168- {{/* {{- $pages := partial "utils/sort-pages" (dict "page" . "by" site.Params.blog.list.sortBy "order" site.Params.blog.list.sortOrder) -}} */}}
169- {{- $pages := where .Site.RegularPages "Params.series" "intersect" (slice "Documentation") -}}
170- {{- range $pages }}
171- {{/* {{- range where $pages "Params.tags" "intersect" (slice "featured") }} */}}
172- < div class =" blog-card hx-mb-10 ">
173- < div class ="blog-card-image ">
174- {{ if .Params.image }}
175- < a href ="{{ .RelPermalink }} " class ="">
176- < img
177- src ={{ .Params.image }}
178- alt = {{ .Title }}
179- class ="blog-card-thumb " loading ="lazy " method ="Resize " options ="600x q80 webp ">
180- </ a >
181- {{ else}}
182- < a href ="{{ .RelPermalink }} " class ="">
183- < img
184- src ="{{ $imagePath | relURL }} "
185- alt = {{ .Title }}
186- class ="blog-card-thumb " loading ="lazy " method ="Resize " options ="600x q80 webp ">
187- </ a >
188- {{ end }}
189- </ div >
190- < h3 > < a style ="color: inherit; text-decoration: none; "
191- class =" blog-card-title hx-block hx-font-semibold hx-mt-4 hx-text-2xl "
192- href ="{{ .RelPermalink }} "> {{ .Title }}</ a > </ h3 >
193- {{/* {{- if site.Params.blog.list.displayTags -}}
194- {{ with .Params.tags }}
195- < p class =" blog-card-tags hx-opacity-100 hx-text-sm hx-leading-7 ">
196- {{- range . }}< a class =" blog-card-tag mona-sans hx-inline-block hx-mr-2 " > #{{ . }}</ a > {{ end -}}
197- </ p >
198- {{ end -}}
199- {{- end -}} */}}
200- {{- if site.Params.blog.list.displayTags -}}
201- {{with .GetTerms "series"}}
202- < p class =" blog-card-tags hx-opacity-100 hx-text-sm hx-leading-7 ">
203- {{- range . }}
204- < a class =" blog-card-tag mona-sans hx-inline-block hx-mr-2 " href ="{{.RelPermalink}} " > #{{ .Name }}</ a > {{ end -}}
205- </ p >
206- {{ end -}}
207- {{- end -}}
208-
209- < a href ="{{ .RelPermalink }} ">
210- < p class =" blog-card.description hx-opacity-80 hx-mt-2 hx-leading-7 ">
211- {{- partial "utils/page-description" . -}}</ p >
212- </ a >
213- < p class ="hx-opacity-80 hx-mt-1 hx-leading-7 ">
214- < a class ="hx-text-[color:hsl(var(--primary-hue),100%,50%)] hx-underline hx-underline-offset-2 hx-decoration-from-font " href ="{{ .RelPermalink }} ">
215- {{- $readMore -}}
216- </ a >
217- </ p >
218- < hr class ="{{$borderClass}} dark:hx-border-neutral-800 contrast-more:hx-border-t contrast-more:hx-border-neutral-400 contrast-more:hx-shadow-none contrast-more:dark:hx-border-neutral-400 ">
219- </ div >
220- {{ end -}}
221- </ div >
54+
55+ .
56+
22257
22358
22459 </ main >
22560 </ article >
22661 < div class ="max-xl:hx-hidden hx-h-0 hx-w-64 hx-shrink-0 "> </ div >
22762 </ div >
63+
64+ < style >
65+ .grid-layout {
66+ display : grid;
67+ grid-template-columns : 1fr ;
68+ gap : 2rem ;
69+ }
70+
71+ .grid-layout__list {
72+ list-style : none;
73+ margin : 0 ;
74+ padding : 0 ;
75+ display : grid;
76+ grid-template-columns : 1fr ;
77+ gap : 2rem ;
78+ }
79+
80+ .featured-gird-item {
81+ grid-column : 1 / -1 ;
82+ }
83+
84+ .grid-item {
85+ display : flex;
86+ align-items : flex-start;
87+ flex-direction : column;
88+ }
89+
90+ .grid-item .grid-layout__item {
91+ flex-direction : row;
92+ align-items : flex-start;
93+
94+ }
95+
96+ .grid-item img {
97+ width : 140px ;
98+ height : 100px ;
99+ object-fit : cover;
100+ border-radius : 0.5rem ;
101+ margin-bottom : 0 ;
102+ flex-shrink : 0 ;
103+ }
104+
105+ .grid-item .grid-layout__item-content {
106+ flex : 1 1 0% ;
107+ display : flex;
108+ flex-direction : column;
109+ justify-content : center;
110+ }
111+
112+ @media (max-width : 767px ) {
113+ .grid-item ,
114+ .grid-item .grid-layout__item {
115+ flex-direction : column;
116+ align-items : stretch;
117+ }
118+ .grid-item img {
119+ width : 160px ;
120+ height : 160px ;
121+ margin-bottom : 1rem ;
122+ }
123+ }
124+
125+ .grid-layout__item {
126+ background : # fff ;
127+ border-radius : 0.75rem ;
128+ box-shadow : 0 2px 8px rgba (0 , 0 , 0 , 0.07 );
129+ transition : box-shadow 0.2s ;
130+ overflow : hidden;
131+ display : flex;
132+ flex-direction : column;
133+ height : 100% ;
134+ }
135+
136+ .grid-layout__item-link : hover .grid-layout__item {
137+ box-shadow : 0 4px 16px rgba (0 , 0 , 0 , 0.12 );
138+ }
139+
140+ @media (min-width : 768px ) {
141+ .grid-layout__list {
142+ grid-template-columns : 1.2fr 1fr ;
143+ gap : 2rem ;
144+ }
145+ .featured-gird-item {
146+ grid-column : 1 / 2 ;
147+ grid-row : 1 / 3 ;
148+ /* Make featured item bigger */
149+ .grid-layout__item {
150+ min-height : 100% ;
151+ height : 100% ;
152+ }
153+ }
154+ .grid-layout__item {
155+
156+ }
157+ }
158+
159+ @media (max-width : 767px ) {
160+ .grid-layout__item ,
161+ .featured-gird-item .grid-layout__item {
162+
163+ }
164+ }
165+ </ style >
166+
228167{{- end -}}
0 commit comments