feat: New design and optimization

This commit is contained in:
2025-10-27 13:23:05 +05:45
parent 63777cb3c1
commit db9315ad22
44 changed files with 2877 additions and 336 deletions

View File

@@ -1,28 +1,30 @@
import { Button } from '@/components/ui/button';
import { Input } from '@/components/ui/input';
import { Label } from '@/components/ui/label';
import { about, artOfWeaving, contact, faq, home, product } from '@/routes';
import { about, artOfWeaving, contact, faq, home } from '@/routes';
import index from '@/routes/index/index';
import { useTranslations } from '@/utils/i18n';
import ns from '@asset/img/about/ns.gif';
import oko from '@asset/img/about/oko.gif';
import logo from '@asset/img/logo/soorya.png';
import { SiFacebook, SiInstagram } from '@icons-pack/react-simple-icons';
import { Link } from '@inertiajs/react';
import { MoveRight } from 'lucide-react';
export default function Footer() {
const { t } = useTranslations();
return (
<footer className="bg-primary">
<div className="mx-auto grid max-w-screen-2xl grid-cols-4 gap-8 px-12 py-8 max-md:grid-cols-1 max-md:grid-rows-4 max-md:px-6">
<div className="flex flex-col gap-4">
<img src={logo} alt="Soorya Carpet Logo" className="w-32" />
<div className="flex flex-col gap-4 text-sm text-white">
<p>
A beautiful home deserves beautiful carpets Since
1974, crafting the finest handmade Nepalese carpets
</p>
<p>{t('footer.desc.title')}</p>
<ul>
<li>Soorya Carpet Industries</li>
<li>Address: Thapathali, Kathmandu</li>
<li>Phone: [+977-1] 4780923, 4783003</li>
<li>Email: sooryacarpets@gmail.com</li>
<li>{t('footer.desc.company')}</li>
<li>{t('footer.desc.address')}</li>
<li>{t('footer.desc.phone')}</li>
<li>{t('footer.desc.email')}</li>
</ul>
</div>
</div>
@@ -31,17 +33,17 @@ export default function Footer() {
<ul className="flex flex-col gap-1 text-sm">
<li>
<Link href={home()} className="text-neutral-300">
Home
{t('footer.links.home')}
</Link>
</li>
<li>
<Link href={contact()} className="text-neutral-300">
Contact US
{t('footer.links.contact')}
</Link>
</li>
<li>
<Link href={about()} className="text-neutral-300">
About Us
{t('footer.links.about-us')}
</Link>
</li>
<li>
@@ -49,27 +51,30 @@ export default function Footer() {
href={artOfWeaving()}
className="text-neutral-300"
>
Art of Weaving
{t('footer.links.art')}
</Link>
</li>
<li>
<Link href={product()} className="text-neutral-300">
Products
<Link
href={index.product()}
className="text-neutral-300"
>
{t('footer.links.products')}
</Link>
</li>
<li>
<Link href={home()} className="text-neutral-300">
Bespoke Design
{t('footer.links.bespoke')}
</Link>
</li>
<li>
<Link href={home()} className="text-neutral-300">
Design Gallery / E-Catalog
{t('footer.links.gallery')}
</Link>
</li>
<li>
<Link href={faq()} className="text-neutral-300">
FAQ
{t('footer.links.faq')}
</Link>
</li>
</ul>
@@ -78,46 +83,57 @@ export default function Footer() {
<p className="text-lg font-medium text-white">
Certifications & Trust Badges
</p>
<div className="grid grid-cols-3 gap-1">
<img
src={ns}
alt="NS Standard"
className="aspect-square object-cover object-center"
/>
<img
src={oko}
alt="oko Standard"
className="object-cover object-center"
/>
</div>
</div>
<div>
<div className="flex flex-col gap-6">
<form className="flex flex-col gap-2">
<Label className="text-lg font-medium text-white">
Newsletter/Updates
{t('footer.news.title')}
</Label>
<div className="flex items-center gap-2 max-sm:flex-col">
<Input
id="newsletter"
placeholder="Email Address"
placeholder={t('footer.news.input')}
className="bg-white"
/>
<Button
variant={'outline'}
className="bg-transparent text-white max-sm:w-full"
>
Subscribe <MoveRight />
{t('footer.news.button')} <MoveRight />
</Button>
</div>
</form>
<div className="flex flex-col gap-2">
<p className="text-base font-medium text-white">
Legal
{t('footer.news.legal.title')}
</p>
<ul className="flex flex-col gap-1 text-sm text-neutral-300">
<li>
<Link href="privacy-policy">
Privacy Policy
{t('footer.news.legal.privacy')}
</Link>
</li>
<li>
<Link href="terms-and-condition">
Terms & Conditions Return
{t('footer.news.legal.terms')}
</Link>
</li>
<li>
<Link href={faq()}>
Policy (from FAQ)Privacy Policy (from
FAQ)
{t('footer.news.legal.policy')}
</Link>
</li>
</ul>

View File

@@ -1,6 +1,14 @@
// import { dashboard, login, register } from '@/routes';
// import { SharedData } from '@/types';
// import { Link, usePage } from '@inertiajs/react';
import {
Select,
SelectContent,
SelectGroup,
SelectItem,
SelectTrigger,
SelectValue,
} from '@/components/ui/select';
import {
Sheet,
SheetContent,
@@ -8,18 +16,55 @@ import {
SheetTitle,
SheetTrigger,
} from '@/components/ui/sheet';
import { about, artOfWeaving, contact, faq, home, product } from '@/routes';
import { about, artOfWeaving, bespoke, contact, faq, home } from '@/routes';
import index from '@/routes/index/index';
import { useLocale, useTranslations } from '@/utils/i18n';
import logo from '@asset/img/logo/soorya.png';
import { Link } from '@inertiajs/react';
import { Link, router } from '@inertiajs/react';
import { Mail, MapPin, Menu, Phone } from 'lucide-react';
export default function Navbar() {
// const [lang, setLang] = useState('en');
// const { translations } = usePage().props;
// const { post } = useForm({
// locale: lang,
// });
// console.log('lang', lang);
// const changeLanguage = (e) => {
// console.log(e);
// setLang(e);
// post(locale.change().url);
// };
// const { auth } = usePage<SharedData>().props;
const { t } = useTranslations();
const locale = useLocale();
// const { locale, translations } = usePage().props;
const changeLanguage = (newLocale: string) => {
router.post(
'/locale',
{ locale: newLocale },
{
preserveScroll: true,
preserveState: true,
onSuccess: () => {
// The page will automatically update because Inertia
// will make a new request and get the updated translations
console.log('Language changed to:', newLocale);
},
},
);
};
return (
<>
<header className="mx-auto w-full text-sm not-has-[nav]:hidden">
<div className="bg-primary py-1.5 text-white/60 max-md:hidden">
<div className="mx-auto max-w-screen-2xl px-12 max-md:px-2">
<div className="mx-auto flex max-w-screen-2xl items-center justify-between px-12 max-md:px-2">
<ul className="flex items-center gap-4">
<li>
<a
@@ -49,6 +94,19 @@ export default function Navbar() {
</a>
</li>
</ul>
<Select value={locale} onValueChange={changeLanguage}>
<SelectTrigger className="h-0 w-32 border-0 focus-visible:ring-0">
<SelectValue />
</SelectTrigger>
<SelectContent>
<SelectGroup>
{/* <SelectLabel>Fruits</SelectLabel> */}
<SelectItem value="en">English</SelectItem>
<SelectItem value="cn"></SelectItem>
</SelectGroup>
</SelectContent>
</Select>
</div>
</div>
<div className="mx-auto w-full max-w-screen-2xl px-12 py-2 text-base not-has-[nav]:hidden max-md:px-4">
@@ -62,24 +120,26 @@ export default function Navbar() {
</Link>
<ul className="flex items-center gap-6 max-md:hidden">
<li>
<Link href={about()}>About Us</Link>
<Link href={about()}>{t('nav.about-us')}</Link>
</li>
<li>
<Link href={artOfWeaving()}>
Art of Weaving
{t('nav.art')}
</Link>
</li>
<li>
<Link href={product()}>Our Products</Link>
<Link href={index.product()}>
{t('nav.products')}
</Link>
</li>
<li>
<Link href={about()}>Bespoke Design</Link>
<Link href={bespoke()}>{t('nav.bespoke')}</Link>
</li>
<li>
<Link href={faq()}>FAQs</Link>
<Link href={faq()}>{t('nav.faq')}</Link>
</li>
<li>
<Link href={contact()}>Contact Us</Link>
<Link href={contact()}>{t('nav.contact')}</Link>
</li>
</ul>
@@ -94,28 +154,32 @@ export default function Navbar() {
</SheetDescription>
<ul className="mt-20 flex flex-col items-center justify-center gap-6">
<li>
<Link href={about()}>About Us</Link>
<Link href={about()}>
{t('nav.about-us')}
</Link>
</li>
<li>
<Link href={artOfWeaving()}>
Art of Weaving
{t('nav.art')}
</Link>
</li>
<li>
<Link href={product()}>
Our Products
<Link href={index.product()}>
{t('nav.products')}
</Link>
</li>
<li>
<Link href={about()}>
Bespoke Design
<Link href={bespoke()}>
{t('nav.bespoke')}
</Link>
</li>
<li>
<Link href={faq()}>FAQs</Link>
<Link href={faq()}>{t('nav.faq')}</Link>
</li>
<li>
<Link href={contact()}>Contact Us</Link>
<Link href={contact()}>
{t('nav.contact')}
</Link>
</li>
</ul>
</SheetContent>