feat: complete app democking, fix types, add blogs api

This commit is contained in:
parsa committed 2026-06-12 22:53:57 +03:30
1 parent 6027e635db
commit 945c007a79
25 files changed
+557 -56

No files matched your search

+9 -8
View File
@@ -62,10 +62,14 @@ function Typewriter({ text }: { text: string }) {
import { useRouter } from 'next/navigation';
export default function Hero() {
export default function Hero({ banners = [] }: { banners?: any[] }) {
const router = useRouter();
const getText = useSettingsStore(state => state.getText);
const title = getText('hero_title', "تخصص آلمانی در خدمت\nسلامت پت‌های خانگی");
const title = banners.length > 0 ? banners[0].title : getText('hero_title', "تخصص آلمانی در خدمت\nسلامت پت‌های خانگی");
const subtitle = banners.length > 0 ? banners[0].subtitle : getText(
'hero_desc',
'بیش از <span className="font-bold text-canina-blue">۴۰ سال</span> تجربه نوآورانه در تولید مکمل‌های درمانی با بالاترین استاندارد کیفی «گرید دارویی اختصاصی». راهکار هوشمند برای هر نیاز بالینی.'
);
const titleParts = title.split('\n');
return (
@@ -97,10 +101,7 @@ export default function Hero() {
<p
className="text-lg lg:text-xl text-medical-gray-600 mb-10 max-w-2xl mx-auto lg:mx-0 leading-relaxed font-vazir animate-fade-in"
dangerouslySetInnerHTML={{
__html: getText(
'hero_desc',
'بیش از <span className="font-bold text-canina-blue">۴۰ سال</span> تجربه نوآورانه در تولید مکمل‌های درمانی با بالاترین استاندارد کیفی «گرید دارویی اختصاصی». راهکار هوشمند برای هر نیاز بالینی.'
)
__html: subtitle
}}
/>
@@ -169,8 +170,8 @@ export default function Hero() {
>
<div className="aspect-square bg-medical-gray-100 rounded-[2rem] overflow-hidden border-4 border-white shadow-2xl relative">
<img
src="https://images.unsplash.com/photo-1583337130417-3346a1be7dee?auto=format&fit=crop&q=80&w=800"
alt="German Veterinary Expert"
src={banners.length > 0 && banners[0].imageUrl ? banners[0].imageUrl : "https://images.unsplash.com/photo-1583337130417-3346a1be7dee?auto=format&fit=crop&q=80&w=800"}
alt={banners.length > 0 ? banners[0].title : "German Veterinary Expert"}
className="w-full h-full object-cover grayscale-[20%] hover:grayscale-0 transition-all duration-700"
referrerPolicy="no-referrer"
/>