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