@@ -5,6 +5,7 @@ import { Layout } from '../../components/Page/Layout';
5
5
import { Extension } from '../../constants/extension' ;
6
6
import featured from '../../featured.json' ;
7
7
import showcases from '../../showcases.json' ;
8
+ import themes from '../../themes.json' ;
8
9
import Image from 'next/image' ;
9
10
10
11
const shimmer = ( w : number , h : number ) => `
@@ -51,18 +52,23 @@ export default function Home({ showcases, featured }: any) {
51
52
52
53
< p className = "mt-3 text-base text-whisper-700 sm:mt-5 sm:text-xl lg:text-lg xl:text-xl" > { strings ( `showcase_page_description` ) as string } </ p >
53
54
54
- < div className = "mt-8 text-sm " >
55
+ < div className = "mt-8 text-base " >
55
56
< p > Want to add your site or article/video/... to our showcase page? Great, open a showcase on < a className = "text-teal-500 hover:text-teal-900" href = { Extension . showcaseLink } target = "_blank" rel = "noopener noreferrer" > Github</ a > !</ p >
56
57
</ div >
57
58
</ div >
58
59
59
60
< div >
60
61
< h2 className = "text-3xl xl:text-4xl mt-8 tracking-tight font-extrabold sm:leading-none" > { strings ( `showcase_featured_title` ) as string } </ h2 >
61
62
62
- < div className = { `py-8 grid grid-cols-1 lg:grid-cols-2 gap-8` } >
63
+ < div className = { `py-8 grid grid-cols-1 lg:grid-cols-2 gap-8 lg:gap-16 ` } >
63
64
{ allFeatured . sort ( sortTitle ) . map ( ( feature : any ) => (
64
65
< div key = { feature . title } >
65
- < a className = "group space-y-2 md:space-y-5 relative" href = { feature . link } title = { feature . title } target = "_blank" rel = { `noopener noreferrer` } >
66
+ < a
67
+ className = "group space-y-2 md:space-y-5 relative hover:text-teal-700"
68
+ href = { feature . link }
69
+ title = { feature . title }
70
+ target = "_blank"
71
+ rel = { `noopener noreferrer` } >
66
72
< figure className = { `relative overflow-hidden grayscale group-hover:grayscale-0 text-center` } >
67
73
< Image
68
74
className = { `w-full object-cover object-left-top` }
@@ -76,15 +82,15 @@ export default function Home({ showcases, featured }: any) {
76
82
/>
77
83
</ figure >
78
84
79
- < h2 className = "text-3xl tracking-tight font-extrabold sm:leading-none lg:text-3xl xl:text-4xl " > { feature . title } </ h2 >
85
+ < h2 className = "text-xl lg:text-2xl tracking-tight font-extrabold sm:leading-none" > { feature . title } </ h2 >
80
86
</ a >
81
87
82
88
{
83
89
feature . author && (
84
- < p className = "mt-3 text-base text-whisper-700 sm: mt-5 sm:text-xl lg:text-lg xl:text-xl " >
90
+ < p className = "text-base text-whisper-700 mt-1 " >
85
91
{
86
92
feature . author ?. link ? (
87
- < a className = "text-teal-500 hover:text-teal-900 " href = { feature . author . link } title = { feature . author . name } target = "_blank" rel = "noopener noreferrer" > { feature . author . name } </ a >
93
+ < a className = "text-whisper-900 hover:text-yellow-700 " href = { feature . author . link } title = { feature . author . name } target = "_blank" rel = "noopener noreferrer" > { feature . author . name } </ a >
88
94
) : (
89
95
feature . author . name
90
96
)
@@ -126,14 +132,22 @@ export default function Home({ showcases, featured }: any) {
126
132
</ div >
127
133
128
134
< div >
129
- < h2 className = "text-3xl xl:text-4xl mt-8 tracking-tight font-extrabold sm:leading-none" > Showcases</ h2 >
135
+ < h2 className = "text-3xl xl:text-4xl mt-8 tracking-tight font-extrabold sm:leading-none" >
136
+ Websites managed by Front Matter CMS
137
+ </ h2 >
130
138
131
- < div className = { `py-8 grid grid-cols-1 lg:grid-cols-2 gap-8` } >
139
+ < div className = { `py-8 grid grid-cols-1 lg:grid-cols-3 gap-8 lg:gap-16 ` } >
132
140
{ showcases . filter ( ( showcase : any ) => showcase . image ) . sort ( sortTitle ) . map ( ( showcase : any ) => (
133
- < a key = { showcase . title } className = "group space-y-2 md:space-y-5 relative" href = { showcase . link } title = { showcase . title } target = "_blank" rel = { `noopener noreferrer` } >
134
- < figure className = { `relative h-64 lg:h-[25rem] overflow-hidden grayscale group-hover:grayscale-0 text-center` } >
141
+ < a
142
+ key = { showcase . title }
143
+ className = "group relative hover:text-teal-700"
144
+ href = { showcase . link }
145
+ title = { showcase . title }
146
+ target = "_blank"
147
+ rel = { `noopener noreferrer` } >
148
+ < figure className = { `relative h-64 lg:h-[16rem] overflow-hidden grayscale group-hover:grayscale-0 text-center` } >
135
149
< Image
136
- className = { `w-full object-cover object-left-top` }
150
+ className = { `w-full h-full object-cover object-left-top` }
137
151
src = { `/showcases/${ showcase . image } ` }
138
152
alt = { showcase . title }
139
153
loading = { `lazy` }
@@ -144,9 +158,48 @@ export default function Home({ showcases, featured }: any) {
144
158
/>
145
159
</ figure >
146
160
147
- < h2 className = "text-3xl tracking-tight font-extrabold sm:leading-none lg:text-3xl xl:text-4xl" > { showcase . title } </ h2 >
161
+ < h3 className = "mt-2 text-xl tracking-tight font-extrabold sm:leading-none lg:text-xl xl:text-2xl" >
162
+ { showcase . title }
163
+ </ h3 >
164
+
165
+ < p className = "mt-1 text-base text-whisper-700" > { showcase . description } </ p >
166
+ </ a >
167
+ ) ) }
168
+ </ div >
169
+ </ div >
170
+
171
+ < div >
172
+ < h2 className = "text-3xl xl:text-4xl mt-8 tracking-tight font-extrabold sm:leading-none" >
173
+ Templates/themes with Front Matter CMS integration
174
+ </ h2 >
175
+
176
+ < div className = { `py-8 grid grid-cols-1 lg:grid-cols-3 gap-8 lg:gap-16` } >
177
+ { themes . filter ( ( theme : any ) => theme . image ) . sort ( sortTitle ) . map ( ( theme : any ) => (
178
+ < a
179
+ key = { theme . title }
180
+ className = "group relative hover:text-teal-700"
181
+ href = { theme . link }
182
+ title = { theme . title }
183
+ target = "_blank"
184
+ rel = { `noopener noreferrer` } >
185
+ < figure className = { `relative h-64 lg:h-[16rem] overflow-hidden grayscale group-hover:grayscale-0 text-center` } >
186
+ < Image
187
+ className = { `w-full h-full object-cover object-left-top` }
188
+ src = { `/showcases/themes/${ theme . image } ` }
189
+ alt = { theme . title }
190
+ loading = { `lazy` }
191
+ placeholder = "blur"
192
+ blurDataURL = { `data:image/svg+xml;base64,${ toBase64 ( shimmer ( 592 , 400 ) ) } ` }
193
+ width = { 592 }
194
+ height = { 400 }
195
+ />
196
+ </ figure >
197
+ < h3 className = "mt-2 text-xl tracking-tight font-extrabold sm:leading-none lg:text-xl xl:text-2xl" >
198
+ { theme . title }
199
+ </ h3 >
148
200
149
- < p className = "mt-3 text-base text-whisper-700 sm:mt-5 sm:text-xl lg:text-lg xl:text-xl" > { showcase . description } </ p >
201
+ < p className = "mt-1 text-base text-whisper-700" > SSG: { theme . generator } </ p >
202
+ < p className = "mt-1 text-base text-whisper-700" > { theme . description } </ p >
150
203
</ a >
151
204
) ) }
152
205
</ div >
0 commit comments