fill most content + improve ux

This commit is contained in:
Salam-vsem
2025-05-13 17:00:04 +03:00
parent 0fe2520261
commit f59c0085a3
41 changed files with 307 additions and 169 deletions

View File

@@ -1,12 +1,23 @@
---
import { Image } from 'astro:assets'
import wideCrossIconSrc from '@/assets/icons/WideCrossIcon.svg'
type Props = {
texts: string[]
}
const { texts } = Astro.props
const repeatedTexts = texts.length < 10 ? Array.from({ length: 10 / texts.length }, () => texts).flat() : texts;
const repeatedTexts =
texts.length < 10 ? Array.from({ length: 10 / texts.length }, () => texts).flat() : texts
---
<div class="flex h-full w-max animate-marquee items-center gap-10 text-5xl font-bold uppercase">
{repeatedTexts.map((text) => <h2>{text}</h2>)}
{
repeatedTexts.map((text) => (
<>
<h2>{text}</h2>
<Image src={wideCrossIconSrc} alt="cross-icon" />
</>
))
}
</div>