update content
@@ -24,6 +24,7 @@ export const heroSchema = (image: ImageFunction) =>
|
||||
export const coaches = defineCollection({
|
||||
schema: ({ image }) =>
|
||||
z.object({
|
||||
order: z.number().optional(),
|
||||
name: z.string(),
|
||||
description: z.string().optional(),
|
||||
cover: image(),
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
---
|
||||
cover: './assets/anna-cover.jpeg'
|
||||
coverAlt: 'anna'
|
||||
name: 'Анна'
|
||||
order: 2
|
||||
cover: './assets/anna-dmitrienko-cover.jpeg'
|
||||
coverAlt: 'anna-dmitrienko-cover'
|
||||
name: 'Анна Дмитриенко'
|
||||
description: 'Спортсмен и тренер. Опыт работы в фитнес индустрии более 10 лет'
|
||||
gallery:
|
||||
- './assets/anna-slide-1.jpeg'
|
||||
- './assets/anna-slide-2.jpeg'
|
||||
- './assets/anna-dmitrienko-slide-1.jpeg'
|
||||
- './assets/anna-dmitrienko-slide-2.jpeg'
|
||||
socialMediaLinks:
|
||||
- icon: 'instagram'
|
||||
href: 'https://www.instagram.com/dmitrienko_a_fit_4you?igsh=MXBpZTVlNHkxOWl6dA=='
|
||||
@@ -1,6 +1,7 @@
|
||||
---
|
||||
order: 1
|
||||
cover: './assets/anna-suleimanova-cover.jpeg'
|
||||
coverAlt: 'anna-suleimanova'
|
||||
coverAlt: 'anna-suleimanova-cover'
|
||||
name: 'Александра Сулейманова'
|
||||
description: 'Спортсмен и тренер. Опыт работы в фитнес индустрии 9 лет'
|
||||
gallery:
|
||||
|
||||
|
Before Width: | Height: | Size: 92 KiB After Width: | Height: | Size: 92 KiB |
|
Before Width: | Height: | Size: 83 KiB After Width: | Height: | Size: 83 KiB |
|
Before Width: | Height: | Size: 215 KiB After Width: | Height: | Size: 215 KiB |
|
Before Width: | Height: | Size: 147 KiB After Width: | Height: | Size: 215 KiB |
BIN
src/content/coaches/assets/batyr-slide-2.JPG
Normal file
|
After Width: | Height: | Size: 206 KiB |
BIN
src/content/coaches/assets/batyr-slide-3.JPG
Normal file
|
After Width: | Height: | Size: 231 KiB |
BIN
src/content/coaches/assets/batyr-slide-4.JPG
Normal file
|
After Width: | Height: | Size: 2.2 MiB |
BIN
src/content/coaches/assets/batyr-slide-5.JPG
Normal file
|
After Width: | Height: | Size: 226 KiB |
@@ -1,10 +1,15 @@
|
||||
---
|
||||
order: 0,
|
||||
cover: './assets/batyr-cover.jpeg'
|
||||
coverAlt: 'batyr-suleimanov'
|
||||
coverAlt: 'batyr-suleimanov-cover'
|
||||
name: 'Батыр Сулейманов'
|
||||
description: 'Профессиональный выступающий спортсмен и тренер. Опыт работы в фитнес индустрии более 12 лет'
|
||||
gallery:
|
||||
- './assets/batyr-slide-1.JPG'
|
||||
- './assets/batyr-slide-2.JPG'
|
||||
- './assets/batyr-slide-3.JPG'
|
||||
- './assets/batyr-slide-4.JPG'
|
||||
- './assets/batyr-slide-5.JPG'
|
||||
socialMediaLinks:
|
||||
- icon: 'instagram'
|
||||
href: 'https://www.instagram.com/therealbatyr?igsh=MXZkMHdsMDgxM3c4bA%3D%3D&utm_source=qr'
|
||||
|
||||
@@ -2,19 +2,21 @@
|
||||
import { useTranslations } from '@/i18n/utils'
|
||||
import { cn } from '@/libs/cn'
|
||||
import '@/styles/global.css'
|
||||
import type { TransitionAnimationValue } from 'astro'
|
||||
import { ClientRouter, slide } from 'astro:transitions'
|
||||
|
||||
type Props = {
|
||||
title: string
|
||||
bodyClass?: string
|
||||
transition?: TransitionAnimationValue
|
||||
}
|
||||
|
||||
const { title, bodyClass } = Astro.props
|
||||
const { title, bodyClass, transition } = Astro.props
|
||||
const t = useTranslations(Astro.currentLocale)
|
||||
---
|
||||
|
||||
<!doctype html>
|
||||
<html lang={Astro.currentLocale} transition:animate={slide({ duration: '0.3s' })}>
|
||||
<html lang={Astro.currentLocale} transition:animate={transition}>
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width" />
|
||||
|
||||
@@ -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 })))
|
||||
|
||||