App layout prop update
This commit is contained in:
1 parent
228e7824de
commit
3902815113
11 files changed
+89
-100
No files matched your search
+10
-11
@@ -12,21 +12,20 @@ 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}
|
||||
shareable={true}
|
||||
>
|
||||
<Html
|
||||
html={props.album.post}
|
||||
/>
|
||||
</Article>
|
||||
</div>
|
||||
<Article
|
||||
title={props.album.title}
|
||||
date={props.album.date}
|
||||
shareable={true}
|
||||
>
|
||||
<Html
|
||||
html={props.album.post}
|
||||
/>
|
||||
</Article>
|
||||
</App>
|
||||
)
|
||||
|
||||
|
||||
+11
-12
@@ -15,23 +15,22 @@ 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}
|
||||
tags={props.article.tags}
|
||||
shareable={true}
|
||||
>
|
||||
<Html
|
||||
html={props.article.post}
|
||||
/>
|
||||
</Article>
|
||||
</div>
|
||||
<Article
|
||||
title={props.article.title}
|
||||
date={props.article.date}
|
||||
tags={props.article.tags}
|
||||
shareable={true}
|
||||
>
|
||||
<Html
|
||||
html={props.article.post}
|
||||
/>
|
||||
</Article>
|
||||
</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>
|
||||
<ArticleCardList
|
||||
articles={props.articles}
|
||||
prevPage={props.prevPage}
|
||||
nextPage={props.nextPage}
|
||||
/>
|
||||
</App>
|
||||
)
|
||||
|
||||
|
||||
+20
-21
@@ -16,35 +16,34 @@ 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}
|
||||
style={{
|
||||
marginBottom: 'var(--double-margin)',
|
||||
}}
|
||||
{!props.image ? null : (
|
||||
<CollectiveImage
|
||||
data={props.image}
|
||||
style={{
|
||||
marginBottom: 'var(--double-margin)',
|
||||
}}
|
||||
/>
|
||||
)}
|
||||
|
||||
<CardList
|
||||
items={props.persons}
|
||||
renderItem={(person, index) => (
|
||||
<PersonCard
|
||||
key={index}
|
||||
profile={person}
|
||||
picture={person.picture}
|
||||
url={person.url}
|
||||
name={person.name}
|
||||
/>
|
||||
)}
|
||||
|
||||
<CardList
|
||||
items={props.persons}
|
||||
renderItem={(person, index) => (
|
||||
<PersonCard
|
||||
key={index}
|
||||
profile={person}
|
||||
picture={person.picture}
|
||||
url={person.url}
|
||||
name={person.name}
|
||||
/>
|
||||
)}
|
||||
/>
|
||||
</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>
|
||||
<Document {...props.file} />
|
||||
<Share />
|
||||
</App>
|
||||
)
|
||||
|
||||
|
||||
+8
-9
@@ -106,21 +106,20 @@ 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}
|
||||
name={collection.name}
|
||||
documents={collection.items}
|
||||
/>
|
||||
))}
|
||||
</div>
|
||||
{props.collections.map((collection, index) => (
|
||||
<DocumentList
|
||||
key={index}
|
||||
name={collection.name}
|
||||
documents={collection.items}
|
||||
/>
|
||||
))}
|
||||
</App>
|
||||
)
|
||||
|
||||
|
||||
+14
-15
@@ -69,27 +69,26 @@ 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={'Галерея'}
|
||||
>
|
||||
{props.collections.map(([year, albums], index) => (
|
||||
<ACollection
|
||||
key={index}
|
||||
title={year}
|
||||
albums={albums}
|
||||
/>
|
||||
))
|
||||
}
|
||||
</Article>
|
||||
</div>
|
||||
<Article
|
||||
// title={meta.title}
|
||||
title={'Галерея'}
|
||||
>
|
||||
{props.collections.map(([year, albums], index) => (
|
||||
<ACollection
|
||||
key={index}
|
||||
title={year}
|
||||
albums={albums}
|
||||
/>
|
||||
))
|
||||
}
|
||||
</Article>
|
||||
</App>
|
||||
)
|
||||
|
||||
|
||||
+7
-8
@@ -14,21 +14,20 @@ 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 />
|
||||
<HudozkaTitle />
|
||||
|
||||
<ArticleCardList
|
||||
articles={props.articles}
|
||||
prevPage={props.prevPage}
|
||||
nextPage={props.nextPage}
|
||||
/>
|
||||
</div>
|
||||
<ArticleCardList
|
||||
articles={props.articles}
|
||||
prevPage={props.prevPage}
|
||||
nextPage={props.nextPage}
|
||||
/>
|
||||
</App>
|
||||
)
|
||||
|
||||
|
||||
+4
-5
@@ -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}/>*/}
|
||||
{/*<ScheduleList schedules={schedules}/>*/}
|
||||
|
||||
<Schedule {...props.schedule} />
|
||||
<Schedule {...props.schedule} />
|
||||
|
||||
<Share />
|
||||
</div>
|
||||
<Share />
|
||||
</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>
|
||||
<Page shareable={true}>
|
||||
{props.person.post}
|
||||
</Page>
|
||||
</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