@@ -14,34 +14,28 @@ const Page = () => {
14
14
< div className = "w-full mx-auto py-2 sm:px-4 flex flex-col justify-start items-start" >
15
15
< h2 className = "w-full text-start text-5xl sm:text-6xl font-medium sm:font-bold mt-4" > Blogs</ h2 >
16
16
< h3 className = "text-xl mt-4 leading-normal text-gray-500" > Get the latest articles from SQL Editor</ h3 >
17
- < div className = "mt-6 w-full grid grid-cols-1 lg:grid-cols-2 gap-4 sm:gap-6" >
17
+ < div className = "mt-6 w-full grid grid-cols-1 gap-4 sm:gap-6" >
18
18
{ frontmatters . map ( ( frontmatter ) => {
19
19
return (
20
20
< React . Fragment key = { frontmatter . slug } >
21
- < div className = "w-full bg-white p-4 border rounded-2xl flex flex-row justify-start items-start gap-x-4 hover:shadow-sm" >
22
- < div className = "flex flex-1 flex-col sm:p-2 justify-start items-start" >
21
+ < Link href = { `/blog/${ frontmatter . slug } ` } className = "block w-full" >
22
+ < div className = "w-full bg-white p-4 border rounded-2xl flex flex-row justify-start items-start gap-x-4 hover:shadow-sm" >
23
+ < div className = "flex flex-1 flex-col sm:p-2 justify-start items-start" >
24
+ { frontmatter . feature_image && (
25
+ < div className = "w-full sm:hidden mb-4 shrink-0 rounded-lg overflow-clip" >
26
+ < img src = { frontmatter . feature_image } alt = "" />
27
+ </ div >
28
+ ) }
29
+ < div className = "text-lg leading-tight! sm:text-xl line-clamp-2 hover:text-teal-600" > { frontmatter . title } </ div >
30
+ { frontmatter . description && < p className = "mt-2 text-gray-400 line-clamp-3 leading-snug" > { frontmatter . description } </ p > }
31
+ </ div >
23
32
{ frontmatter . feature_image && (
24
- < Link
25
- className = "w-full sm:hidden mb-4 shrink-0 rounded-lg overflow-clip hover:opacity-80 hover:shadow-sm"
26
- href = { `/blog/${ frontmatter . slug } ` }
27
- >
28
- < img src = { frontmatter . feature_image } alt = "" />
29
- </ Link >
33
+ < div className = "hidden sm:block shrink-0 rounded-lg overflow-clip" >
34
+ < img className = "w-60" src = { frontmatter . feature_image } alt = "" />
35
+ </ div >
30
36
) }
31
- < Link className = "text-lg leading-tight! sm:text-xl line-clamp-2 hover:text-teal-600" href = { `/blog/${ frontmatter . slug } ` } >
32
- { frontmatter . title }
33
- </ Link >
34
- { frontmatter . description && < p className = "mt-2 text-gray-400 line-clamp-3 leading-snug" > { frontmatter . description } </ p > }
35
37
</ div >
36
- { frontmatter . feature_image && (
37
- < Link
38
- className = "hidden sm:block shrink-0 rounded-lg overflow-clip hover:opacity-80 hover:shadow-sm"
39
- href = { `/blog/${ frontmatter . slug } ` }
40
- >
41
- < img className = "w-60" src = { frontmatter . feature_image } alt = "" />
42
- </ Link >
43
- ) }
44
- </ div >
38
+ </ Link >
45
39
</ React . Fragment >
46
40
) ;
47
41
} ) }
0 commit comments