feat: monorepo with NestJS API, admin panel and DB-driven website
Restructure the repo into a pnpm + Turborepo monorepo: - apps/web: Nuxt 4 site, now server-rendered and reading all content from the API; pages cached with SWR and purged on content changes - apps/api: NestJS 12 + Prisma 7 + PostgreSQL. Auth with short-lived access tokens and rotating httpOnly refresh cookies, roles (ADMIN, EDITOR), catalog, editable site sections, media upload to S3-compatible storage (converted to WebP), contact messages, audit log - apps/admin: Vue 3 admin panel (Ant Design Vue, Pinia, Tailwind) for products, categories, site sections, messages, media and users - packages/shared: Zod schemas and types shared by API and admin Also: - seed script that loads the original 8 categories / 89 products and section content - Docker images for api (with a one-off migrate service), web, admin, and an nginx gateway for both domains - dev and production compose files, daily database backup service - API e2e tests Removes the committed static out/ build and the old root Dockerfile. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
31076174e2
commit
789d224ea0
@@ -0,0 +1,81 @@
|
||||
<script setup lang="ts">
|
||||
import DynamicIcon from "~/components/ui/DynamicIcon.vue";
|
||||
import Lines from "~/components/ui/Lines.vue";
|
||||
import Reveal from "~/components/ui/Reveal.vue";
|
||||
import SectionHead from "~/components/ui/SectionHead.vue";
|
||||
|
||||
const about = computed(() => useSiteStore().sections.about);
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<section
|
||||
id="about"
|
||||
aria-labelledby="about-title"
|
||||
class="relative overflow-hidden border-t border-line py-24 md:py-32"
|
||||
>
|
||||
<div class="absolute inset-0 bg-grid-fine opacity-50" />
|
||||
|
||||
<div class="relative mx-auto max-w-[1480px] px-5 md:px-8">
|
||||
<div class="grid items-center gap-14 lg:grid-cols-2">
|
||||
<!-- ---- image ---- -->
|
||||
<Reveal class="relative order-2 lg:order-1" :delay="0.1">
|
||||
<div class="relative overflow-hidden rounded-2xl border border-line">
|
||||
<img
|
||||
:src="about.image.url"
|
||||
:alt="about.image.alt"
|
||||
width="800"
|
||||
height="600"
|
||||
loading="lazy"
|
||||
decoding="async"
|
||||
class="aspect-[4/3] w-full object-cover"
|
||||
/>
|
||||
<div class="absolute inset-0 bg-gradient-to-t from-bg/80 via-transparent to-transparent" />
|
||||
<div
|
||||
class="absolute bottom-5 start-5 flex items-center gap-4 rounded-xl border border-line bg-bg/80 px-5 py-4 backdrop-blur-md"
|
||||
>
|
||||
<span class="font-mono text-3xl font-bold text-accent">{{ about.badge.value }}</span>
|
||||
<span class="text-xs leading-5 text-muted">
|
||||
<Lines :text="about.badge.label" />
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="hazard absolute -top-3 -end-3 h-6 w-28 rounded-full opacity-90" />
|
||||
</Reveal>
|
||||
|
||||
<!-- ---- text ---- -->
|
||||
<div class="order-1 lg:order-2">
|
||||
<SectionHead heading-id="about-title" v-bind="about.head" />
|
||||
<Reveal :delay="0.2">
|
||||
<p class="mt-6 leading-9 text-muted">
|
||||
{{ about.body }}
|
||||
</p>
|
||||
</Reveal>
|
||||
|
||||
<div class="mt-10 space-y-1">
|
||||
<Reveal v-for="(t, i) in about.timeline" :key="t.year" :delay="0.25 + i * 0.07">
|
||||
<div
|
||||
class="group border-s-2 border-accent/30 ps-6 transition-colors duration-300 hover:border-accent"
|
||||
>
|
||||
<span class="font-mono text-sm font-bold text-accent">{{ t.year }}</span>
|
||||
<p class="mt-1 pb-5 text-sm leading-7 text-ink/75">{{ t.text }}</p>
|
||||
</div>
|
||||
</Reveal>
|
||||
</div>
|
||||
|
||||
<Reveal :delay="0.5">
|
||||
<div class="mt-4 flex flex-wrap gap-3">
|
||||
<span
|
||||
v-for="f in about.features"
|
||||
:key="f.label"
|
||||
class="inline-flex items-center gap-2 rounded-full border border-line bg-panel/60 px-4 py-2 text-xs text-ink/80 transition-colors hover:border-accent/50 hover:text-ink"
|
||||
>
|
||||
<DynamicIcon :name="f.icon" class="size-4 text-accent" />
|
||||
{{ f.label }}
|
||||
</span>
|
||||
</div>
|
||||
</Reveal>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</template>
|
||||
@@ -0,0 +1,195 @@
|
||||
<script setup lang="ts">
|
||||
import { Button as AButton, Form as AForm, FormItem as AFormItem, Input as AInput, Textarea as ATextarea } from "ant-design-vue";
|
||||
import type { Rule } from "ant-design-vue/es/form";
|
||||
import {
|
||||
CheckCircle2,
|
||||
Clock,
|
||||
Loader2,
|
||||
Mail,
|
||||
MapPin,
|
||||
Phone,
|
||||
Send,
|
||||
Siren,
|
||||
} from "lucide-vue-next";
|
||||
import Lines from "~/components/ui/Lines.vue";
|
||||
import Reveal from "~/components/ui/Reveal.vue";
|
||||
import SectionHead from "~/components/ui/SectionHead.vue";
|
||||
|
||||
const site = useSiteStore();
|
||||
const content = computed(() => site.sections.contact);
|
||||
|
||||
const INFO = computed(() => {
|
||||
const s = site.settings;
|
||||
return [
|
||||
{ icon: MapPin, label: "نشانی", value: `${s.address.locality}، ${s.address.street}` },
|
||||
{ icon: Phone, label: "تلفن تماس", value: s.phoneDisplay, ltr: true, href: `tel:${s.phone}` },
|
||||
{ icon: Mail, label: "ایمیل", value: s.email, ltr: true, href: `mailto:${s.email}` },
|
||||
{ icon: Clock, label: "ساعات کاری", value: s.workingHours },
|
||||
];
|
||||
});
|
||||
|
||||
const required = (message: string): Rule[] => [
|
||||
{ required: true, whitespace: true, message, trigger: "blur" },
|
||||
];
|
||||
|
||||
const rules: Record<string, Rule[]> = {
|
||||
name: required("لطفاً نام و نام خانوادگی را وارد کنید"),
|
||||
org: required("لطفاً نام سازمان را وارد کنید"),
|
||||
phone: required("لطفاً شماره تماس را وارد کنید"),
|
||||
};
|
||||
|
||||
const contact = useContactStore();
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<section
|
||||
id="contact"
|
||||
aria-labelledby="contact-title"
|
||||
class="relative overflow-hidden border-t border-line py-24 md:py-32"
|
||||
>
|
||||
<div class="absolute inset-0 bg-grid-fine opacity-40" />
|
||||
|
||||
<div class="relative mx-auto max-w-[1480px] px-5 md:px-8">
|
||||
<div class="grid gap-14 lg:grid-cols-2">
|
||||
<!-- ---- info ---- -->
|
||||
<div>
|
||||
<SectionHead heading-id="contact-title" v-bind="content.head" />
|
||||
|
||||
<div class="mt-10 space-y-1">
|
||||
<Reveal v-for="(item, i) in INFO" :key="item.label" :delay="0.15 + i * 0.06">
|
||||
<div class="group flex items-center gap-4 border-b border-line/70 py-4">
|
||||
<span
|
||||
class="flex size-11 shrink-0 items-center justify-center rounded-lg border border-line text-accent transition-colors duration-300 group-hover:border-accent/50"
|
||||
>
|
||||
<component :is="item.icon" class="size-5" />
|
||||
</span>
|
||||
<div class="min-w-0">
|
||||
<div class="text-xs text-muted">{{ item.label }}</div>
|
||||
<component
|
||||
:is="item.href ? 'a' : 'div'"
|
||||
:href="item.href"
|
||||
:class="`mt-1 block text-sm font-medium ${item.ltr ? 'font-mono tracking-wider' : ''}`"
|
||||
:dir="item.ltr ? 'ltr' : 'rtl'"
|
||||
>
|
||||
{{ item.value }}
|
||||
</component>
|
||||
</div>
|
||||
</div>
|
||||
</Reveal>
|
||||
</div>
|
||||
|
||||
<Reveal :delay="0.45">
|
||||
<div class="mt-8 flex items-start gap-4 rounded-xl border border-hazard/30 bg-hazard/5 p-5">
|
||||
<Siren class="size-6 shrink-0 text-hazard" />
|
||||
<div>
|
||||
<div class="font-bold text-hazard">{{ content.emergencyTitle }}</div>
|
||||
<p class="mt-1.5 text-sm leading-7 text-muted">
|
||||
{{ content.emergencyText }}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</Reveal>
|
||||
</div>
|
||||
|
||||
<!-- ---- form ---- -->
|
||||
<Reveal :delay="0.15">
|
||||
<div class="rounded-2xl border border-line bg-panel/60 p-6 backdrop-blur md:p-9">
|
||||
<div v-if="content.formTag" class="font-mono text-xs tracking-[0.25em] text-accent">
|
||||
{{ content.formTag }}
|
||||
</div>
|
||||
<h3 class="mt-3 text-2xl font-black leading-snug">
|
||||
<Lines :text="content.formTitle" />
|
||||
</h3>
|
||||
|
||||
<div
|
||||
v-if="contact.status === 'success'"
|
||||
class="mt-10 flex flex-col items-center rounded-xl border border-emerald-500/30 bg-emerald-500/5 p-10 text-center"
|
||||
>
|
||||
<CheckCircle2 class="size-14 text-emerald-400" />
|
||||
<div class="mt-5 text-xl font-black">{{ content.successTitle }}</div>
|
||||
<p class="mt-2.5 max-w-sm text-sm leading-7 text-muted">
|
||||
{{ content.successText }}
|
||||
</p>
|
||||
<button
|
||||
type="button"
|
||||
class="mt-7 rounded-full border border-line px-7 py-3 text-sm transition-colors hover:border-accent hover:text-accent"
|
||||
@click="contact.reset"
|
||||
>
|
||||
ثبت درخواست جدید
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<AForm
|
||||
v-else
|
||||
class="contact-form"
|
||||
layout="vertical"
|
||||
:model="contact.form"
|
||||
:rules="rules"
|
||||
hide-required-mark
|
||||
@finish="contact.submit"
|
||||
>
|
||||
<!-- honeypot: hidden from people, bots tend to fill it -->
|
||||
<div class="absolute -start-[9999px] h-px w-px overflow-hidden" aria-hidden="true">
|
||||
<label for="f-website">وبسایت</label>
|
||||
<input id="f-website" v-model="contact.form.website" type="text" tabindex="-1" autocomplete="off" />
|
||||
</div>
|
||||
<div class="mt-8 grid gap-5 sm:grid-cols-2">
|
||||
<AFormItem name="name" label="نام و نام خانوادگی *" html-for="f-name">
|
||||
<AInput id="f-name" v-model:value="contact.form.name" placeholder="مثلاً: علی رضایی" />
|
||||
</AFormItem>
|
||||
<AFormItem name="org" label="نام سازمان *" html-for="f-org">
|
||||
<AInput
|
||||
id="f-org"
|
||||
v-model:value="contact.form.org"
|
||||
placeholder="مثلاً: شرکت پتروشیمی خلیج"
|
||||
/>
|
||||
</AFormItem>
|
||||
<AFormItem class="sm:col-span-2" name="phone" label="شماره تماس *" html-for="f-phone">
|
||||
<AInput
|
||||
id="f-phone"
|
||||
v-model:value="contact.form.phone"
|
||||
type="tel"
|
||||
dir="ltr"
|
||||
placeholder="0912 000 0000"
|
||||
/>
|
||||
</AFormItem>
|
||||
<AFormItem class="sm:col-span-2" name="message" label="شرح درخواست" html-for="f-msg">
|
||||
<ATextarea
|
||||
id="f-msg"
|
||||
v-model:value="contact.form.message"
|
||||
:rows="4"
|
||||
placeholder="تجهیزات موردنیاز، تعداد پرسنل یا هر نکتهای که لازم است بدانیم..."
|
||||
/>
|
||||
</AFormItem>
|
||||
<p
|
||||
v-if="contact.status === 'error'"
|
||||
class="rounded-lg border border-accent/40 bg-accent/10 px-4 py-3 text-sm leading-7 text-accent sm:col-span-2"
|
||||
role="alert"
|
||||
>
|
||||
{{ contact.error }}
|
||||
</p>
|
||||
<div class="sm:col-span-2">
|
||||
<AButton
|
||||
type="primary"
|
||||
html-type="submit"
|
||||
class="contact-submit"
|
||||
:disabled="contact.status === 'loading'"
|
||||
>
|
||||
<template v-if="contact.status === 'loading'">
|
||||
<Loader2 class="size-5 animate-spin" />
|
||||
در حال ارسال...
|
||||
</template>
|
||||
<template v-else>
|
||||
<Send class="size-5" />
|
||||
ارسال درخواست مشاوره
|
||||
</template>
|
||||
</AButton>
|
||||
</div>
|
||||
</div>
|
||||
</AForm>
|
||||
</div>
|
||||
</Reveal>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</template>
|
||||
@@ -0,0 +1,29 @@
|
||||
<script setup lang="ts">
|
||||
import { useInView } from "motion-v";
|
||||
|
||||
const props = withDefaults(
|
||||
defineProps<{ end: number; suffix?: string; duration?: number }>(),
|
||||
{ suffix: "", duration: 1800 },
|
||||
);
|
||||
|
||||
const el = ref<HTMLSpanElement | null>(null);
|
||||
const inView = useInView(el, { once: true, margin: "-60px" });
|
||||
const val = ref(0);
|
||||
let raf = 0;
|
||||
|
||||
watch(inView, (v) => {
|
||||
if (!v) return;
|
||||
const t0 = performance.now();
|
||||
const tick = (t: number) => {
|
||||
const p = Math.min(1, (t - t0) / props.duration);
|
||||
val.value = Math.round(props.end * (1 - Math.pow(1 - p, 3)));
|
||||
if (p < 1) raf = requestAnimationFrame(tick);
|
||||
};
|
||||
raf = requestAnimationFrame(tick);
|
||||
});
|
||||
onBeforeUnmount(() => cancelAnimationFrame(raf));
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<span ref="el" class="tabular-nums">{{ val.toLocaleString("fa-IR") }}<span v-if="suffix" class="text-accent">{{ suffix }}</span></span>
|
||||
</template>
|
||||
@@ -0,0 +1,173 @@
|
||||
<script setup lang="ts">
|
||||
import { ArrowLeft, ChevronDown, HardHat } from "lucide-vue-next";
|
||||
import DynamicIcon from "~/components/ui/DynamicIcon.vue";
|
||||
|
||||
const hero = computed(() => useSiteStore().sections.hero);
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<section id="home" class="relative flex min-h-screen flex-col overflow-hidden">
|
||||
<!-- ---- background ---- -->
|
||||
<div class="absolute inset-0">
|
||||
<img
|
||||
:src="hero.image.url"
|
||||
:alt="hero.image.alt"
|
||||
width="1792"
|
||||
height="1008"
|
||||
fetchpriority="high"
|
||||
decoding="async"
|
||||
class="absolute inset-0 size-full object-cover"
|
||||
/>
|
||||
<div class="absolute inset-0 bg-gradient-to-l from-bg via-bg/80 to-bg/25" />
|
||||
<div class="absolute inset-0 bg-gradient-to-t from-bg via-transparent to-bg/60" />
|
||||
<div class="absolute inset-0 bg-grid opacity-50" />
|
||||
</div>
|
||||
|
||||
<!-- ---- side tape ---- -->
|
||||
<div class="tape-v absolute bottom-0 end-0 z-10 h-44 w-1.5 opacity-70" />
|
||||
|
||||
<!-- ---- content ---- -->
|
||||
<div
|
||||
class="relative z-10 mx-auto flex w-full max-w-[1480px] flex-1 items-center px-5 pb-24 pt-36 md:px-8"
|
||||
>
|
||||
<div class="grid w-full items-center gap-12 lg:grid-cols-12">
|
||||
<div class="lg:col-span-7">
|
||||
<div
|
||||
class="animate-fade-up-1 inline-flex items-center gap-2.5 rounded-full border border-accent/30 bg-accent/10 px-4 py-2 backdrop-blur"
|
||||
>
|
||||
<span class="size-1.5 animate-pulse rounded-full bg-accent" />
|
||||
<span class="text-xs font-medium text-accent">
|
||||
{{ hero.badge }}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<h1
|
||||
class="animate-fade-up-2 mt-7 text-5xl font-black leading-[1.15] md:text-7xl md:leading-[1.1]"
|
||||
>
|
||||
{{ hero.title }}
|
||||
<br />
|
||||
<span
|
||||
class="mt-3 inline-block -rotate-1 rounded-lg bg-hazard px-4 py-1.5 text-bg shadow-[0_10px_50px_rgba(255,184,0,0.25)]"
|
||||
>
|
||||
{{ hero.titleHighlight }}
|
||||
</span>
|
||||
</h1>
|
||||
|
||||
<p
|
||||
class="animate-fade-up-3 mt-7 max-w-xl text-base leading-9 text-ink/70 md:text-lg md:leading-10"
|
||||
>
|
||||
{{ hero.intro }}
|
||||
</p>
|
||||
|
||||
<div class="animate-fade-up-4 mt-9 flex flex-wrap items-center gap-4">
|
||||
<a
|
||||
:href="hero.primaryCta.href"
|
||||
class="group inline-flex items-center gap-2.5 rounded-full bg-accent px-7 py-4 font-bold text-bg transition-all duration-300 hover:bg-accent-soft hover:shadow-[0_8px_45px_rgba(255,90,0,0.5)]"
|
||||
>
|
||||
{{ hero.primaryCta.label }}
|
||||
<ArrowLeft
|
||||
class="size-5 transition-transform duration-300 group-hover:-translate-x-1.5"
|
||||
/>
|
||||
</a>
|
||||
<a
|
||||
:href="hero.secondaryCta.href"
|
||||
class="inline-flex items-center gap-2.5 rounded-full border border-ink/25 px-7 py-4 font-bold text-ink backdrop-blur transition-colors duration-300 hover:border-accent hover:text-accent"
|
||||
>
|
||||
{{ hero.secondaryCta.label }}
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="animate-fade-up-5 mt-10 flex flex-wrap gap-3">
|
||||
<span
|
||||
v-for="c in hero.chips"
|
||||
:key="c.label"
|
||||
class="inline-flex items-center gap-2 rounded-full border border-ink/15 bg-bg/50 px-4 py-2 font-mono text-[11px] tracking-wider text-ink/70 backdrop-blur transition-colors hover:border-accent/50 hover:text-ink"
|
||||
>
|
||||
<DynamicIcon :name="c.icon" class="size-4 text-accent" />
|
||||
{{ c.label }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- ---- rotating badge + status card ---- -->
|
||||
<div class="hidden flex-col items-center gap-10 lg:col-span-5 lg:flex">
|
||||
<div class="animate-fade-up-6 relative">
|
||||
<div class="relative size-44">
|
||||
<div class="animate-spin-slow absolute inset-0">
|
||||
<svg viewBox="0 0 120 120" class="size-full">
|
||||
<defs>
|
||||
<path
|
||||
id="badge-circle"
|
||||
d="M60,60 m-47,0 a47,47 0 1,1 94,0 a47,47 0 1,1 -94,0"
|
||||
/>
|
||||
</defs>
|
||||
<text font-size="9" letter-spacing="2.6" class="fill-ink/60 font-mono">
|
||||
<textPath href="#badge-circle">
|
||||
IMEN PISHGAMAN SAFETY • ISO 9001 • CE CERTIFIED • EST 2007 •
|
||||
</textPath>
|
||||
</text>
|
||||
</svg>
|
||||
</div>
|
||||
<div class="absolute inset-0 flex items-center justify-center">
|
||||
<span
|
||||
class="flex size-20 items-center justify-center rounded-full border border-accent/30 bg-accent/10"
|
||||
>
|
||||
<HardHat class="size-9 text-accent" />
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div
|
||||
class="animate-fade-up-7 w-full max-w-sm border border-line bg-bg/70 p-5 backdrop-blur-md"
|
||||
>
|
||||
<div class="flex items-center justify-between font-mono text-[11px]">
|
||||
<span class="text-muted">SITE STATUS</span>
|
||||
<span class="flex items-center gap-2 text-emerald-400">
|
||||
<span class="size-1.5 animate-pulse rounded-full bg-emerald-400" />
|
||||
SECURE
|
||||
</span>
|
||||
</div>
|
||||
<div class="mt-3.5 flex items-center justify-between font-mono text-[11px]">
|
||||
<span class="text-muted">PPE COMPLIANCE</span>
|
||||
<span class="font-semibold text-accent">۱۰۰٪</span>
|
||||
</div>
|
||||
<div
|
||||
v-if="hero.lastInspection"
|
||||
class="mt-3.5 flex items-center justify-between font-mono text-[11px]"
|
||||
>
|
||||
<span class="text-muted">آخرین بازرسی</span>
|
||||
<span>{{ hero.lastInspection }}</span>
|
||||
</div>
|
||||
<div class="my-4 h-px bg-line" />
|
||||
<div class="font-mono text-[11px] leading-6 text-muted">
|
||||
سیستم پایش حرفهای ایمن پیشگامان<span class="animate-blink text-accent">▍</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- ---- scroll hint ---- -->
|
||||
<div class="animate-fade-up-9 absolute bottom-28 left-1/2 z-10 hidden md:block">
|
||||
<div class="-translate-x-1/2 flex flex-col items-center gap-2">
|
||||
<span class="font-mono text-[10px] tracking-[0.35em] text-muted">SCROLL</span>
|
||||
<ChevronDown class="size-4 animate-bounce text-accent" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- ---- bottom bar ---- -->
|
||||
<div class="animate-fade-up-8 relative z-10 border-t border-ink/10 backdrop-blur-sm">
|
||||
<div class="mx-auto grid max-w-[1480px] grid-cols-1 gap-px bg-ink/10 sm:grid-cols-3">
|
||||
<div
|
||||
v-for="s in hero.miniStats"
|
||||
:key="s.label"
|
||||
class="flex items-baseline gap-4 bg-bg/60 px-6 py-5 backdrop-blur-md md:px-8"
|
||||
>
|
||||
<span class="text-2xl font-black text-ink md:text-3xl">{{ s.value }}</span>
|
||||
<span class="text-xs leading-5 text-muted md:text-sm">{{ s.label }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</template>
|
||||
@@ -0,0 +1,101 @@
|
||||
<script setup lang="ts">
|
||||
import { AnimatePresence, motion, useMotionValue, useSpring } from "motion-v";
|
||||
import { ArrowLeft } from "lucide-vue-next";
|
||||
import SectionHead from "~/components/ui/SectionHead.vue";
|
||||
|
||||
const industries = computed(() => useSiteStore().sections.industries);
|
||||
const INDUSTRIES = computed(() => industries.value.items);
|
||||
|
||||
const hovered = ref<number | null>(null);
|
||||
const x = useMotionValue(0);
|
||||
const y = useMotionValue(0);
|
||||
const sx = useSpring(x, { stiffness: 220, damping: 26, mass: 0.6 });
|
||||
const sy = useSpring(y, { stiffness: 220, damping: 26, mass: 0.6 });
|
||||
|
||||
const onMove = (e: MouseEvent) => {
|
||||
x.set(e.clientX);
|
||||
y.set(e.clientY);
|
||||
};
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<section
|
||||
id="industries"
|
||||
aria-labelledby="industries-title"
|
||||
class="relative border-t border-line py-24 md:py-32"
|
||||
@mousemove="onMove"
|
||||
>
|
||||
<div class="mx-auto max-w-[1480px] px-5 md:px-8">
|
||||
<SectionHead heading-id="industries-title" v-bind="industries.head" />
|
||||
|
||||
<div class="mt-16" @mouseleave="hovered = null">
|
||||
<motion.div
|
||||
v-for="(ind, i) in INDUSTRIES"
|
||||
:key="ind.name"
|
||||
v-bind="fade(i * 0.05)"
|
||||
data-hover
|
||||
:class="`group relative flex cursor-pointer items-center justify-between gap-4 border-t border-line px-2 py-7 transition-colors duration-300 hover:bg-panel/40 md:px-4 md:py-9 ${
|
||||
i === INDUSTRIES.length - 1 ? 'border-b' : ''
|
||||
}`"
|
||||
@mouseenter="hovered = i"
|
||||
>
|
||||
<div class="flex min-w-0 items-baseline gap-5 md:gap-8">
|
||||
<span class="shrink-0 font-mono text-xs text-muted">
|
||||
{{ faNum(String(i + 1).padStart(2, "0")) }}
|
||||
</span>
|
||||
<h3
|
||||
class="truncate text-2xl font-black transition-all duration-300 group-hover:-translate-x-2 group-hover:text-accent md:text-5xl"
|
||||
>
|
||||
{{ ind.name }}
|
||||
</h3>
|
||||
<span
|
||||
class="hidden shrink-0 font-mono text-[10px] tracking-[0.3em] text-muted/60 md:inline"
|
||||
>
|
||||
{{ ind.nameEn }}
|
||||
</span>
|
||||
</div>
|
||||
<div class="flex shrink-0 items-center gap-4 md:gap-8">
|
||||
<span v-if="ind.count" class="text-xs text-muted md:text-sm">{{ ind.count }} پروژه</span>
|
||||
<span
|
||||
class="flex size-10 items-center justify-center rounded-full border border-line text-muted transition-all duration-300 group-hover:-translate-x-1.5 group-hover:border-accent group-hover:text-accent md:size-12"
|
||||
>
|
||||
<ArrowLeft class="size-4 md:size-5" />
|
||||
</span>
|
||||
</div>
|
||||
</motion.div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- ---- floating preview (desktop) ---- -->
|
||||
<motion.div
|
||||
:style="{ x: sx, y: sy }"
|
||||
class="pointer-events-none fixed left-0 top-0 z-40 hidden lg:block"
|
||||
>
|
||||
<AnimatePresence>
|
||||
<motion.div
|
||||
v-if="hovered !== null"
|
||||
:key="hovered"
|
||||
:initial="{ opacity: 0, scale: 0.82, rotate: -3 }"
|
||||
:animate="{ opacity: 1, scale: 1, rotate: 0 }"
|
||||
:exit="{ opacity: 0, scale: 0.9, rotate: 2 }"
|
||||
:transition="{ duration: 0.35, ease: EASE }"
|
||||
class="relative -ml-40 -mt-28 h-56 w-80 overflow-hidden rounded-xl border border-accent/40 shadow-[0_25px_80px_rgba(0,0,0,0.6)]"
|
||||
>
|
||||
<img
|
||||
:src="INDUSTRIES[hovered]!.image.url"
|
||||
:alt="INDUSTRIES[hovered]!.image.alt || INDUSTRIES[hovered]!.name"
|
||||
decoding="async"
|
||||
class="absolute inset-0 size-full object-cover grayscale-[35%] transition-all duration-500"
|
||||
/>
|
||||
<div class="absolute inset-0 bg-accent/15 mix-blend-multiply" />
|
||||
<div class="absolute inset-0 bg-gradient-to-t from-bg/70 to-transparent" />
|
||||
<div
|
||||
class="absolute bottom-3 start-3 rounded-md border border-line bg-bg/80 px-3 py-1.5 font-mono text-[10px] tracking-widest text-ink backdrop-blur"
|
||||
>
|
||||
{{ INDUSTRIES[hovered]!.nameEn }}
|
||||
</div>
|
||||
</motion.div>
|
||||
</AnimatePresence>
|
||||
</motion.div>
|
||||
</section>
|
||||
</template>
|
||||
@@ -0,0 +1,146 @@
|
||||
<script setup lang="ts">
|
||||
import { ArrowLeft } from "lucide-vue-next";
|
||||
import DynamicIcon from "~/components/ui/DynamicIcon.vue";
|
||||
import Reveal from "~/components/ui/Reveal.vue";
|
||||
import SectionHead from "~/components/ui/SectionHead.vue";
|
||||
|
||||
const site = useSiteStore();
|
||||
const intro = computed(() => site.sections.productsIntro);
|
||||
const categories = computed(() => site.categories);
|
||||
|
||||
const active = ref(0);
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<section id="products" aria-labelledby="products-title" class="relative py-24 md:py-32">
|
||||
<div class="mx-auto max-w-[1480px] px-5 md:px-8">
|
||||
<div class="flex flex-wrap items-end justify-between gap-6">
|
||||
<SectionHead heading-id="products-title" v-bind="intro.head" />
|
||||
<Reveal :delay="0.2" class="hidden md:block">
|
||||
<a
|
||||
href="/#contact"
|
||||
class="group inline-flex items-center gap-2 rounded-full border border-line px-6 py-3 text-sm text-muted transition-colors hover:border-accent hover:text-accent"
|
||||
>
|
||||
{{ intro.ctaLabel }}
|
||||
<ArrowLeft class="size-4 transition-transform group-hover:-translate-x-1" />
|
||||
</a>
|
||||
</Reveal>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- ---- mobile: card grid ---- -->
|
||||
<div class="mx-auto mt-14 max-w-[1480px] px-5 md:hidden">
|
||||
<div class="grid grid-cols-2 gap-3">
|
||||
<Reveal v-for="(cat, i) in categories" :key="cat.code" :delay="i * 0.05">
|
||||
<NuxtLink
|
||||
:to="`/categories/${cat.slug}`"
|
||||
class="group relative block aspect-[3/4] overflow-hidden rounded-xl border border-line transition-colors duration-300 active:border-accent/60"
|
||||
>
|
||||
<img
|
||||
v-if="cat.coverImage"
|
||||
:src="cat.coverImage"
|
||||
:alt="cat.name"
|
||||
loading="lazy"
|
||||
decoding="async"
|
||||
class="absolute inset-0 size-full object-cover transition-transform duration-500 group-active:scale-105"
|
||||
/>
|
||||
<div v-else class="absolute inset-0 bg-panel" />
|
||||
<div class="absolute inset-0 bg-gradient-to-t from-bg via-bg/50 to-transparent" />
|
||||
|
||||
<div class="absolute inset-x-0 top-0 flex items-center justify-between p-3">
|
||||
<span class="font-mono text-[9px] tracking-widest text-ink/50">{{ cat.code }}</span>
|
||||
<span class="font-mono text-[10px] text-accent">
|
||||
{{ faNum(String(i + 1).padStart(2, "0")) }}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="absolute inset-x-0 bottom-0 p-3">
|
||||
<h3 class="text-sm font-black leading-6">{{ cat.name }}</h3>
|
||||
<p class="mt-0.5 font-mono text-[8px] tracking-[0.15em] text-muted">{{ cat.nameEn }}</p>
|
||||
</div>
|
||||
</NuxtLink>
|
||||
</Reveal>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- ---- desktop: accordion panels ---- -->
|
||||
<div class="mx-auto mt-14 hidden max-w-[1480px] px-8 md:block">
|
||||
<div class="flex h-[74vh] min-h-[580px] flex-row gap-2">
|
||||
<NuxtLink
|
||||
v-for="(cat, i) in categories"
|
||||
:key="cat.code"
|
||||
:to="`/categories/${cat.slug}`"
|
||||
data-hover
|
||||
:class="`group relative cursor-pointer overflow-hidden rounded-xl border transition-all duration-500 ease-[cubic-bezier(0.22,1,0.36,1)] ${
|
||||
active === i
|
||||
? 'flex-[3.4] border-accent/60'
|
||||
: 'flex-[1] border-line hover:border-ink/30'
|
||||
}`"
|
||||
@mouseenter="active = i"
|
||||
>
|
||||
<img
|
||||
v-if="cat.coverImage"
|
||||
:src="cat.coverImage"
|
||||
:alt="cat.name"
|
||||
loading="lazy"
|
||||
decoding="async"
|
||||
:class="`absolute inset-0 size-full object-cover transition-all duration-700 ${
|
||||
active === i ? 'scale-100 grayscale-0' : 'scale-110 grayscale group-hover:grayscale-0'
|
||||
}`"
|
||||
/>
|
||||
<div
|
||||
v-else
|
||||
class="absolute inset-0 bg-panel"
|
||||
/>
|
||||
<div
|
||||
:class="`absolute inset-0 transition-opacity duration-700 ${
|
||||
active === i
|
||||
? 'bg-gradient-to-t from-bg via-bg/35 to-bg/5'
|
||||
: 'bg-gradient-to-t from-bg/95 via-bg/30 to-transparent'
|
||||
}`"
|
||||
/>
|
||||
|
||||
<div class="absolute inset-x-0 top-0 flex items-center justify-between p-5">
|
||||
<span class="font-mono text-[10px] tracking-widest text-ink/60">{{ cat.code }}</span>
|
||||
<span
|
||||
:class="`font-mono text-xs transition-colors duration-500 ${
|
||||
active === i ? 'text-accent' : 'text-ink/40'
|
||||
}`"
|
||||
>
|
||||
{{ faNum(String(i + 1).padStart(2, "0")) }}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="absolute inset-x-0 bottom-0 p-6">
|
||||
<h3
|
||||
:class="`font-black transition-all duration-500 ${
|
||||
active === i ? 'text-2xl' : 'text-sm'
|
||||
}`"
|
||||
>
|
||||
{{ cat.name }}
|
||||
</h3>
|
||||
<p class="mt-1 font-mono text-[10px] tracking-[0.2em] text-muted">{{ cat.nameEn }}</p>
|
||||
</div>
|
||||
</NuxtLink>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div
|
||||
class="mx-auto mt-10 grid max-w-[1480px] gap-px overflow-hidden rounded-xl border border-line bg-line md:grid-cols-3"
|
||||
>
|
||||
<Reveal v-for="(t, i) in intro.trust" :key="t.title" :delay="i * 0.08">
|
||||
<div class="flex h-full items-center gap-4 bg-panel/60 p-6">
|
||||
<span
|
||||
class="flex size-12 shrink-0 items-center justify-center rounded-xl bg-accent/10 text-accent"
|
||||
>
|
||||
<DynamicIcon :name="t.icon" class="size-6" />
|
||||
</span>
|
||||
<div>
|
||||
<div class="font-bold">{{ t.title }}</div>
|
||||
<div class="mt-1 text-xs leading-6 text-muted">{{ t.desc }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</Reveal>
|
||||
</div>
|
||||
</section>
|
||||
</template>
|
||||
@@ -0,0 +1,93 @@
|
||||
<script setup lang="ts">
|
||||
import { AnimatePresence, motion } from "motion-v";
|
||||
import { Plus } from "lucide-vue-next";
|
||||
import DynamicIcon from "~/components/ui/DynamicIcon.vue";
|
||||
import Reveal from "~/components/ui/Reveal.vue";
|
||||
import SectionHead from "~/components/ui/SectionHead.vue";
|
||||
import { serviceSchema } from "#shared/seo/schema";
|
||||
|
||||
const services = computed(() => useSiteStore().sections.services);
|
||||
const seo = useSeoContext();
|
||||
|
||||
useJsonLd(
|
||||
services.value.items.map((s) => serviceSchema(seo, { name: s.title, description: s.desc })),
|
||||
"services",
|
||||
);
|
||||
|
||||
const open = ref(0);
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<section id="services" aria-labelledby="services-title" class="border-t border-line py-24 md:py-32">
|
||||
<div class="mx-auto max-w-[1480px] px-5 md:px-8">
|
||||
<SectionHead heading-id="services-title" v-bind="services.head" />
|
||||
|
||||
<div class="mt-16">
|
||||
<Reveal v-for="(s, i) in services.items" :key="s.title" :delay="i * 0.05">
|
||||
<div :class="`border-t border-line ${i === services.items.length - 1 ? 'border-b' : ''}`">
|
||||
<button
|
||||
class="group flex w-full items-center gap-5 py-7 text-start md:gap-10 md:py-9"
|
||||
@click="open = open === i ? -1 : i"
|
||||
>
|
||||
<span
|
||||
:class="`font-mono text-sm transition-colors duration-300 md:text-base ${
|
||||
open === i ? 'text-accent' : 'text-muted'
|
||||
}`"
|
||||
>
|
||||
{{ faNum(String(i + 1).padStart(2, "0")) }}
|
||||
</span>
|
||||
<span
|
||||
:class="`flex-1 text-2xl font-black transition-colors duration-300 md:text-4xl ${
|
||||
open === i ? 'text-accent' : 'text-ink group-hover:text-accent'
|
||||
}`"
|
||||
>
|
||||
{{ s.title }}
|
||||
</span>
|
||||
<span
|
||||
:class="`hidden size-12 shrink-0 items-center justify-center rounded-full border transition-all duration-500 md:flex ${
|
||||
open === i
|
||||
? 'rotate-45 border-accent bg-accent text-bg'
|
||||
: 'border-line text-muted group-hover:border-accent/50 group-hover:text-accent'
|
||||
}`"
|
||||
>
|
||||
<Plus class="size-5" />
|
||||
</span>
|
||||
</button>
|
||||
|
||||
<AnimatePresence :initial="false">
|
||||
<motion.div
|
||||
v-if="open === i"
|
||||
:initial="{ height: 0, opacity: 0 }"
|
||||
:animate="{ height: 'auto', opacity: 1 }"
|
||||
:exit="{ height: 0, opacity: 0 }"
|
||||
:transition="{ duration: 0.55, ease: EASE }"
|
||||
class="overflow-hidden"
|
||||
>
|
||||
<div class="grid gap-8 pb-10 md:grid-cols-2 md:ps-16">
|
||||
<div class="flex items-start gap-4">
|
||||
<span
|
||||
class="flex size-12 shrink-0 items-center justify-center rounded-xl bg-accent/10 text-accent"
|
||||
>
|
||||
<DynamicIcon :name="s.icon" class="size-6" />
|
||||
</span>
|
||||
<p class="text-sm leading-8 text-muted">{{ s.desc }}</p>
|
||||
</div>
|
||||
<ul class="space-y-3.5">
|
||||
<li
|
||||
v-for="it in s.items"
|
||||
:key="it"
|
||||
class="flex items-center gap-3 text-sm text-ink/80"
|
||||
>
|
||||
<span class="size-1.5 shrink-0 rounded-full bg-accent" />
|
||||
{{ it }}
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</motion.div>
|
||||
</AnimatePresence>
|
||||
</div>
|
||||
</Reveal>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</template>
|
||||
@@ -0,0 +1,79 @@
|
||||
<script setup lang="ts">
|
||||
import { FileSearch, ShieldCheck } from "lucide-vue-next";
|
||||
import Reveal from "~/components/ui/Reveal.vue";
|
||||
import SectionHead from "~/components/ui/SectionHead.vue";
|
||||
|
||||
const standards = computed(() => useSiteStore().sections.standards);
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<section
|
||||
id="standards"
|
||||
aria-labelledby="standards-title"
|
||||
class="relative overflow-hidden border-t border-line py-24 md:py-32"
|
||||
>
|
||||
<!-- watermark -->
|
||||
<div
|
||||
aria-hidden="true"
|
||||
class="text-outline pointer-events-none absolute -bottom-14 -start-8 select-none font-mono text-[24vw] font-bold leading-none opacity-60"
|
||||
>
|
||||
CE
|
||||
</div>
|
||||
|
||||
<div class="relative mx-auto max-w-[1480px] px-5 md:px-8">
|
||||
<div class="grid items-center gap-14 lg:grid-cols-12">
|
||||
<div class="lg:col-span-5">
|
||||
<SectionHead heading-id="standards-title" v-bind="standards.head" />
|
||||
<Reveal v-if="standards.note" :delay="0.25">
|
||||
<div class="mt-8 flex items-start gap-4 rounded-xl border border-accent/25 bg-accent/5 p-5">
|
||||
<FileSearch class="size-6 shrink-0 text-accent" />
|
||||
<p class="text-sm leading-8 text-ink/80">
|
||||
{{ standards.note }}
|
||||
</p>
|
||||
</div>
|
||||
</Reveal>
|
||||
<Reveal :delay="0.35">
|
||||
<a
|
||||
href="#contact"
|
||||
class="group mt-8 inline-flex items-center gap-2.5 rounded-full border border-line px-6 py-3.5 text-sm font-bold transition-colors hover:border-accent hover:text-accent"
|
||||
>
|
||||
<ShieldCheck class="size-4 text-accent" />
|
||||
{{ standards.ctaLabel }}
|
||||
</a>
|
||||
</Reveal>
|
||||
</div>
|
||||
|
||||
<div class="grid gap-4 sm:grid-cols-2 lg:col-span-7 xl:grid-cols-3">
|
||||
<Reveal v-for="(s, i) in standards.items" :key="s.code" :delay="i * 0.06">
|
||||
<div
|
||||
data-hover
|
||||
class="group relative h-full border border-line bg-panel/50 p-6 text-center transition-all duration-500 hover:-translate-y-1.5 hover:border-accent/50 hover:bg-panel"
|
||||
>
|
||||
<span class="absolute end-3 top-3 font-mono text-[9px] tracking-[0.2em] text-muted/50">
|
||||
CERT
|
||||
</span>
|
||||
<div
|
||||
class="mx-auto flex size-24 items-center justify-center rounded-full border border-dashed border-ink/20 transition-all duration-500 group-hover:rotate-12 group-hover:border-accent/60"
|
||||
>
|
||||
<div>
|
||||
<div
|
||||
class="font-mono text-base font-bold text-ink transition-colors duration-300 group-hover:text-accent"
|
||||
>
|
||||
{{ s.code }}
|
||||
</div>
|
||||
<div
|
||||
class="mx-auto mt-1.5 h-px w-8 bg-line transition-colors duration-300 group-hover:bg-accent/50"
|
||||
/>
|
||||
<div class="mt-1.5 font-mono text-[8px] tracking-[0.25em] text-muted">
|
||||
EURO NORM
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mt-4 text-sm font-medium text-ink/85">{{ s.label }}</div>
|
||||
</div>
|
||||
</Reveal>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</template>
|
||||
@@ -0,0 +1,33 @@
|
||||
<script setup lang="ts">
|
||||
import Reveal from "~/components/ui/Reveal.vue";
|
||||
import CountUp from "./CountUp.vue";
|
||||
|
||||
const stats = computed(() => useSiteStore().sections.stats.items);
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<section class="relative" aria-label="آمار و دستاوردهای ایمن پیشگامان">
|
||||
<div class="grid grid-cols-2 gap-px border-y border-line bg-line lg:grid-cols-4">
|
||||
<div
|
||||
v-for="(s, i) in stats"
|
||||
:key="s.label"
|
||||
class="group relative bg-bg p-8 transition-colors duration-500 hover:bg-panel md:p-10"
|
||||
>
|
||||
<span
|
||||
class="absolute end-5 top-5 font-mono text-[10px] tracking-[0.25em] text-muted/50 transition-colors duration-500 group-hover:text-accent/70"
|
||||
>
|
||||
{{ s.note }}
|
||||
</span>
|
||||
<Reveal :delay="i * 0.08">
|
||||
<div class="text-4xl font-black md:text-6xl">
|
||||
<CountUp :end="s.end" :suffix="s.suffix" />
|
||||
</div>
|
||||
<div class="mt-3 text-sm text-muted">{{ s.label }}</div>
|
||||
</Reveal>
|
||||
<span
|
||||
class="absolute bottom-0 start-0 h-0.5 w-0 bg-accent transition-all duration-500 group-hover:w-full"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</template>
|
||||
@@ -0,0 +1,26 @@
|
||||
<script setup lang="ts">
|
||||
import { ShieldCheck } from "lucide-vue-next";
|
||||
|
||||
const items = computed(() => useSiteStore().sections.tape.items);
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<section aria-hidden="true" class="pointer-events-none relative z-20 overflow-hidden py-10">
|
||||
<div class="-rotate-[1.6deg] scale-[1.04]">
|
||||
<div class="hazard h-2.5" />
|
||||
<div dir="ltr" class="overflow-hidden bg-hazard py-3.5 text-bg">
|
||||
<div class="animate-marquee flex w-max">
|
||||
<span
|
||||
v-for="(item, i) in [...items, ...items]"
|
||||
:key="i"
|
||||
class="flex items-center gap-7 px-7 text-sm font-extrabold whitespace-nowrap"
|
||||
>
|
||||
{{ item }}
|
||||
<ShieldCheck class="size-4 shrink-0" :stroke-width="2.5" />
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="hazard h-2.5" />
|
||||
</div>
|
||||
</section>
|
||||
</template>
|
||||
@@ -0,0 +1,76 @@
|
||||
<script setup lang="ts">
|
||||
import { AnimatePresence, motion } from "motion-v";
|
||||
import { Quote } from "lucide-vue-next";
|
||||
import SectionHead from "~/components/ui/SectionHead.vue";
|
||||
|
||||
const testimonials = computed(() => useSiteStore().sections.testimonials);
|
||||
const QUOTES = computed(() => testimonials.value.items);
|
||||
|
||||
const idx = ref(0);
|
||||
const q = computed(() => QUOTES.value[idx.value]);
|
||||
let t: ReturnType<typeof setInterval> | undefined;
|
||||
|
||||
onMounted(() => {
|
||||
t = setInterval(() => (idx.value = (idx.value + 1) % Math.max(1, QUOTES.value.length)), 7000);
|
||||
});
|
||||
onBeforeUnmount(() => clearInterval(t));
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<section
|
||||
v-if="QUOTES.length"
|
||||
aria-labelledby="testimonials-title"
|
||||
class="relative overflow-hidden border-t border-line py-24 md:py-32"
|
||||
>
|
||||
<div class="absolute inset-0 bg-grid opacity-40" />
|
||||
<div
|
||||
class="pointer-events-none absolute -top-10 -end-10 select-none font-mono text-[18vw] font-bold leading-none text-outline opacity-50"
|
||||
>
|
||||
"
|
||||
</div>
|
||||
|
||||
<div class="relative mx-auto max-w-4xl px-5 text-center md:px-8">
|
||||
<SectionHead heading-id="testimonials-title" center v-bind="testimonials.head" />
|
||||
|
||||
<div class="mt-14 flex min-h-[320px] flex-col items-center md:min-h-[280px]">
|
||||
<span
|
||||
class="flex size-16 items-center justify-center rounded-full border border-accent/30 bg-accent/10"
|
||||
>
|
||||
<Quote class="size-7 text-accent" />
|
||||
</span>
|
||||
|
||||
<AnimatePresence mode="wait">
|
||||
<motion.blockquote
|
||||
v-if="q"
|
||||
:key="idx"
|
||||
:initial="{ opacity: 0, y: 26 }"
|
||||
:animate="{ opacity: 1, y: 0 }"
|
||||
:exit="{ opacity: 0, y: -26 }"
|
||||
:transition="{ duration: 0.55, ease: EASE }"
|
||||
class="mt-8"
|
||||
>
|
||||
<p class="text-xl font-bold leading-[2.1] text-ink/90 md:text-2xl md:leading-[2]">
|
||||
«{{ q.text }}»
|
||||
</p>
|
||||
<footer class="mt-8">
|
||||
<div class="text-lg font-black">{{ q.name }}</div>
|
||||
<div class="mt-2 font-mono text-xs text-muted">{{ q.role }}</div>
|
||||
</footer>
|
||||
</motion.blockquote>
|
||||
</AnimatePresence>
|
||||
</div>
|
||||
|
||||
<div class="mt-12 flex items-center justify-center gap-3">
|
||||
<button
|
||||
v-for="(_, i) in QUOTES"
|
||||
:key="i"
|
||||
:aria-label="`نظر شماره ${faNum(i + 1)}`"
|
||||
:class="`h-1.5 rounded-full transition-all duration-500 ${
|
||||
i === idx ? 'w-12 bg-accent' : 'w-4 bg-line hover:bg-muted'
|
||||
}`"
|
||||
@click="idx = i"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</template>
|
||||
Reference in New Issue
Block a user