update content

This commit is contained in:
Salam-vsem
2025-05-17 15:05:42 +03:00
parent e13a35f1dd
commit 0efc8289ea
15 changed files with 28 additions and 13 deletions

View File

@@ -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(),

View File

@@ -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=='

View File

@@ -1,6 +1,7 @@
---
order: 1
cover: './assets/anna-suleimanova-cover.jpeg'
coverAlt: 'anna-suleimanova'
coverAlt: 'anna-suleimanova-cover'
name: 'Александра Сулейманова'
description: 'Спортсмен и тренер. Опыт работы в фитнес индустрии 9 лет'
gallery:

View File

Before

Width:  |  Height:  |  Size: 92 KiB

After

Width:  |  Height:  |  Size: 92 KiB

View File

Before

Width:  |  Height:  |  Size: 83 KiB

After

Width:  |  Height:  |  Size: 83 KiB

View File

Before

Width:  |  Height:  |  Size: 215 KiB

After

Width:  |  Height:  |  Size: 215 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 147 KiB

After

Width:  |  Height:  |  Size: 215 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 206 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 231 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 226 KiB

View File

@@ -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'

View File

@@ -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" />

View File

@@ -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 && (

View File

@@ -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 })))