App layout prop update
This commit is contained in:
1 parent
228e7824de
commit
3902815113
11 files changed
+12
-23
No files matched your search
@@ -12,11 +12,11 @@ const Page = (props) => (
|
||||
menu={buildMenu(props.pageUrl, menuModel)}
|
||||
showAuthor={true}
|
||||
menuPadding={true}
|
||||
layout={'thin'}
|
||||
>
|
||||
<Head>
|
||||
<title>{props.album.title}</title>
|
||||
</Head>
|
||||
<div className="content content_thin">
|
||||
<Article
|
||||
title={props.album.title}
|
||||
date={props.album.date}
|
||||
@@ -26,7 +26,6 @@ const Page = (props) => (
|
||||
html={props.album.post}
|
||||
/>
|
||||
</Article>
|
||||
</div>
|
||||
</App>
|
||||
)
|
||||
|
||||
|
||||
@@ -15,12 +15,12 @@ const Page = (props) => (
|
||||
menu={buildMenu(props.pageUrl, menuModel)}
|
||||
showAuthor={true}
|
||||
menuPadding={true}
|
||||
layout={'thin'}
|
||||
>
|
||||
<Head>
|
||||
<title>{props.article.title}</title>
|
||||
<Meta meta={props.meta} />
|
||||
</Head>
|
||||
<div className={'content content_thin'}>
|
||||
<Article
|
||||
title={props.article.title}
|
||||
date={props.article.date}
|
||||
@@ -31,7 +31,6 @@ const Page = (props) => (
|
||||
html={props.article.post}
|
||||
/>
|
||||
</Article>
|
||||
</div>
|
||||
</App>
|
||||
)
|
||||
|
||||
|
||||
@@ -13,18 +13,17 @@ const Page = (props) => (
|
||||
menu={buildMenu(props.pageUrl, menuModel)}
|
||||
showAuthor={true}
|
||||
menuPadding={true}
|
||||
layout={'wide'}
|
||||
>
|
||||
<Head>
|
||||
<title>{props.title}</title>
|
||||
<Meta meta={props.meta} />
|
||||
</Head>
|
||||
<div className="content content_wide">
|
||||
<ArticleCardList
|
||||
articles={props.articles}
|
||||
prevPage={props.prevPage}
|
||||
nextPage={props.nextPage}
|
||||
/>
|
||||
</div>
|
||||
</App>
|
||||
)
|
||||
|
||||
|
||||
@@ -16,13 +16,13 @@ const Page = (props) => (
|
||||
menu={buildMenu(props.pageUrl, menuModel)}
|
||||
showAuthor={true}
|
||||
menuPadding={true}
|
||||
layout={'wide'}
|
||||
>
|
||||
<Head>
|
||||
<title>{props.title}</title>
|
||||
<Meta meta={props.meta} />
|
||||
</Head>
|
||||
|
||||
<div className="content content_semi-wide">
|
||||
{!props.image ? null : (
|
||||
<CollectiveImage
|
||||
data={props.image}
|
||||
@@ -44,7 +44,6 @@ const Page = (props) => (
|
||||
/>
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
</App>
|
||||
)
|
||||
|
||||
|
||||
@@ -14,15 +14,14 @@ const Page = (props) => (
|
||||
menu={buildMenu(props.pageUrl, menuModel)}
|
||||
showAuthor={true}
|
||||
menuPadding={true}
|
||||
layout={'wide'}
|
||||
>
|
||||
<Head>
|
||||
<title>{props.file.title}</title>
|
||||
<Meta meta={props.meta} />
|
||||
</Head>
|
||||
<div className="content content_wide">
|
||||
<Document {...props.file} />
|
||||
<Share />
|
||||
</div>
|
||||
</App>
|
||||
)
|
||||
|
||||
|
||||
+1
-2
@@ -106,13 +106,13 @@ const Page: NextPage<IProps> = props => (
|
||||
menu={buildMenu(props.pageUrl, menuModel)}
|
||||
showAuthor={true}
|
||||
menuPadding={true}
|
||||
layout={'thin'}
|
||||
>
|
||||
<Head>
|
||||
<title>{props.title}</title>
|
||||
<Meta meta={props.meta} />
|
||||
</Head>
|
||||
|
||||
<div className="content content_thin">
|
||||
{props.collections.map((collection, index) => (
|
||||
<DocumentList
|
||||
key={index}
|
||||
@@ -120,7 +120,6 @@ const Page: NextPage<IProps> = props => (
|
||||
documents={collection.items}
|
||||
/>
|
||||
))}
|
||||
</div>
|
||||
</App>
|
||||
)
|
||||
|
||||
|
||||
+1
-2
@@ -69,13 +69,13 @@ const Page = (props) => (
|
||||
menu={buildMenu(props.pageUrl, menuModel)}
|
||||
showAuthor={true}
|
||||
menuPadding={true}
|
||||
layout={'wide'}
|
||||
>
|
||||
<Head>
|
||||
<title>{props.title}</title>
|
||||
<Meta meta={props.meta} />
|
||||
</Head>
|
||||
|
||||
<div className="content content_semi-wide">
|
||||
<Article
|
||||
// title={meta.title}
|
||||
title={'Галерея'}
|
||||
@@ -89,7 +89,6 @@ const Page = (props) => (
|
||||
))
|
||||
}
|
||||
</Article>
|
||||
</div>
|
||||
</App>
|
||||
)
|
||||
|
||||
|
||||
+1
-2
@@ -14,13 +14,13 @@ const Page = (props) => (
|
||||
menu={buildMenu(props.pageUrl, menuModel)}
|
||||
showAuthor={true}
|
||||
menuPadding={true}
|
||||
layout={'wide'}
|
||||
>
|
||||
<Head>
|
||||
<title>{props.title}</title>
|
||||
<Meta meta={props.meta} />
|
||||
</Head>
|
||||
|
||||
<div className="content content_wide">
|
||||
<HudozkaTitle />
|
||||
|
||||
<ArticleCardList
|
||||
@@ -28,7 +28,6 @@ const Page = (props) => (
|
||||
prevPage={props.prevPage}
|
||||
nextPage={props.nextPage}
|
||||
/>
|
||||
</div>
|
||||
</App>
|
||||
)
|
||||
|
||||
|
||||
+1
-2
@@ -12,18 +12,17 @@ const Page = (props) => (
|
||||
menu={buildMenu(props.pageUrl, menuModel)}
|
||||
showAuthor={true}
|
||||
menuPadding={true}
|
||||
layout={'wide'}
|
||||
>
|
||||
<Head>
|
||||
<title>{props.title}</title>
|
||||
</Head>
|
||||
|
||||
<div className="content content_wide">
|
||||
{/*<ScheduleList schedules={schedules}/>*/}
|
||||
|
||||
<Schedule {...props.schedule} />
|
||||
|
||||
<Share />
|
||||
</div>
|
||||
</App>
|
||||
)
|
||||
|
||||
|
||||
@@ -14,16 +14,15 @@ const Index = (props) => (
|
||||
menu={buildMenu(props.pageUrl, menuModel)}
|
||||
showAuthor={true}
|
||||
menuPadding={true}
|
||||
layout={'wide'}
|
||||
>
|
||||
<Head>
|
||||
<title>{props.title}</title>
|
||||
<Meta meta={props.meta} />
|
||||
</Head>
|
||||
<div className="content content_thin">
|
||||
<Page shareable={true}>
|
||||
{props.person.post}
|
||||
</Page>
|
||||
</div>
|
||||
</App>
|
||||
)
|
||||
|
||||
|
||||
@@ -16,11 +16,10 @@ export interface IAppProps {
|
||||
menu: any
|
||||
showAuthor: boolean
|
||||
menuPadding: boolean
|
||||
layout?: 'full' | 'wide' | 'thin'
|
||||
layout: 'full' | 'wide' | 'thin'
|
||||
}
|
||||
|
||||
export const App: React.FC<IAppProps> = props => {
|
||||
const layout = props.layout ? props.layout : 'full'
|
||||
const motionDisabled = useReducedMotion()
|
||||
|
||||
return (
|
||||
@@ -36,7 +35,7 @@ export const App: React.FC<IAppProps> = props => {
|
||||
</header>
|
||||
|
||||
<main className="body-wrapper__content">
|
||||
<section className={cx('content', `content_${layout}`, {
|
||||
<section className={cx('content', `content_${props.layout}`, {
|
||||
'content--padding-top--menu': props.menuPadding,
|
||||
'reduced-motion': motionDisabled,
|
||||
})}>
|
||||
|
||||
Reference in new issue
Block a user