content wide rm

This commit is contained in:
tmshv committed 2021-09-22 16:05:46 +03:00
1 parent b25f8eb0e9
commit 2be00d53a4
5 files changed
+3 -14

No files matched your search

-1
View File
@@ -19,7 +19,6 @@ type Props = {
const Index: NextPage<Props> = props => ( const Index: NextPage<Props> = props => (
<App <App
showAuthor={true} showAuthor={true}
wide={false}
menu={props.menu} menu={props.menu}
> >
<Head> <Head>
+3 -4
View File
@@ -16,13 +16,12 @@ const Navigation = dynamic(() => import('../Navigation').then(mod => mod.Navigat
export interface IAppProps { export interface IAppProps {
showAuthor?: boolean showAuthor?: boolean
wide?: boolean
contentStyle?: React.CSSProperties contentStyle?: React.CSSProperties
breadcrumbs?: IBreadcumbsPart[] breadcrumbs?: IBreadcumbsPart[]
menu: IMenu[] menu: IMenu[]
} }
export const App: React.FC<IAppProps> = ({ showAuthor = false, wide = false, menu, ...props }) => { export const App: React.FC<IAppProps> = ({ showAuthor = false, menu, ...props }) => {
const hideBreadcrumbs = useMobile() const hideBreadcrumbs = useMobile()
const router = useRouter() const router = useRouter()
const blockStyle = { const blockStyle = {
@@ -42,7 +41,7 @@ export const App: React.FC<IAppProps> = ({ showAuthor = false, wide = false, men
}} /> }} />
{hideBreadcrumbs || !props.breadcrumbs ? null : ( {hideBreadcrumbs || !props.breadcrumbs ? null : (
<Block direction={'horizontal'} style={blockStyle}> <Block direction={'horizontal'} style={blockStyle}>
<Content wide={wide}> <Content>
<Breadcrumbs <Breadcrumbs
items={props.breadcrumbs} items={props.breadcrumbs}
path={router.asPath} path={router.asPath}
@@ -59,7 +58,7 @@ export const App: React.FC<IAppProps> = ({ showAuthor = false, wide = false, men
)} )}
> >
<Block direction={'horizontal'} style={blockStyle}> <Block direction={'horizontal'} style={blockStyle}>
<Content wide={wide} style={props.contentStyle}> <Content style={props.contentStyle}>
{props.children} {props.children}
</Content> </Content>
</Block> </Block>
-2
View File
@@ -3,7 +3,6 @@ import { useReducedMotion } from 'src/hooks/useReducedMotion'
export type ContentProps = { export type ContentProps = {
style?: React.CSSProperties style?: React.CSSProperties
wide: boolean
} }
export const Content: React.FC<ContentProps> = props => { export const Content: React.FC<ContentProps> = props => {
@@ -13,7 +12,6 @@ export const Content: React.FC<ContentProps> = props => {
<div <div
className={cx('content', { className={cx('content', {
'reduced-motion': motionDisabled, 'reduced-motion': motionDisabled,
'content_wide': props.wide,
})} })}
style={props.style} style={props.style}
> >
-5
View File
@@ -3,11 +3,6 @@
margin: var(--content-margin); margin: var(--content-margin);
} }
.content_wide {
--content-width: var(--content-wide-width);
--content-margin: var(--content-wide-margin);
}
/* Animation on load */ /* Animation on load */
@keyframes smallSlideInFromTop { @keyframes smallSlideInFromTop {
-2
View File
@@ -48,8 +48,6 @@
/* CONTENT */ /* CONTENT */
--content-width: 75%; --content-width: 75%;
--content-margin: 0; --content-margin: 0;
--content-wide-width: 100%;
--content-wide-margin: var(--size-l) var(--size-xl);
--text-max-width: 800px; --text-max-width: 800px;