update content
This commit is contained in:
@@ -8,7 +8,7 @@ import Header from '@/components/header/Header.astro'
|
||||
import './styles.css'
|
||||
import { SocialMediaIcon } from '@/components/SocialMediaIcon'
|
||||
import { useTranslations } from '@/i18n/utils'
|
||||
import {slide, ViewTransitions} from 'astro:transitions'
|
||||
import { slide, ViewTransitions } from 'astro:transitions'
|
||||
|
||||
export const getStaticPaths = async () => {
|
||||
const coaches = await getCollection('coaches')
|
||||
@@ -32,7 +32,7 @@ const [thumbs, optimizedGallery] = galleryWithCover
|
||||
: [undefined, undefined]
|
||||
---
|
||||
|
||||
<BaseLayout title={data.name}>
|
||||
<BaseLayout title={data.name} transition={slide({ duration: '0.3s' })}>
|
||||
<Header />
|
||||
{
|
||||
optimizedGallery && (
|
||||
@@ -46,7 +46,7 @@ const [thumbs, optimizedGallery] = galleryWithCover
|
||||
imageClassName="aspect-3/4 w-[400px] lg:w-auto object-top mx-auto h-auto"
|
||||
/>
|
||||
<div class="flex flex-1 flex-col gap-8">
|
||||
<h1 class="lg:text-nowrap font-bold">{data.name}</h1>
|
||||
<h1 class="font-bold lg:text-nowrap">{data.name}</h1>
|
||||
{data.description && <span>{data.description}</span>}
|
||||
<Content />
|
||||
{data.socialMediaLinks && (
|
||||
|
||||
@@ -20,7 +20,12 @@ import { Coaches } from '@/components/coaches/Coaches'
|
||||
type Props = CollectionEntry<'pages'>['data']
|
||||
|
||||
const { lang } = Astro.params
|
||||
const [page, coaches] = await Promise.all([getEntry('pages', 'main'), getCollection('coaches')])
|
||||
const [page, coaches] = await Promise.all([
|
||||
getEntry('pages', 'main'),
|
||||
getCollection('coaches').then((coaches) =>
|
||||
coaches.sort((a, b) => (a.data.order ?? -1) - (b.data.order ?? -1))
|
||||
),
|
||||
])
|
||||
const { slider, services, hero, marquee, reviews, footer } = page?.data || {}
|
||||
const optimizedSlider = slider
|
||||
? await optimizeSliderImages(slider.map(({ image, imageAlt }) => ({ src: image, alt: imageAlt })))
|
||||
|
||||
Reference in New Issue
Block a user