From e0afd470986491b98ccb6b251f2a7e714452f2dc Mon Sep 17 00:00:00 2001 From: ahmadrezabd Date: Sun, 8 Feb 2026 19:57:15 +0330 Subject: [PATCH 1/2] added all new chanes --- app/blog/[slug]/page.tsx | 546 --------------------------------------- app/blog/page.tsx | 99 ------- components/blog-card.tsx | 73 ------ components/header.tsx | 1 - components/pricing.tsx | 2 +- 5 files changed, 1 insertion(+), 720 deletions(-) delete mode 100644 app/blog/[slug]/page.tsx delete mode 100644 app/blog/page.tsx delete mode 100644 components/blog-card.tsx diff --git a/app/blog/[slug]/page.tsx b/app/blog/[slug]/page.tsx deleted file mode 100644 index 3bd4a5c..0000000 --- a/app/blog/[slug]/page.tsx +++ /dev/null @@ -1,546 +0,0 @@ -import { notFound } from "next/navigation"; -import Link from "next/link"; -import Image from "next/image"; -import { Calendar, Clock, ArrowRight, ArrowLeft } from "lucide-react"; -import { Button } from "@/components/ui/button"; - -// Blog posts data - placeholder content -export const blogPosts: Record< - string, - { - title: string; - content: string; - date: string; - readTime: string; - category: string; - image: string; - } -> = { - "system-integration-guide": { - title: "راهنمای جامع یکپارچه‌سازی سیستم‌ها: از صفر تا صد", - category: "یکپارچه‌سازی", - date: "۱۴۰۳/۰۹/۲۰", - readTime: "۱۲", - image: "/assets/main-pic/4section/Systems Integration.jpg", - content: ` -# راهنمای جامع یکپارچه‌سازی سیستم‌ها: از صفر تا صد - -یکپارچه‌سازی سیستم‌ها یکی از مهم‌ترین مفاهیم در دنیای فناوری اطلاعات و کسب‌وکارهای مدرن است. در این مقاله، به صورت کامل و جامع با این مفهوم آشنا می‌شوید. - -## مقدمه - -در دنیای امروز، کسب‌وکارها از سیستم‌های مختلفی استفاده می‌کنند: CRM، حسابداری، فروش، بازاریابی و... هر کدام از این سیستم‌ها به تنهایی کار می‌کنند، اما مشکل زمانی شروع می‌شود که بخواهیم این سیستم‌ها با یکدیگر ارتباط برقرار کنند. - -## یکپارچه‌سازی چیست؟ - -یکپارچه‌سازی سیستم‌ها به معنای اتصال نرم‌افزارها و سیستم‌های مختلف به یکدیگر است تا داده‌ها و اطلاعات به صورت خودکار و بدون دخالت انسان بین آن‌ها جابه‌جا شوند. - -### مزایای یکپارچه‌سازی - -- کاهش خطای انسانی -- صرفه‌جویی در وقت -- بهبود دقت داده‌ها -- افزایش بهره‌وری - -### چالش‌های پیش رو - -- پیچیدگی فنی -- هزینه‌های اولیه -- نیاز به تخصص -- امنیت اطلاعات - -## انواع یکپارچه‌سازی - -### یکپارچه‌سازی افقی - -این نوع یکپارچه‌سازی شامل اتصال سیستم‌های یک سطح در سازمان است. - -### یکپارچه‌سازی عمودی - -یکپارچه‌سازی عمودی شامل اتصال سیستم‌های مختلف سطوح سازمانی است. - -## نتیجه‌گیری - -یکپارچه‌سازی سیستم‌ها نه تنها یک نیاز، بلکه یک ضرورت برای کسب‌وکارهای مدرن است. با برنامه‌ریزی درست و انتخاب راهکار مناسب، می‌توانید از مزایای آن بهره‌مند شوید. - `, - }, - "automation-best-practices": { - title: "بهترین روش‌های اتوماسیون فرآیندهای کسب‌وکار", - category: "اتوماسیون", - date: "۱۴۰۳/۰۹/۱۵", - readTime: "۱۰", - image: "/assets/main-pic/4section/Process Automation.jpg", - content: ` -# بهترین روش‌های اتوماسیون فرآیندهای کسب‌وکار - -اتوماسیون فرآیندها یکی از مؤثرترین روش‌های بهبود عملکرد و افزایش بهره‌وری در کسب‌وکارهای مدرن است. - -## مقدمه - -در این مقاله، با بهترین روش‌ها و نکات مهم در زمینه اتوماسیون فرآیندهای کسب‌وکار آشنا می‌شوید. - -## اصول اتوماسیون موفق - -### شروع با فرآیندهای ساده - -همیشه بهتر است با فرآیندهای ساده و قابل پیش‌بینی شروع کنید. این کار به شما کمک می‌کند تا تجربه لازم را کسب کنید. - -### تمرکز بر ارزش - -قبل از اتوماسیون هر فرآیندی، مطمئن شوید که این کار ارزش اضافه می‌کند. - -### تست و بهبود مستمر - -اتوماسیون یک فرآیند یکباره نیست. باید به طور مستمر سیستم را تست و بهبود دهید. - -## نتیجه‌گیری - -با رعایت این اصول، می‌توانید فرآیندهای کسب‌وکار خود را به طور مؤثر اتوماسیون کنید. - `, - }, - "social-media-integration": { - title: "یکپارچه‌سازی شبکه‌های اجتماعی: راهنمای عملی", - category: "شبکه‌های اجتماعی", - date: "۱۴۰۳/۰۹/۱۰", - readTime: "۸", - image: "/assets/main-pic/4section/Interaction with Social Networks.jpg", - content: ` -# یکپارچه‌سازی شبکه‌های اجتماعی: راهنمای عملی - -یادگیری نحوه اتصال و مدیریت پلتفرم‌های مختلف شبکه‌های اجتماعی می‌تواند به شما کمک کند تا ارتباط مؤثرتری با مشتریان خود برقرار کنید. - -## مزایای یکپارچه‌سازی شبکه‌های اجتماعی - -- مدیریت متمرکز -- انتشار خودکار محتوا -- نظارت و تحلیل یکپارچه -- بهبود تعامل با مخاطبان - -## راهکارهای عملی - -در این بخش با روش‌های عملی یکپارچه‌سازی شبکه‌های اجتماعی آشنا می‌شوید. - `, - }, - "management-dashboards": { - title: "طراحی و پیاده‌سازی پنل‌های مدیریتی پیشرفته", - category: "مدیریت داده", - date: "۱۴۰۳/۰۹/۰۵", - readTime: "۹", - image: "/assets/main-pic/4section/Powerful Management panels.jpg", - content: ` -# طراحی و پیاده‌سازی پنل‌های مدیریتی پیشرفته - -پنل‌های مدیریتی قدرتمند به شما امکان می‌دهند تا داده‌های خود را به صورت مؤثر مدیریت و تحلیل کنید. - -## ویژگی‌های کلیدی - -پنل‌های مدیریتی پیشرفته باید دارای ویژگی‌های خاصی باشند تا بتوانند نیازهای کاربران را برطرف کنند. - -## طراحی UX/UI - -طراحی تجربه کاربری و رابط کاربری مناسب در موفقیت یک پنل مدیریتی بسیار مهم است. - `, - }, - "api-integration-fundamentals": { - title: "مبانی یکپارچه‌سازی API: راهنمای مبتدیان", - category: "توسعه", - date: "۱۴۰۳/۰۸/۲۸", - readTime: "۷", - image: "/assets/main-pic/4section/Systems Integration.jpg", - content: ` -# مبانی یکپارچه‌سازی API: راهنمای مبتدیان - -APIها پایه و اساس اتصال سیستم‌های مدرن هستند. در این مقاله با مفاهیم پایه آشنا می‌شوید. - -## API چیست؟ - -API یا رابط برنامه‌نویسی کاربردی، به برنامه‌ها اجازه می‌دهد تا با یکدیگر ارتباط برقرار کنند. - -## انواع API - -انواع مختلفی از API وجود دارد که هر کدام برای کاربردهای خاصی طراحی شده‌اند. - `, - }, - "workflow-automation": { - title: "خودکارسازی Workflow: از ایده تا اجرا", - category: "اتوماسیون", - date: "۱۴۰۳/۰۸/۲۰", - readTime: "۱۱", - image: "/assets/main-pic/4section/Process Automation.jpg", - content: ` -# خودکارسازی Workflow: از ایده تا اجرا - -یادگیری نحوه طراحی و پیاده‌سازی workflowهای خودکار می‌تواند به طور قابل توجهی کارایی کسب‌وکار شما را افزایش دهد. - -## مراحل طراحی Workflow - -1. شناسایی فرآیند -2. تحلیل نیازها -3. طراحی workflow -4. پیاده‌سازی -5. تست و بهبود - -## نتیجه‌گیری - -با رعایت این مراحل، می‌توانید workflowهای مؤثری برای کسب‌وکار خود طراحی کنید. - `, - }, -}; - -// Generate static params for all blog posts -export async function generateStaticParams() { - return Object.keys(blogPosts).map((slug) => ({ - slug: slug, - })); -} - -// Generate metadata for SEO -export async function generateMetadata({ - params, -}: { - params: Promise<{ slug: string }> | { slug: string }; -}) { - // Handle both sync and async params - const resolvedParams = - params instanceof Promise ? await params : await Promise.resolve(params); - const post = blogPosts[resolvedParams.slug]; - - if (!post) { - return { - title: "پست یافت نشد", - }; - } - - return { - title: post.title, - description: post.content.substring(0, 160), - }; -} - -export default async function BlogPostPage({ - params, -}: { - params: Promise<{ slug: string }> | { slug: string }; -}) { - // Handle both sync and async params (works with Next.js 13, 14, 15, 16) - const resolvedParams = - params instanceof Promise ? await params : await Promise.resolve(params); - const post = blogPosts[resolvedParams.slug]; - - if (!post) { - notFound(); - } - - return ( - <> - {/* Title Section */} -
-
-
- - - بازگشت به وبلاگ - - -
-
- - {post.category} - -
- -

