faq, privacy-policy and about page complated

This commit is contained in:
Samandar Turgunboyev
2025-12-16 11:38:11 +05:00
parent bf57288b21
commit 9ebeebac44
26 changed files with 1817 additions and 335 deletions

View File

@@ -0,0 +1,110 @@
import { Card } from '@/shared/ui/card';
import Image from 'next/image';
export function AboutContent() {
const features = [
{
number: '1',
title: 'Sifatli Kontent',
description:
"Jahon oshpazlik san'ati va zamonaviy gastronomiya tendentsiyalari haqida chuqur maqolalar va tahlillar",
},
{
number: '2',
title: 'Professional Jamoa',
description:
'Tajribali kulinariya mutaxassislari va oshpazlar tomonidan tayyorlangan kontent',
},
{
number: '3',
title: 'Yangiliklar',
description:
"Gastronomiya sohasidagi so'nggi yangiliklar va eng yangi trendlar haqida xabarlar",
},
];
const images = [
{
url: '/professional-chef-cooking-gourmet-food.jpg',
alt: 'Professional Oshpaz',
},
{
url: '/fine-dining-restaurant-plating.jpg',
alt: 'Fine Dining',
},
{
url: '/fresh-ingredients-culinary-market.jpg',
alt: 'Fresh Ingredients',
},
];
return (
<section className="py-20 px-4">
<div className="max-w-7xl mx-auto">
{/* Mission Section */}
<div className="mb-20">
<h2 className="text-4xl md:text-5xl font-bold text-center mb-16 text-balance">
Bizning maqsadimiz
</h2>
<div className="grid md:grid-cols-3 gap-8">
{features.map((feature) => (
<Card
key={feature.number}
className="p-8 hover:shadow-lg transition-shadow"
>
<div className="text-6xl font-bold text-primary mb-4">
{feature.number}
</div>
<h3 className="text-2xl font-semibold mb-4">{feature.title}</h3>
<p className="text-muted-foreground leading-relaxed">
{feature.description}
</p>
</Card>
))}
</div>
</div>
{/* About Text */}
<div className="mb-20 max-w-4xl mx-auto text-center">
<h2 className="text-3xl md:text-4xl font-bold mb-8 text-balance">
Innovatsiya, sifat va professionallik
</h2>
<p className="text-lg text-muted-foreground leading-relaxed mb-6">
{`Gastro Market bu gastronomiya dunyosidagi eng so'nggi
yangiliklarni, retseptlarni va tendentsiyalarni taqdim etuvchi
onlayn platforma. Biz o'quvchilarimizga sifatli va qiziqarli kontent
taqdim etishga intilamiz.`}
</p>
<p className="text-lg text-muted-foreground leading-relaxed">
{`Bizning jamoamiz tajribali kulinariya mutaxassislari, oshpazlar va
gastronomiya sohasidagi ekspertlardan iborat. Biz har bir maqolada
sifat va professionallikka e'tibor qaratamiz.`}
</p>
</div>
{/* Image Gallery */}
<div className="mb-20">
<h3 className="text-3xl font-bold text-center mb-12 text-balance">
Bizning dunyo
</h3>
<div className="grid md:grid-cols-3 gap-6">
{images.map((image, idx) => (
<div
key={idx}
className="relative aspect-[4/3] overflow-hidden rounded-lg group"
>
<Image
width={500}
height={500}
src={image.url || '/placeholder.svg'}
alt={image.alt}
className="w-full h-full object-cover transition-transform duration-500 group-hover:scale-110"
/>
</div>
))}
</div>
</div>
</div>
</section>
);
}

View File

@@ -0,0 +1,27 @@
import Image from 'next/image';
export function AboutHero() {
return (
<section className="relative h-[60vh] min-h-[500px] flex items-center justify-center overflow-hidden">
<div className="absolute inset-0 z-0">
<Image
width={500}
height={500}
src="/gourmet-food-culinary-magazine-hero-image.jpg"
alt="Gastro Market"
className="w-full h-full object-cover brightness-50"
/>
</div>
<div className="relative z-10 text-center px-4 max-w-4xl mx-auto">
<h1 className="text-5xl md:text-7xl font-bold text-white mb-6 text-balance">
Gastro Market
</h1>
<p className="text-xl md:text-2xl text-white/90 font-light leading-relaxed text-balance">
{
"Gastronomiya va kulinariya san'ati haqidagi yetakchi onlayn magazin"
}
</p>
</div>
</section>
);
}

View File

