Skip to content

Commit 8ca86c7

Browse files
author
DidierRLopes
committed
make it only show in desktop apps
1 parent 98878c4 commit 8ca86c7

File tree

1 file changed

+33
-29
lines changed

1 file changed

+33
-29
lines changed

src/pages/index.js

Lines changed: 33 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -319,37 +319,41 @@ export default function Home() {
319319

320320
<div className="mx-auto mt-16 flex max-w-[880px] flex-col px-3 text-center mb-16">
321321
<h1 className="_h1 !mb-2">Latest posts.</h1>
322-
{allPosts && allPosts.length > 0 && <BlogHistory posts={allPosts} />}
323322
{isDesktop ? (
324-
<div className="flex items-start content-center mx-auto align-center justify-center mt-8 gap-8 mb-4 flex-row">
325-
{postsHighlight.map((post) => (
326-
<div
327-
key={post.id}
328-
className="mx-2 max-w-[250px] flex flex-col items-center"
329-
style={{ height: '100%' }}
330-
>
331-
<a
332-
href={`${post.id}`}
333-
className="flex flex-col items-center h-full"
323+
<>
324+
{allPosts && allPosts.length > 0 && (
325+
<BlogHistory posts={allPosts} />
326+
)}
327+
<div className="flex items-start content-center mx-auto align-center justify-center mt-8 gap-8 mb-4 flex-row">
328+
{postsHighlight.map((post) => (
329+
<div
330+
key={post.id}
331+
className="mx-2 max-w-[250px] flex flex-col items-center"
332+
style={{ height: '100%' }}
334333
>
335-
<img
336-
className="rounded-3xl object-cover mb-2 text-center justify-center align-center mx-auto"
337-
src={post.content_html.match(/<img.*?src="(.*?)"/)[1]}
338-
alt={post.title}
339-
style={{
340-
flex: '1 0 auto',
341-
width: '220px',
342-
height: '150px',
343-
objectFit: 'cover',
344-
}}
345-
/>
346-
<p className="text-left text-sm w-full mt-auto">
347-
{post.title}
348-
</p>
349-
</a>
350-
</div>
351-
))}
352-
</div>
334+
<a
335+
href={`${post.id}`}
336+
className="flex flex-col items-center h-full"
337+
>
338+
<img
339+
className="rounded-3xl object-cover mb-2 text-center justify-center align-center mx-auto"
340+
src={post.content_html.match(/<img.*?src="(.*?)"/)[1]}
341+
alt={post.title}
342+
style={{
343+
flex: '1 0 auto',
344+
width: '220px',
345+
height: '150px',
346+
objectFit: 'cover',
347+
}}
348+
/>
349+
<p className="text-left text-sm w-full mt-auto">
350+
{post.title}
351+
</p>
352+
</a>
353+
</div>
354+
))}
355+
</div>
356+
</>
353357
) : (
354358
<div className="flex items-center content-center mx-auto align-center justify-center mt-8 gap-4 mb-4 flex-col">
355359
{postsHighlight.map((post) => (

0 commit comments

Comments
 (0)