- {post.title} -

- -
-
- - {post.date} -
-
- - {post.readTime} دقیقه مطالعه -
-
-
-
-
-
- - {/* Featured Image with 3:2 aspect ratio */} -
-
-
- {post.title} -
-
-
- - {/* Content Section */} -
-
-
-
- {(() => { - const lines = post.content.split("\n"); - const elements: JSX.Element[] = []; - let listItems: string[] = []; - let numberedListItems: string[] = []; - let isNumberedList = false; - - lines.forEach((line, index) => { - const trimmedLine = line.trim(); - - // Close lists if empty line - if (!trimmedLine) { - if (listItems.length > 0) { - elements.push( -
    - {listItems.map((item, i) => ( -
  • - {item} -
  • - ))} -
- ); - listItems = []; - } - if (numberedListItems.length > 0) { - elements.push( -
    - {numberedListItems.map((item, i) => ( -
  1. - {item} -
  2. - ))} -
- ); - numberedListItems = []; - isNumberedList = false; - } - return; - } - - // Process numbered lists - if (/^\d+\.\s/.test(trimmedLine)) { - const content = trimmedLine.replace(/^\d+\.\s/, ""); - // Close bullet list if exists - if (listItems.length > 0) { - elements.push( -
    - {listItems.map((item, i) => ( -
  • - {item} -
  • - ))} -
- ); - listItems = []; - } - numberedListItems.push(content); - isNumberedList = true; - return; - } - - // Process bullet lists - if ( - trimmedLine.startsWith("• ") || - trimmedLine.startsWith("- ") || - trimmedLine.startsWith("* ") - ) { - const content = trimmedLine.substring(2); - // Close numbered list if exists - if (numberedListItems.length > 0) { - elements.push( -
    - {numberedListItems.map((item, i) => ( -
  1. - {item} -
  2. - ))} -
