render articles

This commit is contained in:
2026-08-22 17:57:54 -05:00
parent 1073b794d6
commit 6f21248132
25 changed files with 991 additions and 433 deletions
@@ -0,0 +1,29 @@
import { getString } from "./BlockHelpers";
export default function ImageBlock({
content,
}: {
content: Record<string, unknown>;
}) {
const src = getString(content, "src");
const alt = getString(content, "alt");
const caption = getString(content, "caption");
if (!src) return null;
return (
<figure className="my-10">
<img
src={src}
alt={alt}
className="h-auto w-full border-2 border-dark object-cover"
/>
{caption && (
<figcaption className="mt-2 text-center text-sm text-tn1">
{caption}
</figcaption>
)}
</figure>
);
}