feat: add version history drawer with release notes

Introduce a footer-triggered Version History drawer with categorized release notes, hardcoded release data, and semver tracking at v0.3.0. Also ships blog blockquote/table styling, site-wide typography, home page image updates, header refinements, and related bug fixes.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
alirez.br
2026-07-02 02:46:20 +03:30
co-authored by Cursor
parent 62163c4ab9
commit a47ec493c5
92 changed files with 4574 additions and 507 deletions
+12 -5
View File
@@ -5,16 +5,19 @@ import { notFound } from "next/navigation";
import { getPostBySlug, getFeaturedImageUrl, getRelatedPosts } from "@/lib/wp-api";
import { formatDateShamsi } from "@/lib/format-date";
import { ChevronRight } from "lucide-react";
import type { CollapseBlockPayload, BlockquoteBlockPayload, TipBlockPayload } from "@/lib/blog-blocks";
import type { CollapseBlockPayload, BlockquoteBlockPayload, TipBlockPayload, TableBlockPayload } from "@/lib/blog-blocks";
import { parseContentHeadings, getReadingTimeMinutes, formatAuthorName } from "@/lib/blog-utils";
import { BlogToc } from "@/components/blog-toc";
import { BlogPostMeta } from "@/components/blog-post-meta";
import { BlogCollapseSection } from "@/components/blog-collapse-section";
import { BlogBlockquote } from "@/components/blog-blockquote";
import { BlogTip } from "@/components/blog-tip";
import { BlogTable } from "@/components/blog-table";
import { BlogPullquote } from "@/components/blog-pullquote";
import { ScrollToTop } from "@/components/scroll-to-top";
import { BlogPostCard } from "@/components/blog-post-card";
import { type, typeSpacing } from "@/lib/typography";
import { cn } from "@/lib/utils";
interface BlogPostPageProps {
params: Promise<{ slug: string }>;
@@ -111,14 +114,14 @@ export default async function BlogPostPage({ params }: BlogPostPageProps) {
<nav className="mb-6" aria-label="مسیر">
<Link
href="/blog"
className="text-muted-foreground hover:text-foreground text-sm inline-flex items-center gap-1 transition-colors"
className={cn(type.link, "inline-flex items-center gap-1 transition-colors hover:text-foreground")}
>
<ChevronRight className="size-4" aria-hidden />
دانشنامه
</Link>
</nav>
<h1
className="text-2xl font-bold md:text-3xl leading-tight tracking-normal"
className={type.h1}
dangerouslySetInnerHTML={{ __html: post.title.rendered }}
/>
<BlogPostMeta
@@ -133,7 +136,7 @@ export default async function BlogPostPage({ params }: BlogPostPageProps) {
/>
</div>
<article className="blog-content text-justify space-y-6 text-foreground [&_h2]:text-2xl [&_h2]:font-bold [&_h2]:mt-8 [&_h2]:mb-4 [&_h3]:text-xl [&_h3]:font-bold [&_h3]:mt-6 [&_h3]:mb-3 [&_p]:leading-relaxed [&_p]:text-muted-foreground [&_a]:text-primary [&_a]:no-underline hover:[&_a]:underline [&_ul]:list-disc [&_ul]:pr-6 [&_ol]:list-decimal [&_ol]:pr-6 [&_li]:my-1 [&_h2]:scroll-mt-24 [&_h3]:scroll-mt-24 [&_h4]:scroll-mt-24">
<article className="blog-content text-justify">
{segments.map((seg, i) =>
seg.type === "html" ? (
<div
@@ -148,8 +151,12 @@ export default async function BlogPostPage({ params }: BlogPostPageProps) {
/>
) : seg.blockType === "blockquote" ? (
<BlogBlockquote key={i} payload={seg.payload as BlockquoteBlockPayload} />
) : seg.blockType === "pullquote" ? (
<BlogPullquote key={i} payload={seg.payload as BlockquoteBlockPayload} />
) : seg.blockType === "tip" ? (
<BlogTip key={i} payload={seg.payload as TipBlockPayload} />
) : seg.blockType === "table" ? (
<BlogTable key={i} payload={seg.payload as TableBlockPayload} />
) : (
null
)
@@ -163,7 +170,7 @@ export default async function BlogPostPage({ params }: BlogPostPageProps) {
{relatedPosts.length > 0 && (
<section className="bg-background border-t pb-16 md:pb-20">
<div className="mx-auto max-w-6xl px-6 pt-10 md:pt-14">
<h2 className="text-xl md:text-2xl text-center mb-8 md:mb-10">
<h2 className={cn(type.h3, "mb-8 text-center md:mb-10")}>
مقالات مرتبط
</h2>
<div className="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-6 min-w-0">
+6 -4
View File
@@ -5,6 +5,8 @@ import { BlogPostCard } from "@/components/blog-post-card";
import { Button } from "@/components/ui/button";
import { Input } from "@/components/ui/input";
import { ChevronRight, ChevronLeft, Search, X } from "lucide-react";
import { type, typeSpacing } from "@/lib/typography";
import { cn } from "@/lib/utils";
const PER_PAGE = 9;
@@ -44,8 +46,8 @@ export default async function BlogPage({ searchParams }: BlogPageProps) {
return (
<section className="bg-background pt-32 pb-20 md:pt-40 md:pb-28">
<div className="mx-auto max-w-4xl px-6 text-center">
<h1 className="text-4xl font-bold md:text-5xl">بلاگ</h1>
<p className="mt-4 text-muted-foreground">
<h1 className={type.h1}>بلاگ</h1>
<p className={cn(type.body, "mt-4 text-muted-foreground")}>
در حال حاضر امکان بارگذاری مطالب وجود ندارد. لطفاً بعداً تلاش کنید.
</p>
</div>
@@ -72,10 +74,10 @@ export default async function BlogPage({ searchParams }: BlogPageProps) {
<div className="mx-auto max-w-3xl px-4 sm:px-6">
<div className="text-center space-y-5">
<div className="space-y-1.5">
<h1 className="text-3xl font-bold md:text-4xl tracking-tight">
<h1 className={type.h1}>
دانشنامه
</h1>
<p className="text-sm md:text-base text-muted-foreground max-w-xl mx-auto">
<p className={cn(type["body-sm"], "mx-auto max-w-xl text-muted-foreground md:text-base")}>
مقالات و مطالب فیپ در زمینه یکپارچه‌سازی، اتوماسیون و بهره‌وری سازمانی.
</p>
</div>