- ); - numberedListItems = []; - isNumberedList = false; - } - listItems.push(content); - return; - } - - // Close lists before other content - if (listItems.length > 0) { - elements.push( -
    - {listItems.map((item, i) => ( -
  • - {item} -
  • - ))} -
- ); - listItems = []; - } - if (numberedListItems.length > 0) { - elements.push( -
    - {numberedListItems.map((item, i) => ( -
  1. - {item} -
  2. - ))} -
- ); - numberedListItems = []; - isNumberedList = false; - } - - // Process headings - if (trimmedLine.startsWith("# ")) { - elements.push( -

- {trimmedLine.substring(2)} -

- ); - return; - } - if (trimmedLine.startsWith("## ")) { - elements.push( -

- {trimmedLine.substring(3)} -

- ); - return; - } - if (trimmedLine.startsWith("### ")) { - elements.push( -

- {trimmedLine.substring(4)} -

- ); - return; - } - - // Process links - if (trimmedLine.startsWith("[") && trimmedLine.includes("](")) { - const match = trimmedLine.match(/\[([^\]]+)\]\(([^)]+)\)/); - if (match) { - elements.push( -

- - {match[1]} - -

- ); - return; - } - } - - // Process regular text - elements.push( -

- {trimmedLine} -

- ); - }); - - // Close any remaining lists - if (listItems.length > 0) { - elements.push( -
    - {listItems.map((item, i) => ( -
  • - {item} -
  • - ))} -
