Replace the home hero with a spring carousel and default theme to light.

Adds Carousel under keep-alive-safe autoplay, peeks side cards past the container, and stops following the OS dark preference on first run.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
s.esmaeili
2026-10-16 10:24:59 +03:30
co-authored by Cursor
parent 5c7bb6672a
commit 284ced1c89
5 changed files with 553 additions and 8 deletions
+3 -4
View File
@@ -4,11 +4,10 @@
Layout intent — shop first, account second:
1. a slim brand bar with search + cart
2. the live 18k rate strip (real: GET /pricing/latest)
3. an editorial showcase hero built from real categories
3. spring card carousel hero (admin slider images)
4. the category rail (real: derived from GET /catalog/products)
5. "برگزیده" — staggered 2-col masonry (wireframe: unequal card heights, flush bottoms)
6. "تازه‌ها" — full-width horizontal ProductRow list
7. the account block (real: GET /customers/:id when signed in)
Data honesty, carried over from the previous version deliberately:
- the API exposes no curated home payload, no promotions and no per-product
@@ -43,7 +42,7 @@
<container class="home__body" :class="{ 'is-revealed': revealed }">
<RateStrip :quote="goldPrice" class="home__rate reveal" :style="revealDelay(0)" />
<ShowcaseSlider
<Carousel
v-if="slides.length"
:slides="slides"
class="home__hero reveal"
@@ -115,8 +114,8 @@ import { useRouter } from 'vue-router'
import { Loading, PullRefresh } from 'vant'
import Icon from '../components/icon/Icon.vue'
import RateStrip from '../components/home/RateStrip.vue'
import ShowcaseSlider from '../components/home/ShowcaseSlider.vue'
import type { ShowcaseSlide } from '../components/home/ShowcaseSlider.vue'
import Carousel from '../components/home/Carousel.vue'
import CategoryRail from '../components/home/CategoryRail.vue'
import ProductCard from '../components/product/ProductCard.vue'
import ProductRow from '../components/product/ProductRow.vue'