about page

This commit is contained in:
Kseninia Mikhaylova 2024-06-04 16:34:25 +03:00
parent 9ce3c815c4
commit c4908f7748
2 changed files with 34 additions and 4 deletions

20
app.vue
View File

@ -16,9 +16,12 @@ type ApiKpType = {
type ApiPagesType = { type ApiPagesType = {
id: number id: number
title: string title: string
slug: string
content: string content: string
} }
import '@/assets/main.scss'
const { data: seoData } = await useFetch<ApiKpType>(`${apiBase}/kp/1`) const { data: seoData } = await useFetch<ApiKpType>(`${apiBase}/kp/1`)
useSeoMeta({ useSeoMeta({
title: seoData.value?.title, title: seoData.value?.title,
@ -29,8 +32,8 @@ useSeoMeta({
// twitterCard: 'summary_large_image', // twitterCard: 'summary_large_image',
}) })
const { data: pagesData } = await useFetch<ApiPagesType>(`${apiBase}/pages/`) const { data: pagesData } = await useFetch<ApiPagesType[]>(`${apiBase}/pages/`)
import '@/assets/main.scss' const about = (pagesData.value as ApiPagesType[]).find(el => el.slug == 'about')
</script> </script>
<template> <template>
<div> <div>
@ -48,6 +51,19 @@ import '@/assets/main.scss'
</div> </div>
</div> </div>
</div> </div>
<div class="block bg-white">
<div class="container">
<div class="block-content">
<h2 class="block-title">{{ about?.title }}</h2>
<div class="block-text">
{{ about?.content }}
</div>
</div>
<div class="block-image">
</div>
</div>
</div>
<NuxtPage /> <NuxtPage />
</div> </div>
</template> </template>

View File

@ -9,7 +9,7 @@ body {
} }
.container { .container {
@apply max-w-7xl mx-auto grid grid-cols-12 @apply max-w-7xl mx-auto grid grid-cols-12 items-center
} }
.header { .header {
@ -25,5 +25,19 @@ body {
} }
a[href^="/#"] { a[href^="/#"] {
@apply underline decoration-dotted underline-offset-2 decoration-neutral-500 @apply underline decoration-dotted underline-offset-4 decoration-neutral-500
}
.block {
@apply py-10;
&-content {
@apply col-span-6
}
&-title {
@apply text-5xl text-black
}
&-image {
@apply col-span-6 bg-slate-400;
min-height: 50vh;
}
} }