From ff2632f8db9eda6fe4cbdad798bec1239d16cae0 Mon Sep 17 00:00:00 2001 From: "alirez.br" Date: Wed, 17 Jun 2026 21:35:35 +0330 Subject: [PATCH] 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 ? ( ) : 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 (