diff --git a/app/about/page.tsx b/app/about/page.tsx index f15096e..f18405f 100644 --- a/app/about/page.tsx +++ b/app/about/page.tsx @@ -1,3 +1,6 @@ +import { Button } from "@/components/ui/button"; +import Link from "next/link"; + export default function AboutPage() { return ( <> @@ -242,18 +245,12 @@ export default function AboutPage() { با ما تماس بگیرید تا درباره نیازهای شما صحبت کنیم و بهترین راهکار را پیشنهاد دهیم

- - مشاهده قیمت‌ها - - - تماس با ما - + +
diff --git a/app/globals.css b/app/globals.css index 5f16bc1..7e75f14 100644 --- a/app/globals.css +++ b/app/globals.css @@ -295,4 +295,9 @@ .wp-block-image { @apply rounded-md overflow-hidden shadow-sm; +} + +.blog-content img { + @apply w-full h-auto; + image-rendering: auto; } \ No newline at end of file diff --git a/app/page.tsx b/app/page.tsx index 05292d0..c983ed9 100644 --- a/app/page.tsx +++ b/app/page.tsx @@ -1,7 +1,6 @@ import ContentSection from "@/components/content-1"; import Features from "@/components/features-12"; import HeroSection from "@/components/hero-section"; -import Image from "next/image"; export default function Home() { return ( diff --git a/components/blog-blockquote.tsx b/components/blog-blockquote.tsx index 9315b23..c16eb62 100644 --- a/components/blog-blockquote.tsx +++ b/components/blog-blockquote.tsx @@ -25,7 +25,7 @@ export function BlogBlockquote({ payload }: BlogBlockquoteProps) { {citation ? ( ) : null} diff --git a/components/blog-post-card.tsx b/components/blog-post-card.tsx index f1b35bc..daf9534 100644 --- a/components/blog-post-card.tsx +++ b/components/blog-post-card.tsx @@ -4,12 +4,13 @@ import { ImageIcon, User } from "lucide-react"; import { Card, CardHeader, CardTitle, CardContent } from "@/components/ui/card"; import { getFeaturedImageUrl, type WpPost } from "@/lib/wp-api"; import { formatDateShamsi } from "@/lib/format-date"; +import { formatAuthorName } from "@/lib/blog-utils"; function stripHtml(html: string): string { return html.replace(/<[^>]*>/g, "").trim(); } -type BlogPostCardVariant = "default" | "tiny"; +type BlogPostCardVariant = "default" | "tiny" | "related"; export function BlogPostCard({ post, @@ -20,9 +21,57 @@ export function BlogPostCard({ }) { const excerpt = stripHtml(post.excerpt.rendered) || stripHtml(post.content.rendered).slice(0, 160); const modifiedDate = post.modified ? formatDateShamsi(post.modified) : null; - const authorName = post._embedded?.author?.[0]?.name ?? null; + const authorName = formatAuthorName(post._embedded?.author?.[0]?.name); const thumbnailUrl = getFeaturedImageUrl(post, "full"); + if (variant === "related") { + return ( + + + + {thumbnailUrl ? ( +
+ +
+ ) : ( +
+ +
+ )} +
+

+ {post.title.rendered} +

+
+ {authorName && ( + + + {authorName} + + )} + {modifiedDate && ( + + )} +
+
+
+
+ + ); + } + if (variant === "tiny") { return ( @@ -35,7 +84,8 @@ export function BlogPostCard({ alt="" fill className="object-cover" - sizes="(max-width: 640px) 100vw, (max-width: 1024px) 50vw, 33vw" + quality={100} + sizes="(max-width: 640px) 100vw, (max-width: 1024px) 50vw, 400px" /> ) : ( @@ -82,7 +132,7 @@ export function BlogPostCard({ className="object-cover" quality={100} priority - sizes="(max-width: 640px) 100vw, (max-width: 1024px) 50vw, 350px" + sizes="(max-width: 640px) 100vw, (max-width: 1024px) 50vw, 400px" /> ) : ( diff --git a/components/blog-post-meta.tsx b/components/blog-post-meta.tsx index 00a956e..d07d486 100644 --- a/components/blog-post-meta.tsx +++ b/components/blog-post-meta.tsx @@ -140,7 +140,6 @@ export function BlogPostMeta({ @@ -72,11 +69,7 @@ export function LoginForm({ یا ادامه با - - diff --git a/components/scroll-to-top.tsx b/components/scroll-to-top.tsx index 157226c..a05e2cf 100644 --- a/components/scroll-to-top.tsx +++ b/components/scroll-to-top.tsx @@ -41,11 +41,11 @@ export function ScrollToTop({ className }: { className?: string }) { )} > diff --git a/components/theme-toggle.tsx b/components/theme-toggle.tsx index 38f8aca..7355ae3 100644 --- a/components/theme-toggle.tsx +++ b/components/theme-toggle.tsx @@ -18,8 +18,7 @@ export function ThemeToggle() { return (