/
githubmirror
/
tabler
Обзор
Документация
Войти
/
githubmirror
/
tabler
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
dev
preview/pages/gallery.astro
27 строк
930 B
Paweł Kuna
Enable `astro/tsconfigs/strictest` in the preview package (#2834)
08 авг 2026, 01:51
Не верифицирован
08 авг 2026, 01:51
16e1403
Код
Авторство
О чём код?
--- import DefaultLayout from '@shared/layouts/DefaultLayout.astro' import GalleryPhoto from '@shared/components/cards/GalleryPhoto.astro' import Pagination from '@ui/Pagination.astro' import photos from '@data/photos.json' import people from '@data/people.json' import { requireIndex } from '@shared/lib/array' // Horizontal photos, limit 15; person = people[loop index]. const galleryPhotos = photos.filter((photo) => photo.horizontal).slice(0, 15) --- <DefaultLayout title="Gallery" pageHeader="Gallery" description="1-15 of 241 photos" actions="photos" pageMenu="extra.gallery"> <div class="row row-cards"> { galleryPhotos.map((photo, index) => ( <div class="col-sm-6 col-lg-4"> <GalleryPhoto photo={photo} person={requireIndex(people, index)} index={index + 1} /> </div> )) } </div> <div class="d-flex mt-5"> <Pagination class="ms-auto" /> </div> </DefaultLayout>