- ); - } - if (numberedListItems.length > 0) { - elements.push( -
    - {numberedListItems.map((item, i) => ( -
  1. - {item} -
  2. - ))} -
- ); - } - - return elements; - })()} -
-
-
-
- - {/* Back to Blog */} -
-
-
- -
-
-
- - ); -} - diff --git a/app/blog/page.tsx b/app/blog/page.tsx deleted file mode 100644 index 3679c1c..0000000 --- a/app/blog/page.tsx +++ /dev/null @@ -1,99 +0,0 @@ -import { BlogCard } from "@/components/blog-card"; - -// Blog posts data - placeholder content -const blogPosts = [ - { - slug: "system-integration-guide", - title: "راهنمای جامع یکپارچه‌سازی سیستم‌ها: از صفر تا صد", - excerpt: - "در این مقاله، به بررسی جامع فرآیند یکپارچه‌سازی سیستم‌ها می‌پردازیم. از تعاریف پایه تا روش‌های پیشرفته و بهترین روش‌های پیاده‌سازی را پوشش می‌دهیم.", - date: "۱۴۰۳/۰۹/۲۰", - readTime: "۱۲", - category: "یکپارچه‌سازی", - image: "/assets/main-pic/4section/Systems Integration.jpg", - }, - { - slug: "automation-best-practices", - title: "بهترین روش‌های اتوماسیون فرآیندهای کسب‌وکار", - excerpt: - "اتوماسیون فرآیندها یکی از کلیدی‌ترین راهکارهای بهبود بهره‌وری در کسب‌وکارها است. در این مقاله با اصول، چالش‌ها و راهکارهای عملی آشنا می‌شوید.", - date: "۱۴۰۳/۰۹/۱۵", - readTime: "۱۰", - category: "اتوماسیون", - image: "/assets/main-pic/4section/Process Automation.jpg", - }, - { - slug: "social-media-integration", - title: "یکپارچه‌سازی شبکه‌های اجتماعی: راهنمای عملی", - excerpt: - "یادگیری نحوه اتصال و مدیریت پلتفرم‌های مختلف شبکه‌های اجتماعی می‌تواند به شما کمک کند تا ارتباط مؤثرتری با مشتریان خود برقرار کنید.", - date: "۱۴۰۳/۰۹/۱۰", - readTime: "۸", - category: "شبکه‌های اجتماعی", - image: "/assets/main-pic/4section/Interaction with Social Networks.jpg", - }, - { - slug: "management-dashboards", - title: "طراحی و پیاده‌سازی پنل‌های مدیریتی پیشرفته", - excerpt: - "پنل‌های مدیریتی قدرتمند به شما امکان می‌دهند تا داده‌های خود را به صورت مؤثر مدیریت و تحلیل کنید. در این مقاله ویژگی‌های کلیدی را بررسی می‌کنیم.", - date: "۱۴۰۳/۰۹/۰۵", - readTime: "۹", - category: "مدیریت داده", - image: "/assets/main-pic/4section/Powerful Management panels.jpg", - }, - { - slug: "api-integration-fundamentals", - title: "مبانی یکپارچه‌سازی API: راهنمای مبتدیان", - excerpt: - "APIها پایه و اساس اتصال سیستم‌های مدرن هستند. در این مقاله با مفاهیم پایه، انواع APIها و نحوه استفاده از آن‌ها آشنا می‌شوید.", - date: "۱۴۰۳/۰۸/۲۸", - readTime: "۷", - category: "توسعه", - image: "/assets/main-pic/4section/Systems Integration.jpg", - }, - { - slug: "workflow-automation", - title: "خودکارسازی Workflow: از ایده تا اجرا", - excerpt: - "یادگیری نحوه طراحی و پیاده‌سازی workflowهای خودکار می‌تواند به طور قابل توجهی کارایی کسب‌وکار شما را افزایش دهد.", - date: "۱۴۰۳/۰۸/۲۰", - readTime: "۱۱", - category: "اتوماسیون", - image: "/assets/main-pic/4section/Process Automation.jpg", - }, -]; - -export default function BlogPage() { - return ( - <> - {/* Hero Section */} -
-
-
-

