feat: update Dockerfile, add category pages, fonts and product images
Rebuild Docker setup with simplified nginx-only Dockerfile (build runs on host). Add category detail pages, IRANSans font files, product images, and update all landing sections. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.6
parent
e31ef5a21f
commit
bb7f1e3378
@@ -0,0 +1,192 @@
|
||||
<script setup lang="ts">
|
||||
import { ArrowRight, Phone } from "lucide-vue-next";
|
||||
import { absUrl } from "#shared/config/site";
|
||||
import { CATEGORIES, findCategory } from "#shared/data/categories";
|
||||
import { categoryPageSchema } from "#shared/seo/schema";
|
||||
import AppShell from "~/components/layout/AppShell.vue";
|
||||
import Footer from "~/components/layout/Footer.vue";
|
||||
import SectionHead from "~/components/ui/SectionHead.vue";
|
||||
import Reveal from "~/components/ui/Reveal.vue";
|
||||
|
||||
const CATEGORY_IMAGES: Record<string, string> = {
|
||||
workwear: "/images/products/vest.jpg",
|
||||
"safety-footwear": "/images/products/shoes.jpg",
|
||||
"protective-gloves": "/images/products/gloves.jpg",
|
||||
"safety-helmets": "/images/products/helmet.jpg",
|
||||
"eye-protection": "/images/products/goggles.jpg",
|
||||
"hearing-protection": "/images/products/hearing.jpg",
|
||||
"respiratory-protection": "/images/products/respiratory.jpg",
|
||||
"traffic-equipment": "/images/products/traffic.jpg",
|
||||
};
|
||||
|
||||
const route = useRoute();
|
||||
const slug = route.params.slug as string;
|
||||
const category = findCategory(slug);
|
||||
|
||||
if (!category) {
|
||||
throw createError({ statusCode: 404, statusMessage: "دستهبندی یافت نشد" });
|
||||
}
|
||||
|
||||
const categoryIndex = CATEGORIES.findIndex((c) => c.slug === slug);
|
||||
const canonical = absUrl(`/categories/${slug}`);
|
||||
|
||||
useHead({
|
||||
title: `${category.name} | ایمن پیشگامان`,
|
||||
link: [{ rel: "canonical", href: canonical }],
|
||||
});
|
||||
useSeoMeta({
|
||||
description: category.fullDesc,
|
||||
robots: "index, follow",
|
||||
ogUrl: canonical,
|
||||
ogTitle: `${category.name} | ایمن پیشگامان`,
|
||||
ogDescription: category.fullDesc,
|
||||
});
|
||||
useJsonLd(categoryPageSchema(category), `category-${slug}`);
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<AppShell>
|
||||
<main>
|
||||
<!-- ---- hero banner ---- -->
|
||||
<section class="relative overflow-hidden pt-32 pb-20 md:pt-40 md:pb-28">
|
||||
<div class="absolute inset-0">
|
||||
<img
|
||||
v-if="CATEGORY_IMAGES[slug]"
|
||||
:src="CATEGORY_IMAGES[slug]"
|
||||
:alt="category.name"
|
||||
class="absolute inset-0 size-full object-cover"
|
||||
fetchpriority="high"
|
||||
decoding="async"
|
||||
/>
|
||||
<div class="absolute inset-0 bg-gradient-to-l from-bg via-bg/85 to-bg/40" />
|
||||
<div class="absolute inset-0 bg-gradient-to-t from-bg via-bg/50 to-bg/30" />
|
||||
<div class="absolute inset-0 bg-grid opacity-40" />
|
||||
</div>
|
||||
|
||||
<div class="tape-v absolute bottom-0 end-0 z-10 h-32 w-1.5 opacity-70" />
|
||||
|
||||
<div class="relative z-10 mx-auto max-w-[1480px] px-5 md:px-8">
|
||||
<Reveal>
|
||||
<nav class="flex items-center gap-2 text-sm text-muted" aria-label="مسیر">
|
||||
<NuxtLink to="/" class="transition-colors hover:text-accent">خانه</NuxtLink>
|
||||
<span class="text-line">/</span>
|
||||
<NuxtLink to="/#products" class="transition-colors hover:text-accent">
|
||||
محصولات
|
||||
</NuxtLink>
|
||||
<span class="text-line">/</span>
|
||||
<span class="text-ink">{{ category.name }}</span>
|
||||
</nav>
|
||||
</Reveal>
|
||||
|
||||
<div class="mt-8">
|
||||
<SectionHead
|
||||
:tag="`${faNum(String(categoryIndex + 1).padStart(2, '0'))} — محصولات`"
|
||||
:desc="category.fullDesc"
|
||||
>
|
||||
<template #title>{{ category.name }}</template>
|
||||
</SectionHead>
|
||||
</div>
|
||||
|
||||
<Reveal :delay="0.2">
|
||||
<div class="mt-8 flex flex-wrap items-center gap-4">
|
||||
<span
|
||||
class="rounded-full border border-accent/40 bg-accent/10 px-4 py-1.5 font-mono text-xs text-accent backdrop-blur"
|
||||
>
|
||||
{{ faNum(category.products.length) }} محصول
|
||||
</span>
|
||||
<span class="font-mono text-xs tracking-[0.25em] text-muted/60">
|
||||
{{ category.en }}
|
||||
</span>
|
||||
</div>
|
||||
</Reveal>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- ---- products grid ---- -->
|
||||
<section class="relative py-16 md:py-24">
|
||||
<div class="absolute inset-0 bg-grid-fine opacity-30" />
|
||||
<div class="relative mx-auto max-w-[1480px] px-5 md:px-8">
|
||||
<div class="grid grid-cols-1 gap-6 sm:grid-cols-2 lg:grid-cols-3">
|
||||
<Reveal v-for="(product, i) in category.products" :key="product.code" :delay="i * 0.06">
|
||||
<div
|
||||
class="group h-full overflow-hidden rounded-xl border border-line bg-panel/80 backdrop-blur transition-all duration-500 hover:border-accent/40 hover:shadow-[0_8px_40px_rgba(255,90,0,0.08)]"
|
||||
>
|
||||
<div class="relative aspect-[4/3] overflow-hidden">
|
||||
<img
|
||||
:src="CATEGORY_IMAGES[slug]"
|
||||
:alt="product.name"
|
||||
loading="lazy"
|
||||
decoding="async"
|
||||
class="size-full object-cover transition-transform duration-700 group-hover:scale-105"
|
||||
/>
|
||||
<div class="absolute inset-0 bg-gradient-to-t from-bg/60 to-transparent" />
|
||||
<div class="absolute inset-x-0 top-0 flex items-center justify-between p-4">
|
||||
<span class="rounded-full bg-bg/60 px-3 py-1 font-mono text-[10px] tracking-widest text-ink/70 backdrop-blur">
|
||||
{{ product.code }}
|
||||
</span>
|
||||
<span class="font-mono text-xs text-accent">
|
||||
{{ faNum(String(i + 1).padStart(2, "0")) }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="p-5 md:p-6">
|
||||
<h3 class="text-xl font-black">{{ product.name }}</h3>
|
||||
<p class="mt-1 font-mono text-[10px] tracking-[0.2em] text-muted">
|
||||
{{ product.en }}
|
||||
</p>
|
||||
|
||||
<p class="mt-3 text-sm leading-8 text-muted">{{ product.desc }}</p>
|
||||
|
||||
<div class="mt-4 flex flex-wrap gap-2">
|
||||
<span
|
||||
v-for="s in product.specs"
|
||||
:key="s"
|
||||
class="rounded-full border border-accent/40 bg-accent/10 px-3 py-1 font-mono text-[10px] text-accent"
|
||||
>
|
||||
{{ s }}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div v-if="product.variants?.length" class="mt-4">
|
||||
<div class="mb-2 text-xs text-muted">مدلها / رنگها:</div>
|
||||
<div class="flex flex-wrap gap-1.5">
|
||||
<span
|
||||
v-for="v in product.variants"
|
||||
:key="v"
|
||||
class="rounded-md border border-line bg-panel-2 px-2.5 py-1 text-[11px] text-ink/70"
|
||||
>
|
||||
{{ v }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</Reveal>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- ---- bottom CTA ---- -->
|
||||
<section class="border-t border-line py-12 md:py-16">
|
||||
<div class="mx-auto flex max-w-[1480px] flex-wrap items-center justify-between gap-6 px-5 md:px-8">
|
||||
<NuxtLink
|
||||
to="/#products"
|
||||
class="group inline-flex items-center gap-2 text-muted transition-colors hover:text-accent"
|
||||
>
|
||||
<ArrowRight class="size-4 transition-transform group-hover:translate-x-1" />
|
||||
بازگشت به دستهبندیها
|
||||
</NuxtLink>
|
||||
<a
|
||||
href="/#contact"
|
||||
class="inline-flex items-center gap-2 rounded-full bg-accent px-6 py-3 text-sm font-bold text-bg transition-all hover:bg-accent-soft hover:shadow-[0_8px_45px_rgba(255,90,0,0.5)]"
|
||||
>
|
||||
<Phone class="size-4" />
|
||||
درخواست قیمت
|
||||
</a>
|
||||
</div>
|
||||
</section>
|
||||
</main>
|
||||
<Footer />
|
||||
</AppShell>
|
||||
</template>
|
||||
Reference in New Issue
Block a user