content style update; style refactoring

This commit is contained in:
tmshv committed 2020-02-21 21:55:15 +03:00
1 parent 1bdea85b1b
commit 400a08d1af
11 files changed
+53 -28

No files matched your search

+4 -1
View File
@@ -30,7 +30,10 @@ const Page: NextPage<Props> = props => {
<App
menu={buildMenu(props.pageUrl, menuModel)}
showAuthor={true}
layout={'wide'}
wide={true}
contentStyle={{
margin: 'var(--size-l) var(--size-xl)'
}}
>
<Head>
<title>{props.title}</title>
+4 -1
View File
@@ -36,7 +36,10 @@ const Page: NextPage<Props> = props => {
<App
menu={buildMenu(props.pageUrl, menuModel)}
showAuthor={true}
layout={'wide'}
wide={true}
contentStyle={{
margin: 'var(--size-l) var(--size-xl)'
}}
>
<Head>
<title>{props.title}</title>
+3 -1
View File
@@ -28,7 +28,9 @@ const Page: NextPage<Props> = props => {
<App
menu={buildMenu(props.pageUrl, menuModel)}
showAuthor={true}
layout={'wide'}
contentStyle={{
marginTop: 'var(--size-l)'
}}
>
<Head>
<title>{props.data.title}</title>
+3 -1
View File
@@ -103,7 +103,9 @@ const Page: NextPage<IProps> = props => (
<App
menu={buildMenu(props.pageUrl, menuModel)}
showAuthor={true}
layout={'wide'}
contentStyle={{
marginTop: 'var(--size-l)'
}}
>
<Head>
<title>{props.title}</title>
+3 -1
View File
@@ -73,7 +73,9 @@ const Page: NextPage<IProps> = props => (
<App
menu={buildMenu(props.pageUrl, menuModel)}
showAuthor={true}
layout={'wide'}
contentStyle={{
marginTop: 'var(--size-l)'
}}
>
<Head>
<title>{props.title}</title>
+17 -5
View File
@@ -6,8 +6,9 @@ import { HudozkaTitle } from 'src/components/HudozkaTitle'
import menuModel from 'src/models/menu'
import { meta } from 'src/lib/meta'
import { buildMenu } from 'src/lib/menu'
import { createApiUrl, requestGet } from 'src/next-lib'
import { createApiUrl, requestGet, IResponseItems } from 'src/next-lib'
import { NextPage } from 'next'
import { IArticle } from 'src/types'
interface IProps {
pageUrl: string
@@ -22,14 +23,21 @@ const Page: NextPage<IProps> = props => (
<App
menu={buildMenu(props.pageUrl, menuModel)}
showAuthor={true}
layout={'wide'}
wide={true}
contentStyle={{
margin: 'var(--size-l) var(--size-xl)',
}}
>
<Head>
<title>{props.title}</title>
<Meta meta={props.meta} />
</Head>
<HudozkaTitle />
<HudozkaTitle
style={{
marginBottom: 'var(--size-l)'
}}
/>
<ArticleCardList
articles={props.articles}
@@ -43,8 +51,12 @@ export const unstable_getStaticProps = async () => {
const pageUrl = '/'
const page = 1
const pageSize = process.env.APP_ARTICLES_PAGE_SIZE
const res = await requestGet(createApiUrl(`/api/articles?page=${page}&pageSize=${pageSize}`), {}) as any
const articles = res.items || []
const res = await requestGet<IResponseItems<IArticle>>(createApiUrl(`/api/articles?page=${page}&pageSize=${pageSize}`), null)
const articles = (res.items || [])
.map(x => ({
...x,
featured: x.id === '2019-kotiki'
}))
const nextPage = res.nextPage
const prevPage = res.prevPage
const title = 'Шлиссельбургская ДХШ'
+4 -1
View File
@@ -17,7 +17,10 @@ const Page: NextPage<Props> = props => (
<App
menu={buildMenu(props.pageUrl, menuModel)}
showAuthor={true}
layout={'wide'}
wide={true}
contentStyle={{
marginTop: 'var(--size-l)'
}}
>
<Head>
<title>{props.title}</title>
-1
View File
@@ -28,7 +28,6 @@ const Index: NextPage<IProps> = props => {
<App
menu={buildMenu(props.pageUrl, menuModel)}
showAuthor={true}
layout={'wide'}
>
<Head>
<title>{props.title}</title>