feat: enhance blog functionality with new components and styles
- Added styles for WordPress table and button blocks in globals.css. - Updated layout.tsx to include a favicon. - Improved blog page layout and search functionality, including new search and filter icons. - Implemented related posts feature in blog post pages with new BlogBlockquote and BlogPullquote components. - Enhanced blog card display with a new variant for smaller cards. - Updated blog collapse sections for better user interaction. - Added new utility functions for extracting block data from WordPress content.
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
"use client";
|
||||
|
||||
import type { BlockquoteBlockPayload } from "@/lib/blog-blocks";
|
||||
|
||||
interface BlogPullquoteProps {
|
||||
payload: BlockquoteBlockPayload;
|
||||
}
|
||||
|
||||
export function BlogPullquote({ payload }: BlogPullquoteProps) {
|
||||
const { content, citation } = payload;
|
||||
if (!content.trim()) return null;
|
||||
|
||||
return (
|
||||
<figure className="my-10 not-prose">
|
||||
<blockquote className="relative rounded-xl border border-border bg-muted/40 px-6 py-5 text-center text-foreground shadow-sm">
|
||||
<div
|
||||
className=""
|
||||
dangerouslySetInnerHTML={{ __html: content }}
|
||||
/>
|
||||
{citation ? (
|
||||
<footer className="mt-4">
|
||||
<cite className="text-sm text-muted-foreground not-italic">
|
||||
— {citation}
|
||||
</cite>
|
||||
</footer>
|
||||
) : null}
|
||||
</blockquote>
|
||||
</figure>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user