Files
hoomat-store/.cursor/rules/static-image-slots.mdc
T

15 lines
931 B
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
description: Keep Meshkee static-image slot catalog aspect ratios in sync with UI
globs: lib/meshkee/static-slots.ts,app/meshkee/static-image-slots/**,app/page.tsx,app/about-us/**,app/components/hero-slider.tsx,app/components/slot-media.tsx,app/components/product-carousel.tsx
alwaysApply: false
---
# Static image slots
When homepage/about (or other) UI image sizes or aspect ratios change during development, update `STATIC_IMAGE_SLOT_CATALOG` in `lib/meshkee/static-slots.ts` (and thus `GET /meshkee/static-image-slots`) so Meshkee’s static-image reader stays accurate.
- Prefer API `slot.aspectRatio` / catalog values; do not invent upload or CMS write APIs.
- Empty or failed slot fetches must keep local placeholders.
- List slots use all `slot.images`; single slots use the first image with a `url`.
- Wrap with `<a>` when `linkUrl` is present; map `titleFa` / `titleEn` / `subtext` to the existing UI copy fields.