- وبلاگ -

-

- آخرین مقالات، راهنماها و نکات مفید در زمینه یکپارچه‌سازی، اتوماسیون و مدیریت سیستم‌ها -

-
-
-
- - {/* Blog Posts Grid */} -
-
-
- {blogPosts.map((post) => ( - - ))} -
-
-
- - ); -} - - - diff --git a/components/blog-card.tsx b/components/blog-card.tsx deleted file mode 100644 index 3fe8bcb..0000000 --- a/components/blog-card.tsx +++ /dev/null @@ -1,73 +0,0 @@ -import Link from "next/link"; -import Image from "next/image"; -import { Calendar, Clock, ArrowLeft } from "lucide-react"; -import { Card, CardContent, CardFooter, CardHeader } from "@/components/ui/card"; - -interface BlogCardProps { - slug: string; - title: string; - excerpt: string; - date: string; - readTime: string; - category: string; - image: string; -} - -export function BlogCard({ - slug, - title, - excerpt, - date, - readTime, - category, - image, -}: BlogCardProps) { - return ( - - - {/* Image with 3:2 aspect ratio */} -
- {title} - {/* Category Badge */} -
- - {category} - -
-
- - -

- {title} -

-
- - -

- {excerpt} -

-
- - -
- - {date} -
-
- - {readTime} دقیقه -
-
-
- - ); -} - - - diff --git a/components/header.tsx b/components/header.tsx index e056a0f..6696287 100644 --- a/components/header.tsx +++ b/components/header.tsx @@ -12,7 +12,6 @@ const menuItems = [ { name: 'درباره ما', href: '/about' }, { name: 'راه حل‌ها', href: '/solutions' }, { name: 'قیمت‌گذاری', href: '/pricing' }, - { name: 'وبلاگ', href: '/blog' }, ] export const HeroHeader = () => { diff --git a/components/pricing.tsx b/components/pricing.tsx index 848a1c4..e874e5f 100644 --- a/components/pricing.tsx +++ b/components/pricing.tsx @@ -18,7 +18,7 @@ export default function Pricing() {

راه‌حل‌های ما از ۲ میلیون تومان شروع می‌شوند و بر اساس نیازهای دقیق شما محاسبه می‌گردند. -

+

From ff2632f8db9eda6fe4cbdad798bec1239d16cae0 Mon Sep 17 00:00:00 2001 From: "alirez.br" Date: Wed, 17 Jun 2026 21:35:35 +0330 Subject: [PATCH 2/2] feat: enhance image handling and layout adjustments - Added image quality settings and device sizes in next.config.ts for better image optimization. - Updated package dependencies, including cheerio and baseline-browser-mapping. - Improved global styles for blog content images to ensure responsiveness. - Refactored button components for consistent sizing and styling across the application. - Enhanced blog post card layout with new variants and improved author name formatting. - Adjusted hero section and content layout for better visual appeal and user experience. --- app/about/page.tsx | 21 +- app/globals.css | 5 + app/page.tsx | 1 - components/blog-blockquote.tsx | 2 +- components/blog-post-card.tsx | 58 +- components/blog-post-meta.tsx | 2 - components/blog-pullquote.tsx | 2 +- components/content-1.tsx | 23 +- components/features-12.tsx | 90 ++- components/hero-section.tsx | 129 ++-- components/login-form.tsx | 11 +- components/pricing.tsx | 4 +- components/scroll-to-top.tsx | 4 +- components/theme-toggle.tsx | 6 +- components/ui/border-beam.tsx | 2 +- components/ui/button.tsx | 22 +- components/ui/logo-item.tsx | 44 +- lib/blog-blocks.ts | 209 +++++- lib/blog-utils.ts | 31 +- lib/wp-api.ts | 10 +- next.config.ts | 2 + package-lock.json | 306 +++++++- package.json | 3 +- public/assets/Echosystem.png | Bin 2174159 -> 0 bytes public/assets/Feeplogo.svg | 7 - .../Interaction with Social networks.png | Bin 462751 -> 0 bytes public/assets/Powerful management panels.png | Bin 431486 -> 0 bytes public/assets/Process automation.png | Bin 487302 -> 0 bytes public/assets/Systems integration.jpg | Bin 121024 -> 0 bytes public/assets/flogo-1.png | Bin 8373 -> 0 bytes public/assets/hero-integration.png.png | Bin 1664527 -> 0 bytes public/assets/integrate.png | Bin 124865 -> 0 bytes public/assets/integrationSoftware.png | Bin 1265794 -> 0 bytes public/assets/main-pic/1.jpg | Bin 0 -> 120983 bytes public/assets/main-pic/1dark.jpg | Bin 0 -> 137380 bytes .../Interaction with Social Networks.jpg | Bin 55224 -> 64257 bytes .../Interaction with Social Networks_dark.jpg | Bin 0 -> 81079 bytes .../Powerful Management panels-dark.jpg | Bin 0 -> 66546 bytes .../4section/Powerful Management panels.jpg | Bin 74324 -> 54052 bytes .../4section/Process Automation-dark.jpg | Bin 0 -> 74443 bytes .../main-pic/4section/Process Automation.jpg | Bin 61961 -> 72166 bytes .../4section/Systems Integration-dark.jpg | Bin 0 -> 82329 bytes .../main-pic/4section/Systems Integration.jpg | Bin 115713 -> 67718 bytes ...telligent-workflow-control-center-dark.jpg | Bin 0 -> 63174 bytes .../intelligent-workflow-control-center.jpg | Bin 0 -> 61336 bytes public/assets/night-background.webp | Bin 946584 -> 0 bytes yarn.lock | 704 ++++++------------ 47 files changed, 1050 insertions(+), 648 deletions(-) delete mode 100644 public/assets/Echosystem.png delete mode 100644 public/assets/Feeplogo.svg delete mode 100644 public/assets/Interaction with Social networks.png delete mode 100644 public/assets/Powerful management panels.png delete mode 100644 public/assets/Process automation.png delete mode 100644 public/assets/Systems integration.jpg delete mode 100644 public/assets/flogo-1.png delete mode 100644 public/assets/hero-integration.png.png delete mode 100644 public/assets/integrate.png delete mode 100644 public/assets/integrationSoftware.png create mode 100644 public/assets/main-pic/1.jpg create mode 100644 public/assets/main-pic/1dark.jpg create mode 100644 public/assets/main-pic/4section/Interaction with Social Networks_dark.jpg create mode 100644 public/assets/main-pic/4section/Powerful Management panels-dark.jpg create mode 100644 public/assets/main-pic/4section/Process Automation-dark.jpg create mode 100644 public/assets/main-pic/4section/Systems Integration-dark.jpg create mode 100644 public/assets/main-pic/intelligent-workflow-control-center-dark.jpg create mode 100644 public/assets/main-pic/intelligent-workflow-control-center.jpg delete mode 100644 public/assets/night-background.webp 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 ? (
- — {citation} + {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 (