@@ -0,0 +1,274 @@
'use client';
import formatPhone from '@/shared/lib/formatPhone';
import { Button } from '@/shared/ui/button';
import { Card } from '@/shared/ui/card';
import {
Form,
FormControl,
FormDescription,
FormField,
FormItem,
FormLabel,
FormMessage,
} from '@/shared/ui/form';
import { Input } from '@/shared/ui/input';
import { Label } from '@/shared/ui/label';
import { zodResolver } from '@hookform/resolvers/zod';
import { Upload } from 'lucide-react';
import { useState } from 'react';
import { useForm } from 'react-hook-form';
import { toast } from 'sonner';
import * as z from 'zod';
const MAX_FILE_SIZE = 5 * 1024 * 1024; // 5MB
const ACCEPTED_FILE_TYPES = [
'application/pdf',
'application/msword',
'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
];
const partnershipFormSchema = z.object({
companyName: z.string().min(2, {
message: "Kompaniya nomi kamida 2 ta belgidan iborat bo'lishi kerak",
}),
website: z
.string()
.url({ message: "To'g'ri website manzilini kiriting" })
.optional()
.or(z.literal('')),
contactPerson: z
.string()
.min(2, { message: "Ism kamida 2 ta belgidan iborat bo'lishi kerak" }),
email: z
.string()
.email({ message: "To'g'ri email manzilini kiriting" })
.optional(),
phone: z
.string()
.min(9, { message: "To'g'ri telefon raqamini kiriting" })
.regex(/^[\d\s+\-$$$$]+$/, {
message: "Telefon raqami faqat raqamlardan iborat bo'lishi kerak",
}),
companyFile: z
.custom<FileList>()
.refine((files) => files?.length === 1, 'File yuklash majburiy')
.refine(
(files) => files?.[0]?.size <= MAX_FILE_SIZE,
'File hajmi 5MB dan oshmasligi kerak',
)
.refine(
(files) => ACCEPTED_FILE_TYPES.includes(files?.[0]?.type),
'Faqat PDF yoki Word formatidagi fayllar qabul qilinadi',
),
});
type PartnershipFormValues = z.infer<typeof partnershipFormSchema>;
export function PartnershipForm() {
const [isSubmitting, setIsSubmitting] = useState(false);
const form = useForm<PartnershipFormValues>({
resolver: zodResolver(partnershipFormSchema),
defaultValues: {
companyName: '',
website: '',
contactPerson: '',
email: '',
phone: '+998',
},
});
async function onSubmit(data: PartnershipFormValues) {
console.log(data);
setIsSubmitting(true);
try {
await new Promise((resolve) => setTimeout(resolve, 2000));
toast.success("So'rov yuborildi!", {
richColors: true,
position: 'top-center',
});
form.reset();
} catch {
toast.error('Xatolik yuz berdi', {
richColors: true,
position: 'top-center',
});
} finally {
setIsSubmitting(false);
}
}
return (
<section className="px-4 mb-5">
<div className="max-w-3xl mx-auto">
<div className="text-center mb-12">
<h2 className="text-4xl md:text-5xl font-bold mb-6 text-balance">
{`Hamkor bo'ling`}
</h2>
<p className="text-lg text-muted-foreground leading-relaxed">
{`Gastro Market bilan hamkorlik qilishni xohlaysizmi? Quyidagi formani
to'ldiring va biz siz bilan tez orada bog'lanamiz.`}
</p>
</div>
<Card className="p-8 md:p-12">
<Form {...form}>
<form onSubmit={form.handleSubmit(onSubmit)} className="space-y-6">
<FormField
control={form.control}
name="companyName"
render={({ field }) => (
<FormItem>
<Label>Kompaniya nomi</Label>
<FormControl>
<Input
placeholder="Kompaniyangiz nomini kiriting"
{...field}
className="h-12"
/>
</FormControl>
<FormMessage />
</FormItem>
)}
/>
<FormField
control={form.control}
name="website"
render={({ field }) => (
<FormItem>
<Label>Website</Label>
<FormControl>
<Input
placeholder="https://example.com"
type="url"
className="h-12"
{...field}
/>
</FormControl>
<FormMessage />
</FormItem>
)}
/>
<FormField
control={form.control}
name="contactPerson"
render={({ field }) => (
<FormItem>
<Label>Ism Familiya</Label>
<FormControl>
<Input
placeholder="Ism va familiya"
className="h-12"
{...field}
/>
</FormControl>
<FormMessage />
</FormItem>
)}
/>
<div className="grid md:grid-cols-2 gap-6">
<FormField
control={form.control}
name="email"
render={({ field }) => (
<FormItem className="flex flex-col justify-start">
<Label>Email</Label>
<FormControl>
<Input
placeholder="example@email.com"
type="email"
className="h-12"
{...field}
/>
</FormControl>
<FormMessage />
</FormItem>
)}
/>
<FormField
control={form.control}
name="phone"
render={({ field }) => (
<FormItem className="flex flex-col justify-start">
<Label>Telefon raqami</Label>
<FormControl>
<Input
placeholder="+998 90 123 45 67"
className="h-12"
{...field}
value={formatPhone(field.value)}
/>
</FormControl>
<FormMessage />
</FormItem>
)}
/>
</div>
<FormField
control={form.control}
name="companyFile"
render={({ field: { onChange, value, ...field } }) => (
<FormItem>
<Label>Kompaniya hujjati</Label>
<FormControl>
<div>
<Input
type="file"
id="company file"
accept=".pdf,.doc,.docx"
onChange={(e) => {
const files = e.target.files;
onChange(files);
}}
{...field}
className="hidden"
/>
<FormLabel
className="w-full flex justify-center items-center flex-col h-36 border border-gray-200 rounded-2xl cursor-pointer"
htmlFor="company file"
>
<Upload className="size-10 text-muted-foreground" />
<p className="text-muted-foreground text-lg">
Faylni tanlang
</p>
{value && value.length > 0 && (
<p className="mt-2 text-sm text-gray-500">
Tanlangan fayl: {value[0].name}
</p>
)}
</FormLabel>
</div>
</FormControl>
<FormDescription>
PDF yoki Word formatida (maksimal 5MB)
</FormDescription>
<FormMessage />
</FormItem>
)}
/>
<Button
type="submit"
size="lg"
className="w-full"
disabled={isSubmitting}
>
{isSubmitting ? 'Yuborilmoqda...' : "So'rov yuborish"}
</Button>
</form>
</Form>
</Card>
</div>
</section>
);
}