fix: resolve seed encoding, search param, and wiki data source issues
- Fix seed-products.ts TS error (implicit any) and BOM handling - Re-run full seed to restore correct Persian encoding in DB - Fix productService query→search param mismatch - Fix IngredientWiki hardcoded port 4000→use settingsStore - Restore seed-products-data.json from git after accidental corruption
This commit is contained in:
1 parent
804a596711
commit
7615aa0e51
74 files changed
+683
-659
No files matched your search
@@ -15,7 +15,7 @@ async function getBlog(slug: string) {
|
||||
excerpt: b.metaDescription || b.content.substring(0, 150).replace(/<[^>]+>/g, '') + '...',
|
||||
image: b.imageUrl,
|
||||
date: new Date(b.createdAt).toLocaleDateString('fa-IR'),
|
||||
author: b.author ? `${b.author.firstName} ${b.author.lastName}` : 'نویسنده کانینو',
|
||||
author: b.author ? `${b.author.firstName} ${b.author.lastName}` : 'نویسنده کانینا',
|
||||
content: b.content
|
||||
};
|
||||
} catch (error) {
|
||||
@@ -41,7 +41,7 @@ export default async function BlogPostPage({ params }: { params: { slug: string
|
||||
return (
|
||||
<div className="min-h-[50vh] flex flex-col items-center justify-center font-vazir text-center" dir="rtl">
|
||||
<h1 className="text-3xl font-black text-medical-gray-900 mb-4">مقالهای یافت نشد</h1>
|
||||
<Link href="/blog" className="text-canino-blue font-bold flex items-center gap-2">
|
||||
<Link href="/blog" className="text-canina-blue font-bold flex items-center gap-2">
|
||||
<ChevronRight className="w-4 h-4" />
|
||||
بازگشت به مجله سلامت
|
||||
</Link>
|
||||
@@ -54,11 +54,11 @@ export default async function BlogPostPage({ params }: { params: { slug: string
|
||||
<div className="max-w-7xl mx-auto">
|
||||
{/* Breadcrumbs */}
|
||||
<div className="flex items-center gap-2 text-[10px] font-black text-medical-gray-400 uppercase tracking-widest mb-10">
|
||||
<Link href="/" className="hover:text-canino-blue transition-colors">خانه</Link>
|
||||
<Link href="/" className="hover:text-canina-blue transition-colors">خانه</Link>
|
||||
<ChevronRight className="w-2.5 h-2.5" />
|
||||
<Link href="/blog" className="hover:text-canino-blue transition-colors">مجله سلامت</Link>
|
||||
<Link href="/blog" className="hover:text-canina-blue transition-colors">مجله سلامت</Link>
|
||||
<ChevronRight className="w-2.5 h-2.5" />
|
||||
<span className="text-canino-blue">{selectedPost.title}</span>
|
||||
<span className="text-canina-blue">{selectedPost.title}</span>
|
||||
</div>
|
||||
|
||||
<div className="grid lg:grid-cols-12 gap-12">
|
||||
@@ -68,8 +68,8 @@ export default async function BlogPostPage({ params }: { params: { slug: string
|
||||
<img src={selectedPost.image} alt={selectedPost.title} className="w-full h-full object-cover" />
|
||||
</div>
|
||||
<div className="p-12">
|
||||
<div className="flex items-center gap-4 text-xs font-bold text-canino-blue mb-8">
|
||||
<div className="bg-canino-blue/10 px-4 py-1.5 rounded-full uppercase tracking-widest">تحقیق بالینی</div>
|
||||
<div className="flex items-center gap-4 text-xs font-bold text-canina-blue mb-8">
|
||||
<div className="bg-canina-blue/10 px-4 py-1.5 rounded-full uppercase tracking-widest">تحقیق بالینی</div>
|
||||
<div className="flex items-center gap-1">
|
||||
<Calendar className="w-4 h-4" />
|
||||
{selectedPost.date}
|
||||
@@ -79,7 +79,7 @@ export default async function BlogPostPage({ params }: { params: { slug: string
|
||||
{selectedPost.title}
|
||||
</h1>
|
||||
<div className="prose prose-lg max-w-none text-medical-gray-600 leading-[2] text-justify space-y-6">
|
||||
<p className="font-bold text-medical-gray-900 italic text-xl border-r-4 border-canino-blue pr-6 py-2">
|
||||
<p className="font-bold text-medical-gray-900 italic text-xl border-r-4 border-canina-blue pr-6 py-2">
|
||||
{selectedPost.excerpt}
|
||||
</p>
|
||||
<div className="whitespace-pre-line" dangerouslySetInnerHTML={{ __html: selectedPost.content }} />
|
||||
@@ -92,11 +92,11 @@ export default async function BlogPostPage({ params }: { params: { slug: string
|
||||
</div>
|
||||
<div>
|
||||
<div className="font-black text-medical-gray-900 text-lg">{selectedPost.author}</div>
|
||||
<div className="font-bold text-medical-gray-400">نویسنده کانینو</div>
|
||||
<div className="font-bold text-medical-gray-400">نویسنده کانینا</div>
|
||||
</div>
|
||||
</div>
|
||||
<div className="flex gap-4">
|
||||
<button className="p-4 bg-medical-gray-100 rounded-2xl hover:bg-canino-blue hover:text-white transition-all text-medical-gray-400">
|
||||
<button className="p-4 bg-medical-gray-100 rounded-2xl hover:bg-canina-blue hover:text-white transition-all text-medical-gray-400">
|
||||
<Sparkles className="w-6 h-6" />
|
||||
</button>
|
||||
</div>
|
||||
@@ -106,7 +106,7 @@ export default async function BlogPostPage({ params }: { params: { slug: string
|
||||
</div>
|
||||
|
||||
<div className="lg:col-span-4 space-y-10">
|
||||
<div className="bg-canino-blue rounded-[3rem] p-10 text-white shadow-2xl relative overflow-hidden">
|
||||
<div className="bg-canina-blue rounded-[3rem] p-10 text-white shadow-2xl relative overflow-hidden">
|
||||
<div className="absolute top-0 left-0 p-8 opacity-10">
|
||||
<Sparkles className="w-20 h-20" />
|
||||
</div>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import BlogPage from "../../components/BlogPage";
|
||||
import BlogPage from "../../components/BlogPage";
|
||||
import type { Metadata } from 'next';
|
||||
|
||||
export const metadata: Metadata = {
|
||||
@@ -19,7 +19,7 @@ async function getBlogs() {
|
||||
excerpt: b.metaDescription || b.content.substring(0, 150).replace(/<[^>]+>/g, '') + '...',
|
||||
image: b.imageUrl,
|
||||
date: new Date(b.createdAt).toLocaleDateString('fa-IR'),
|
||||
author: b.author ? `${b.author.firstName} ${b.author.lastName}` : 'نویسنده کانینو',
|
||||
author: b.author ? `${b.author.firstName} ${b.author.lastName}` : 'نویسنده کانینا',
|
||||
content: b.content
|
||||
}));
|
||||
} catch (error) {
|
||||
|
||||
@@ -7,10 +7,10 @@
|
||||
--font-inter: "Inter", sans-serif;
|
||||
|
||||
/* Brand Colors */
|
||||
--color-canino-blue: #1E4053;
|
||||
--color-canino-gold: #F1B646;
|
||||
--color-canino-teal: #9BC8CC;
|
||||
--color-canino-dark: #060709;
|
||||
--color-canina-blue: #1E4053;
|
||||
--color-canina-gold: #F1B646;
|
||||
--color-canina-teal: #9BC8CC;
|
||||
--color-canina-dark: #060709;
|
||||
|
||||
/* Core UI color mappings (harmonies based on brand palette) */
|
||||
--color-medical-gray-50: #FFFFFF; /* pure white main background */
|
||||
@@ -80,5 +80,5 @@
|
||||
}
|
||||
|
||||
::-webkit-scrollbar-thumb:hover {
|
||||
background: var(--color-canino-blue);
|
||||
background: var(--color-canina-blue);
|
||||
}
|
||||
@@ -1,35 +1,35 @@
|
||||
import type { Metadata } from 'next';
|
||||
import type { Metadata } from 'next';
|
||||
import './globals.css';
|
||||
import ClientLayout from './ClientLayout';
|
||||
|
||||
export const metadata: Metadata = {
|
||||
metadataBase: new URL(process.env.NEXT_PUBLIC_SITE_URL || 'https://canino-iran.com'),
|
||||
title: {
|
||||
template: '%s | کانینو ایران',
|
||||
default: 'کانینو ایران - مکملهای درمانی حیوانات خانگی',
|
||||
template: '%s | کانینا ایران',
|
||||
default: 'کانینا ایران - مکملهای درمانی حیوانات خانگی',
|
||||
},
|
||||
description: 'تدارک هوشمندانه سلامت برای همراهان وفادار شما. کانینو ایران واردکننده انحصاری مکملهای درمانی با گرید دارویی اختصاصی از آلمان.',
|
||||
keywords: ['مکمل حیوانات خانگی', 'مکمل سگ', 'مکمل گربه', 'کانینو', 'داروی حیوانات', 'Canino Iran'],
|
||||
authors: [{ name: 'Canino Iran' }],
|
||||
creator: 'Canino Iran',
|
||||
publisher: 'Canino Iran',
|
||||
description: 'تدارک هوشمندانه سلامت برای همراهان وفادار شما. کانینا ایران واردکننده انحصاری مکملهای درمانی با گرید دارویی اختصاصی از آلمان.',
|
||||
keywords: ['مکمل حیوانات خانگی', 'مکمل سگ', 'مکمل گربه', 'کانینا', 'داروی حیوانات', 'Canina Iran'],
|
||||
authors: [{ name: 'Canina Iran' }],
|
||||
creator: 'Canina Iran',
|
||||
publisher: 'Canina Iran',
|
||||
formatDetection: {
|
||||
email: false,
|
||||
address: false,
|
||||
telephone: false,
|
||||
},
|
||||
openGraph: {
|
||||
title: 'کانینو ایران - مکملهای درمانی حیوانات خانگی',
|
||||
title: 'کانینا ایران - مکملهای درمانی حیوانات خانگی',
|
||||
description: 'واردکننده انحصاری مکملهای درمانی با گرید دارویی اختصاصی از آلمان',
|
||||
url: 'https://canino-iran.com',
|
||||
siteName: 'کانینو ایران',
|
||||
siteName: 'کانینا ایران',
|
||||
locale: 'fa_IR',
|
||||
type: 'website',
|
||||
},
|
||||
twitter: {
|
||||
card: 'summary_large_image',
|
||||
title: 'کانینو ایران',
|
||||
description: 'مکملهای درمانی حیوانات خانگی کانینو',
|
||||
title: 'کانینا ایران',
|
||||
description: 'مکملهای درمانی حیوانات خانگی کانینا',
|
||||
},
|
||||
robots: {
|
||||
index: true,
|
||||
@@ -52,7 +52,7 @@ export default function RootLayout({
|
||||
const jsonLd = {
|
||||
'@context': 'https://schema.org',
|
||||
'@type': 'Organization',
|
||||
name: 'کانینو ایران',
|
||||
name: 'کانینا ایران',
|
||||
url: 'https://canino-iran.com',
|
||||
logo: 'https://canina.de/media/fb/d5/47/1683116813/Logo.png',
|
||||
contactPoint: {
|
||||
|
||||
@@ -36,9 +36,9 @@ export default async function Home() {
|
||||
href="/shop"
|
||||
className="bg-white p-12 rounded-[3.5rem] border border-medical-gray-200 shadow-sm hover:shadow-2xl hover:-translate-y-2 transition-all cursor-pointer group block"
|
||||
>
|
||||
<h3 className="text-3xl font-black text-medical-gray-900 mb-4 group-hover:text-canino-blue transition-colors italic">فروشگاه تخصصی</h3>
|
||||
<h3 className="text-3xl font-black text-medical-gray-900 mb-4 group-hover:text-canina-blue transition-colors italic">فروشگاه تخصصی</h3>
|
||||
<p className="text-medical-gray-500 mb-8 leading-relaxed">دسترسی به تمامی محصولات بر اساس علائم بالینی و نیازهای پت شما.</p>
|
||||
<div className="flex items-center gap-2 text-canino-blue font-black tracking-widest uppercase text-xs">
|
||||
<div className="flex items-center gap-2 text-canina-blue font-black tracking-widest uppercase text-xs">
|
||||
کاتالوگ کامل محصولات
|
||||
<span className="text-lg">←</span>
|
||||
</div>
|
||||
@@ -47,9 +47,9 @@ export default async function Home() {
|
||||
href="/wiki"
|
||||
className="bg-medical-gray-900 p-12 rounded-[3.5rem] text-white hover:shadow-2xl hover:-translate-y-2 transition-all cursor-pointer group block"
|
||||
>
|
||||
<h3 className="text-3xl font-black mb-4 group-hover:text-canino-blue transition-colors italic">دانشنامه علمی</h3>
|
||||
<p className="text-white/60 mb-8 leading-relaxed">آشنایی با ترکیبات نایاب و استانداردهای دارویی محصولات آلمانی کانینو.</p>
|
||||
<div className="flex items-center gap-2 text-canino-blue font-black tracking-widest uppercase text-xs">
|
||||
<h3 className="text-3xl font-black mb-4 group-hover:text-canina-blue transition-colors italic">دانشنامه علمی</h3>
|
||||
<p className="text-white/60 mb-8 leading-relaxed">آشنایی با ترکیبات نایاب و استانداردهای دارویی محصولات آلمانی کانینا.</p>
|
||||
<div className="flex items-center gap-2 text-canina-blue font-black tracking-widest uppercase text-xs">
|
||||
مطالعه مقالات تخصصی
|
||||
<span className="text-lg">←</span>
|
||||
</div>
|
||||
@@ -61,21 +61,21 @@ export default async function Home() {
|
||||
<section className="py-24 bg-white overflow-hidden">
|
||||
<div className="max-w-7xl mx-auto px-4 grid lg:grid-cols-2 gap-16 lg:gap-24 items-center">
|
||||
<div className="relative">
|
||||
<div className="absolute -top-10 -right-10 w-40 h-40 bg-canino-blue/5 rounded-full blur-3xl" />
|
||||
<div className="absolute -top-10 -right-10 w-40 h-40 bg-canina-blue/5 rounded-full blur-3xl" />
|
||||
<img
|
||||
src="/assets/images/regenerated_image_1779109861747.png"
|
||||
alt="Laboratory"
|
||||
className="rounded-[3rem] shadow-2xl relative z-10 grayscale-[10%]"
|
||||
/>
|
||||
<div className="absolute -bottom-6 -left-6 bg-canino-blue text-white p-8 rounded-3xl shadow-xl z-20">
|
||||
<div className="absolute -bottom-6 -left-6 bg-canina-blue text-white p-8 rounded-3xl shadow-xl z-20">
|
||||
<div className="text-4xl font-black mb-1 italic">کیفیت</div>
|
||||
<div className="text-xs uppercase tracking-widest font-bold opacity-80">استانداردهای فوقدارویی</div>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<div className="text-canino-blue text-xs font-bold uppercase tracking-[0.2em] mb-4">میراث ما از آلمان</div>
|
||||
<div className="text-canina-blue text-xs font-bold uppercase tracking-[0.2em] mb-4">میراث ما از آلمان</div>
|
||||
<h2 className="text-3xl lg:text-5xl font-black text-medical-gray-900 leading-[1.2] mb-12">
|
||||
چرا برند آلمانی Canino مرجع دامپزشکان است؟
|
||||
چرا برند آلمانی Canina مرجع دامپزشکان است؟
|
||||
</h2>
|
||||
<div className="space-y-6">
|
||||
{[
|
||||
@@ -84,7 +84,7 @@ export default async function Home() {
|
||||
{ title: 'تاییدیه اروپا', desc: 'مطابق با سختگیرانهترین استانداردهای ایمنی مواد غذایی و دارویی در اتحادیه اروپا.' }
|
||||
].map((item, idx) => (
|
||||
<div key={idx} className="flex gap-4 items-center">
|
||||
<div className="w-12 h-12 rounded-2xl bg-medical-gray-50 flex items-center justify-center flex-shrink-0 text-canino-blue font-bold">
|
||||
<div className="w-12 h-12 rounded-2xl bg-medical-gray-50 flex items-center justify-center flex-shrink-0 text-canina-blue font-bold">
|
||||
{toPersian(idx + 1)}
|
||||
</div>
|
||||
<div>
|
||||
@@ -99,7 +99,7 @@ export default async function Home() {
|
||||
</section>
|
||||
|
||||
{/* Call to Action */}
|
||||
<section className="bg-canino-blue py-20 relative overflow-hidden">
|
||||
<section className="bg-canina-blue py-20 relative overflow-hidden">
|
||||
<div className="absolute inset-0 opacity-10">
|
||||
<div className="grid grid-cols-10 h-full w-full">
|
||||
{Array.from({length: 100}).map((_, i) => (
|
||||
@@ -112,15 +112,15 @@ export default async function Home() {
|
||||
میخواهید بدانید کدام محصول برای پت شما مناسبتر است؟
|
||||
</h2>
|
||||
<p className="text-white/80 text-lg mb-10 leading-relaxed">
|
||||
تیم متخصص دامپزشکی کانینو ایران آماده پاسخگویی به سوالات شماست.
|
||||
تیم متخصص دامپزشکی کانینا ایران آماده پاسخگویی به سوالات شماست.
|
||||
</p>
|
||||
<div className="flex flex-wrap justify-center gap-4">
|
||||
<button className="bg-white text-canino-blue px-12 py-5 rounded-full font-black text-xl hover:scale-105 transition-transform shadow-2xl shadow-black/20">
|
||||
<button className="bg-white text-canina-blue px-12 py-5 rounded-full font-black text-xl hover:scale-105 transition-transform shadow-2xl shadow-black/20">
|
||||
دریافت رژیم مکمل رایگان
|
||||
</button>
|
||||
<Link
|
||||
href="/shop"
|
||||
className="bg-transparent border-2 border-white text-white px-12 py-5 rounded-full font-black text-xl hover:bg-white hover:text-canino-blue transition-all"
|
||||
className="bg-transparent border-2 border-white text-white px-12 py-5 rounded-full font-black text-xl hover:bg-white hover:text-canina-blue transition-all"
|
||||
>
|
||||
پروانه دامپزشکی و اصالت کالا
|
||||
</Link>
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import SearchResultsPage from "../../components/SearchResultsPage";
|
||||
import SearchResultsPage from "../../components/SearchResultsPage";
|
||||
import type { Metadata } from 'next';
|
||||
|
||||
export const metadata: Metadata = {
|
||||
title: 'جستجوی محصولات',
|
||||
description: 'جستجوی مکملهای درمانی حیوانات خانگی، داروها و مقالات سلامت در کانینو ایران.',
|
||||
description: 'جستجوی مکملهای درمانی حیوانات خانگی، داروها و مقالات سلامت در کانینا ایران.',
|
||||
};
|
||||
|
||||
export default async function SearchPage({ searchParams }: { searchParams: Promise<{ q?: string }> }) {
|
||||
|
||||
@@ -54,7 +54,7 @@ export default async function ShopProductPage({ params }: { params: Promise<{ sl
|
||||
sku: product.artNo,
|
||||
brand: {
|
||||
'@type': 'Brand',
|
||||
name: 'Canino'
|
||||
name: 'Canina'
|
||||
},
|
||||
offers: {
|
||||
'@type': 'Offer',
|
||||
|
||||
@@ -30,7 +30,7 @@ export default async function BlogPage({ params }: { params: { slug: string } })
|
||||
return (
|
||||
<div className="min-h-[50vh] flex flex-col items-center justify-center font-vazir text-center" dir="rtl">
|
||||
<h1 className="text-3xl font-black text-medical-gray-900 mb-4">مقالهای یافت نشد</h1>
|
||||
<Link href="/wiki" className="text-canino-blue font-bold flex items-center gap-2">
|
||||
<Link href="/wiki" className="text-canina-blue font-bold flex items-center gap-2">
|
||||
<ChevronRight className="w-4 h-4" />
|
||||
بازگشت به دانشنامه
|
||||
</Link>
|
||||
@@ -41,7 +41,7 @@ export default async function BlogPage({ params }: { params: { slug: string } })
|
||||
return (
|
||||
<div className="bg-white py-20 px-4 font-vazir" dir="rtl">
|
||||
<div className="max-w-4xl mx-auto">
|
||||
<Link href="/wiki" className="inline-flex items-center gap-2 text-medical-gray-400 hover:text-canino-blue transition-colors font-bold mb-8">
|
||||
<Link href="/wiki" className="inline-flex items-center gap-2 text-medical-gray-400 hover:text-canina-blue transition-colors font-bold mb-8">
|
||||
<ChevronRight className="w-5 h-5" />
|
||||
بازگشت به مقالات
|
||||
</Link>
|
||||
@@ -67,7 +67,7 @@ export default async function BlogPage({ params }: { params: { slug: string } })
|
||||
</div>
|
||||
|
||||
<div
|
||||
className="prose prose-lg prose-medical-gray max-w-none prose-headings:font-black prose-p:leading-relaxed prose-a:text-canino-blue"
|
||||
className="prose prose-lg prose-medical-gray max-w-none prose-headings:font-black prose-p:leading-relaxed prose-a:text-canina-blue"
|
||||
dangerouslySetInnerHTML={{ __html: blog.content }}
|
||||
/>
|
||||
</div>
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import IngredientWiki from "../../components/IngredientWiki";
|
||||
import IngredientWiki from "../../components/IngredientWiki";
|
||||
import type { Metadata } from 'next';
|
||||
|
||||
export const metadata: Metadata = {
|
||||
title: 'دانشنامه ترکیبات دارویی',
|
||||
description: 'اطلاعات کامل در مورد مواد موثره، ویتامینها و ترکیبات گیاهی به کار رفته در محصولات تخصصی کانینو ایران.',
|
||||
description: 'اطلاعات کامل در مورد مواد موثره، ویتامینها و ترکیبات گیاهی به کار رفته در محصولات تخصصی کانینا ایران.',
|
||||
};
|
||||
|
||||
export default function WikiPage() {
|
||||
|
||||
Reference in new issue
Block a user