Add a static images manager and polish dashboard layout and fonts.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Alireza Hassani
2026-08-16 23:56:17 +03:30
co-authored by Cursor
parent e79211e3cd
commit b9024ad77a
57 changed files with 2025 additions and 122 deletions
@@ -11,18 +11,27 @@ interface WebsiteSliderGalleryProps {
slides: WebsiteSliderSlide[]
onAddSlide: () => void
onRemoveSlide: (slide: WebsiteSliderSlide) => void
showAdd?: boolean
addLabel?: string
aspectRatio?: string | null
removeLabel?: string
}
export function WebsiteSliderGallery({
slides,
onAddSlide,
onRemoveSlide,
showAdd = true,
addLabel,
aspectRatio,
removeLabel,
}: WebsiteSliderGalleryProps) {
const t = useT()
const { locale } = useLocale()
const isFa = locale === 'fa'
const trackRef = useRef<HTMLDivElement>(null)
const showNav = slides.length > 0
const addText = addLabel ?? t('website.sliders.addSlide')
function scrollBy(direction: -1 | 1) {
const track = trackRef.current
@@ -31,14 +40,14 @@ export function WebsiteSliderGallery({
track.scrollBy({ left: direction * amount, behavior: 'smooth' })
}
const addCard = (
const addCard = showAdd ? (
<div className={`${styles.slideSlot} ${styles.slideSlotAdd}`}>
<Tooltip label={t('website.sliders.addSlide')}>
<Tooltip label={addText}>
<button
type="button"
className={styles.addCard}
onClick={onAddSlide}
aria-label={t('website.sliders.addSlide')}
aria-label={addText}
>
<span className={styles.addIcon}>
<Plus size={28} />
@@ -46,11 +55,16 @@ export function WebsiteSliderGallery({
</button>
</Tooltip>
</div>
)
) : null
const slideCards = slides.map((slide) => (
<div key={slide.id} className={styles.slideSlot}>
<WebsiteSliderSlideCard slide={slide} onRemove={() => onRemoveSlide(slide)} />
<WebsiteSliderSlideCard
slide={slide}
onRemove={() => onRemoveSlide(slide)}
aspectRatio={aspectRatio}
removeLabel={removeLabel}
/>
</div>
))