1
mirror of https://github.com/jakejarvis/jarv.is.git synced 2026-06-05 20:15:31 -04:00

publish tailwind post with new image diff component

This commit is contained in:
2025-05-08 15:14:37 -04:00
parent eab84bfee9
commit afcced7707
12 changed files with 225 additions and 30 deletions
+21 -15
View File
@@ -119,16 +119,18 @@ const Page = async ({ params }: { params: Promise<{ slug: string }> }) => {
<span>Improve This Post</span>
</Link>
<div className="flex min-w-14 flex-nowrap items-center gap-x-2 whitespace-nowrap">
<EyeIcon className="inline size-4 shrink-0" />
<Suspense
// when this loads, the component will count up from zero to the actual number of hits, so we can simply
// show a zero here as a "loading indicator"
fallback={<span>0</span>}
>
<ViewCounter slug={`${POSTS_DIR}/${frontmatter!.slug}`} />
</Suspense>
</div>
{env.NEXT_PUBLIC_ENV === "production" && (
<div className="flex min-w-14 flex-nowrap items-center gap-x-2 whitespace-nowrap">
<EyeIcon className="inline size-4 shrink-0" />
<Suspense
// when this loads, the component will count up from zero to the actual number of hits, so we can simply
// show a zero here as a "loading indicator"
fallback={<span>0</span>}
>
<ViewCounter slug={`${POSTS_DIR}/${frontmatter!.slug}`} />
</Suspense>
</div>
)}
</div>
<h1 className="mt-2 mb-3 text-3xl/10 font-bold md:text-4xl/12">
@@ -141,11 +143,15 @@ const Page = async ({ params }: { params: Promise<{ slug: string }> }) => {
<MDXContent />
{!frontmatter!.noComments && (
<div id="comments" className="border-ring mt-8 min-h-36 border-t-2 pt-8">
<Suspense fallback={<Loading boxes={3} width={40} className="mx-auto my-8 block" />}>
<Comments title={frontmatter!.title} />
</Suspense>
{env.NEXT_PUBLIC_ENV === "production" && (
<div id="comments" className="mt-8 min-h-36 border-t-2 pt-8">
{!frontmatter!.noComments ? (
<Suspense fallback={<Loading boxes={3} width={40} className="mx-auto my-8 block" />}>
<Comments title={frontmatter!.title} />
</Suspense>
) : (
<div className="text-foreground/85 text-center font-medium">Comments are disabled for this post.</div>
)}
</div>
)}
</>