diff --git a/next.config.ts b/next.config.ts index e9ffa30..f0aa4ec 100644 --- a/next.config.ts +++ b/next.config.ts @@ -1,7 +1,13 @@ import type { NextConfig } from "next"; const nextConfig: NextConfig = { - /* config options here */ + images: { + remotePatterns: [ + { protocol: "https", hostname: "c804387.parspack.net" }, + { protocol: "https", hostname: "cdn.meshkee.com" }, + { protocol: "https", hostname: "meshkee-storage.sas.amin.parminstorage.ir" }, + ], + }, }; export default nextConfig; diff --git a/public/favicon.png b/public/favicon.png new file mode 100644 index 0000000..170f3c8 Binary files /dev/null and b/public/favicon.png differ diff --git a/public/fonts/peyda-bold.ttf b/public/fonts/peyda-bold.ttf new file mode 100644 index 0000000..4307bb0 Binary files /dev/null and b/public/fonts/peyda-bold.ttf differ diff --git a/public/fonts/peyda-medium.ttf b/public/fonts/peyda-medium.ttf new file mode 100644 index 0000000..632660d Binary files /dev/null and b/public/fonts/peyda-medium.ttf differ diff --git a/public/fonts/peyda-regular.ttf b/public/fonts/peyda-regular.ttf new file mode 100644 index 0000000..a079214 Binary files /dev/null and b/public/fonts/peyda-regular.ttf differ diff --git a/public/fonts/peyda-semibold.ttf b/public/fonts/peyda-semibold.ttf new file mode 100644 index 0000000..005703f Binary files /dev/null and b/public/fonts/peyda-semibold.ttf differ diff --git a/public/images/articles/a01.jpg b/public/images/articles/a01.jpg new file mode 100644 index 0000000..da18e6e Binary files /dev/null and b/public/images/articles/a01.jpg differ diff --git a/public/images/articles/a02.jpg b/public/images/articles/a02.jpg new file mode 100644 index 0000000..db8c1bf Binary files /dev/null and b/public/images/articles/a02.jpg differ diff --git a/public/images/articles/a03.jpg b/public/images/articles/a03.jpg new file mode 100644 index 0000000..4f00e73 Binary files /dev/null and b/public/images/articles/a03.jpg differ diff --git a/public/images/articles/a04.jpg b/public/images/articles/a04.jpg new file mode 100644 index 0000000..09761e0 Binary files /dev/null and b/public/images/articles/a04.jpg differ diff --git a/public/images/articles/a05.jpg b/public/images/articles/a05.jpg new file mode 100644 index 0000000..40cc83c Binary files /dev/null and b/public/images/articles/a05.jpg differ diff --git a/public/images/articles/a06.jpg b/public/images/articles/a06.jpg new file mode 100644 index 0000000..a94cf7f Binary files /dev/null and b/public/images/articles/a06.jpg differ diff --git a/public/images/articles/a07.jpg b/public/images/articles/a07.jpg new file mode 100644 index 0000000..55c1520 Binary files /dev/null and b/public/images/articles/a07.jpg differ diff --git a/public/images/articles/a08.jpg b/public/images/articles/a08.jpg new file mode 100644 index 0000000..87d9550 Binary files /dev/null and b/public/images/articles/a08.jpg differ diff --git a/public/images/articles/a09.jpg b/public/images/articles/a09.jpg new file mode 100644 index 0000000..6476ff3 Binary files /dev/null and b/public/images/articles/a09.jpg differ diff --git a/public/images/articles/a10.jpg b/public/images/articles/a10.jpg new file mode 100644 index 0000000..dd76c2d Binary files /dev/null and b/public/images/articles/a10.jpg differ diff --git a/public/images/articles/a11.jpg b/public/images/articles/a11.jpg new file mode 100644 index 0000000..3b03659 Binary files /dev/null and b/public/images/articles/a11.jpg differ diff --git a/public/images/articles/a12.jpg b/public/images/articles/a12.jpg new file mode 100644 index 0000000..ee905a5 Binary files /dev/null and b/public/images/articles/a12.jpg differ diff --git a/public/images/articles/a13.jpg b/public/images/articles/a13.jpg new file mode 100644 index 0000000..d746844 Binary files /dev/null and b/public/images/articles/a13.jpg differ diff --git a/public/images/articles/a14.jpg b/public/images/articles/a14.jpg new file mode 100644 index 0000000..d9e75ee Binary files /dev/null and b/public/images/articles/a14.jpg differ diff --git a/public/images/articles/a15.jpg b/public/images/articles/a15.jpg new file mode 100644 index 0000000..4c4e399 Binary files /dev/null and b/public/images/articles/a15.jpg differ diff --git a/public/images/banners/discount-graphic.png b/public/images/banners/discount-graphic.png new file mode 100644 index 0000000..4bf8c79 Binary files /dev/null and b/public/images/banners/discount-graphic.png differ diff --git a/public/images/banners/discount.jpg b/public/images/banners/discount.jpg new file mode 100644 index 0000000..1a36af8 Binary files /dev/null and b/public/images/banners/discount.jpg differ diff --git a/public/images/banners/hero.jpg b/public/images/banners/hero.jpg new file mode 100644 index 0000000..a5a78b4 Binary files /dev/null and b/public/images/banners/hero.jpg differ diff --git a/public/images/banners/mid-1.jpg b/public/images/banners/mid-1.jpg new file mode 100644 index 0000000..54efa48 Binary files /dev/null and b/public/images/banners/mid-1.jpg differ diff --git a/public/images/banners/mid-2.jpg b/public/images/banners/mid-2.jpg new file mode 100644 index 0000000..4a807c9 Binary files /dev/null and b/public/images/banners/mid-2.jpg differ diff --git a/public/images/banners/side-chicks.jpg b/public/images/banners/side-chicks.jpg new file mode 100644 index 0000000..b6ff102 Binary files /dev/null and b/public/images/banners/side-chicks.jpg differ diff --git a/public/images/banners/side-eggs.jpg b/public/images/banners/side-eggs.jpg new file mode 100644 index 0000000..1d096a1 Binary files /dev/null and b/public/images/banners/side-eggs.jpg differ diff --git a/public/images/banners/trust-bg.jpg b/public/images/banners/trust-bg.jpg new file mode 100644 index 0000000..11c7130 Binary files /dev/null and b/public/images/banners/trust-bg.jpg differ diff --git a/public/images/icons/about-chick.png b/public/images/icons/about-chick.png new file mode 100644 index 0000000..78cfcd0 Binary files /dev/null and b/public/images/icons/about-chick.png differ diff --git a/public/images/icons/about-egg.png b/public/images/icons/about-egg.png new file mode 100644 index 0000000..82b07f8 Binary files /dev/null and b/public/images/icons/about-egg.png differ diff --git a/public/images/icons/about-export.png b/public/images/icons/about-export.png new file mode 100644 index 0000000..8809a34 Binary files /dev/null and b/public/images/icons/about-export.png differ diff --git a/public/images/icons/about-incubator.png b/public/images/icons/about-incubator.png new file mode 100644 index 0000000..23c69ad Binary files /dev/null and b/public/images/icons/about-incubator.png differ diff --git a/public/images/icons/articles.png b/public/images/icons/articles.png new file mode 100644 index 0000000..146949f Binary files /dev/null and b/public/images/icons/articles.png differ diff --git a/public/images/icons/bag.png b/public/images/icons/bag.png new file mode 100644 index 0000000..b638a53 Binary files /dev/null and b/public/images/icons/bag.png differ diff --git a/public/images/icons/bestsellers.png b/public/images/icons/bestsellers.png new file mode 100644 index 0000000..73547bf Binary files /dev/null and b/public/images/icons/bestsellers.png differ diff --git a/public/images/icons/cat-chick.png b/public/images/icons/cat-chick.png new file mode 100644 index 0000000..78cfcd0 Binary files /dev/null and b/public/images/icons/cat-chick.png differ diff --git a/public/images/icons/cat-egg.png b/public/images/icons/cat-egg.png new file mode 100644 index 0000000..23c69ad Binary files /dev/null and b/public/images/icons/cat-egg.png differ diff --git a/public/images/icons/cat-feed.png b/public/images/icons/cat-feed.png new file mode 100644 index 0000000..ca07fc0 Binary files /dev/null and b/public/images/icons/cat-feed.png differ diff --git a/public/images/icons/cat-incubator.png b/public/images/icons/cat-incubator.png new file mode 100644 index 0000000..8809a34 Binary files /dev/null and b/public/images/icons/cat-incubator.png differ diff --git a/public/images/icons/products.png b/public/images/icons/products.png new file mode 100644 index 0000000..73547bf Binary files /dev/null and b/public/images/icons/products.png differ diff --git a/public/images/icons/trust-1.png b/public/images/icons/trust-1.png new file mode 100644 index 0000000..c9af118 Binary files /dev/null and b/public/images/icons/trust-1.png differ diff --git a/public/images/icons/trust-2.png b/public/images/icons/trust-2.png new file mode 100644 index 0000000..73a0deb Binary files /dev/null and b/public/images/icons/trust-2.png differ diff --git a/public/images/icons/trust-3.png b/public/images/icons/trust-3.png new file mode 100644 index 0000000..bea2a9a Binary files /dev/null and b/public/images/icons/trust-3.png differ diff --git a/public/images/icons/trust-4.png b/public/images/icons/trust-4.png new file mode 100644 index 0000000..8a3c897 Binary files /dev/null and b/public/images/icons/trust-4.png differ diff --git a/public/images/icons/trust-5.png b/public/images/icons/trust-5.png new file mode 100644 index 0000000..1094ee6 Binary files /dev/null and b/public/images/icons/trust-5.png differ diff --git a/public/images/logo-footer.png b/public/images/logo-footer.png new file mode 100644 index 0000000..9b53fe0 Binary files /dev/null and b/public/images/logo-footer.png differ diff --git a/public/images/logo.png b/public/images/logo.png new file mode 100644 index 0000000..006f639 Binary files /dev/null and b/public/images/logo.png differ diff --git a/public/images/pages/about-back.png b/public/images/pages/about-back.png new file mode 100644 index 0000000..bc64296 Binary files /dev/null and b/public/images/pages/about-back.png differ diff --git a/public/images/pages/about-front.png b/public/images/pages/about-front.png new file mode 100644 index 0000000..2b7514f Binary files /dev/null and b/public/images/pages/about-front.png differ diff --git a/public/images/pages/about-hero.jpg b/public/images/pages/about-hero.jpg new file mode 100644 index 0000000..c2098e3 Binary files /dev/null and b/public/images/pages/about-hero.jpg differ diff --git a/public/images/pages/contact-hero.jpg b/public/images/pages/contact-hero.jpg new file mode 100644 index 0000000..c2098e3 Binary files /dev/null and b/public/images/pages/contact-hero.jpg differ diff --git a/public/images/products/b01.jpg b/public/images/products/b01.jpg new file mode 100644 index 0000000..f90e57d Binary files /dev/null and b/public/images/products/b01.jpg differ diff --git a/public/images/products/b02.jpg b/public/images/products/b02.jpg new file mode 100644 index 0000000..3577be5 Binary files /dev/null and b/public/images/products/b02.jpg differ diff --git a/public/images/products/b03.jpg b/public/images/products/b03.jpg new file mode 100644 index 0000000..119cb88 Binary files /dev/null and b/public/images/products/b03.jpg differ diff --git a/public/images/products/e01.jpg b/public/images/products/e01.jpg new file mode 100644 index 0000000..3b9736d Binary files /dev/null and b/public/images/products/e01.jpg differ diff --git a/public/images/products/e02.jpg b/public/images/products/e02.jpg new file mode 100644 index 0000000..359e0bc Binary files /dev/null and b/public/images/products/e02.jpg differ diff --git a/public/images/products/e03.jpg b/public/images/products/e03.jpg new file mode 100644 index 0000000..d22a0ac Binary files /dev/null and b/public/images/products/e03.jpg differ diff --git a/public/images/products/e04.jpg b/public/images/products/e04.jpg new file mode 100644 index 0000000..44baa36 Binary files /dev/null and b/public/images/products/e04.jpg differ diff --git a/public/images/products/e05.jpg b/public/images/products/e05.jpg new file mode 100644 index 0000000..6064dd4 Binary files /dev/null and b/public/images/products/e05.jpg differ diff --git a/public/images/products/e06.jpg b/public/images/products/e06.jpg new file mode 100644 index 0000000..84f4432 Binary files /dev/null and b/public/images/products/e06.jpg differ diff --git a/public/images/products/p01.jpg b/public/images/products/p01.jpg new file mode 100644 index 0000000..406e947 Binary files /dev/null and b/public/images/products/p01.jpg differ diff --git a/public/images/products/p02.jpg b/public/images/products/p02.jpg new file mode 100644 index 0000000..c63fcd8 Binary files /dev/null and b/public/images/products/p02.jpg differ diff --git a/public/images/products/p03.jpg b/public/images/products/p03.jpg new file mode 100644 index 0000000..1c6e932 Binary files /dev/null and b/public/images/products/p03.jpg differ diff --git a/public/images/products/p04.jpg b/public/images/products/p04.jpg new file mode 100644 index 0000000..e438738 Binary files /dev/null and b/public/images/products/p04.jpg differ diff --git a/public/images/products/p05.jpg b/public/images/products/p05.jpg new file mode 100644 index 0000000..9872af1 Binary files /dev/null and b/public/images/products/p05.jpg differ diff --git a/public/images/products/p06.jpg b/public/images/products/p06.jpg new file mode 100644 index 0000000..2bd9b64 Binary files /dev/null and b/public/images/products/p06.jpg differ diff --git a/public/images/products/p07.jpg b/public/images/products/p07.jpg new file mode 100644 index 0000000..6ac1bcc Binary files /dev/null and b/public/images/products/p07.jpg differ diff --git a/public/images/products/p08.jpg b/public/images/products/p08.jpg new file mode 100644 index 0000000..6722945 Binary files /dev/null and b/public/images/products/p08.jpg differ diff --git a/public/images/products/p09.jpg b/public/images/products/p09.jpg new file mode 100644 index 0000000..0cd5bc5 Binary files /dev/null and b/public/images/products/p09.jpg differ diff --git a/public/images/products/p10.jpg b/public/images/products/p10.jpg new file mode 100644 index 0000000..bca4347 Binary files /dev/null and b/public/images/products/p10.jpg differ diff --git a/public/images/products/p11.jpg b/public/images/products/p11.jpg new file mode 100644 index 0000000..b47dedc Binary files /dev/null and b/public/images/products/p11.jpg differ diff --git a/public/images/products/p12.jpg b/public/images/products/p12.jpg new file mode 100644 index 0000000..5551e39 Binary files /dev/null and b/public/images/products/p12.jpg differ diff --git a/public/images/products/p13.jpg b/public/images/products/p13.jpg new file mode 100644 index 0000000..1214a01 Binary files /dev/null and b/public/images/products/p13.jpg differ diff --git a/public/images/products/p14.jpg b/public/images/products/p14.jpg new file mode 100644 index 0000000..c269d54 Binary files /dev/null and b/public/images/products/p14.jpg differ diff --git a/public/images/products/p15.jpg b/public/images/products/p15.jpg new file mode 100644 index 0000000..8df1582 Binary files /dev/null and b/public/images/products/p15.jpg differ diff --git a/public/images/products/p16.jpg b/public/images/products/p16.jpg new file mode 100644 index 0000000..534b2be Binary files /dev/null and b/public/images/products/p16.jpg differ diff --git a/public/images/products/p17.jpg b/public/images/products/p17.jpg new file mode 100644 index 0000000..2b5b24f Binary files /dev/null and b/public/images/products/p17.jpg differ diff --git a/public/images/products/p18.jpg b/public/images/products/p18.jpg new file mode 100644 index 0000000..b58f9a8 Binary files /dev/null and b/public/images/products/p18.jpg differ diff --git a/public/images/products/p19.jpg b/public/images/products/p19.jpg new file mode 100644 index 0000000..e55c4eb Binary files /dev/null and b/public/images/products/p19.jpg differ diff --git a/public/images/products/p20.jpg b/public/images/products/p20.jpg new file mode 100644 index 0000000..dbaa13b Binary files /dev/null and b/public/images/products/p20.jpg differ diff --git a/public/images/products/p21.jpg b/public/images/products/p21.jpg new file mode 100644 index 0000000..4f292ea Binary files /dev/null and b/public/images/products/p21.jpg differ diff --git a/public/images/products/p22.jpg b/public/images/products/p22.jpg new file mode 100644 index 0000000..8ad79af Binary files /dev/null and b/public/images/products/p22.jpg differ diff --git a/public/images/products/p23.jpg b/public/images/products/p23.jpg new file mode 100644 index 0000000..b46e288 Binary files /dev/null and b/public/images/products/p23.jpg differ diff --git a/public/images/products/p24.jpg b/public/images/products/p24.jpg new file mode 100644 index 0000000..c118596 Binary files /dev/null and b/public/images/products/p24.jpg differ diff --git a/src/app/about/page.tsx b/src/app/about/page.tsx new file mode 100644 index 0000000..67cfbcd --- /dev/null +++ b/src/app/about/page.tsx @@ -0,0 +1,98 @@ +import type { Metadata } from "next"; +import Image from "next/image"; +import Link from "next/link"; +import { PageHero } from "@/components/PageHero"; +import { TrustBar } from "@/components/TrustBar"; +import { aboutCategories, aboutContent, site } from "@/data/site"; + +export const metadata: Metadata = { + title: `درباره ما | ${site.name}`, + description: site.about, +}; + +export default function AboutPage() { + return ( + <> + + +
+
+

{aboutContent.introTitle}

+

+ {aboutContent.introLead} +

+
+ {aboutContent.story.map((paragraph) => ( +

{paragraph}

+ ))} +
+ + همین حالا با ما تماس بگیرید ‹ + +
+
+ {site.name} + +
+
+ +
+
+
+

{site.name}

+

{site.about}

+
+
+

{aboutContent.historyTitle}

+

{aboutContent.history}

+
+
+
+ +
+
+

محصولات ما

+

محصولات با کیفیت و متنوع

+
+
+ {aboutCategories.map((item) => ( + + +

{item.title}

+

{item.subtitle}

+ + ))} +
+
+ + + + ); +} diff --git a/src/app/articles/[slug]/page.tsx b/src/app/articles/[slug]/page.tsx new file mode 100644 index 0000000..c518ba9 --- /dev/null +++ b/src/app/articles/[slug]/page.tsx @@ -0,0 +1,74 @@ +import type { Metadata } from "next"; +import Link from "next/link"; +import { notFound } from "next/navigation"; +import { CatalogImage } from "@/components/CatalogImage"; +import { getBlogBySlug, listBlogs } from "@/lib/api"; +import { site } from "@/data/site"; +import { formatDate } from "@/lib/format"; + +type Props = { params: Promise<{ slug: string }> }; + +export async function generateMetadata({ params }: Props): Promise { + const { slug } = await params; + const blog = await getBlogBySlug(decodeURIComponent(slug)); + if (!blog) return { title: `مقاله | ${site.name}` }; + return { + title: `${blog.title} | ${site.name}`, + description: blog.excerpt, + }; +} + +export default async function ArticleDetailsPage({ params }: Props) { + const { slug } = await params; + const blog = await getBlogBySlug(decodeURIComponent(slug)); + if (!blog) notFound(); + + const related = (await listBlogs({ pageSize: 6 })).items.filter((item) => item.slug !== blog.slug).slice(0, 3); + + return ( +
+ + +

{blog.title}

+

+ {[blog.author, formatDate(blog.publishedAt), blog.categoryName].filter(Boolean).join(" • ")} +

+ + {blog.image ? ( + + ) : null} + + {blog.html ? ( +
+ ) : ( +

{blog.excerpt}

+ )} + + {related.length > 0 ? ( +
+

مقالات مرتبط

+
+ {related.map((item) => ( + + +

{item.title}

+ + ))} +
+
+ ) : null} +
+ ); +} diff --git a/src/app/articles/page.tsx b/src/app/articles/page.tsx new file mode 100644 index 0000000..7bb5952 --- /dev/null +++ b/src/app/articles/page.tsx @@ -0,0 +1,58 @@ +import type { Metadata } from "next"; +import Link from "next/link"; +import { CatalogImage } from "@/components/CatalogImage"; +import { Pagination } from "@/components/Pagination"; +import { listBlogs } from "@/lib/api"; +import { site } from "@/data/site"; + +export const metadata: Metadata = { + title: `مقالات | ${site.name}`, + description: "مقالات آموزشی گروه صنعتی شیرزاد", +}; + +export default async function ArticlesPage({ + searchParams, +}: { + searchParams: Promise<{ page?: string }>; +}) { + const params = await searchParams; + const page = Math.max(1, Number(params.page) || 1); + const blogs = await listBlogs({ page, pageSize: 12 }); + + return ( +
+

مقالات ما

+ {blogs.items.length === 0 ? ( +

مقاله‌ای یافت نشد.

+ ) : ( +
+ {blogs.items.map((article) => ( + + +
+

{article.title}

+

{article.excerpt}

+
+ + ))} +
+ )} + (nextPage > 1 ? `/articles?page=${nextPage}` : "/articles")} + /> +
+ ); +} diff --git a/src/app/contact/page.tsx b/src/app/contact/page.tsx new file mode 100644 index 0000000..e1269c7 --- /dev/null +++ b/src/app/contact/page.tsx @@ -0,0 +1,94 @@ +import type { Metadata } from "next"; +import { ContactForm } from "@/components/ContactForm"; +import { PageHero } from "@/components/PageHero"; +import { TrustBar } from "@/components/TrustBar"; +import { site } from "@/data/site"; + +export const metadata: Metadata = { + title: `تماس با ما | ${site.name}`, + description: `نشانی و راه‌های ارتباطی ${site.name}`, +}; + +export default function ContactPage() { + return ( + <> + + +
+
+

اطلاعات تماس با ما

+
+
+

نشانی ما

+

+ + {site.address} +

+
+
+

تماس با ما

+ +
+
+
+ +
+

سوالی دارید؟

+

با ما در میان بگذارید

+ +
+
+ +
+