forked from nodejs/nodejs.org
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(layout): Refractoring (nodejs#6929)
* feat(layout): introduce SimplePage * feat(layout): refractoring * fix: flex col ≠ flex row
- Loading branch information
1 parent
6360223
commit f116efe
Showing
12 changed files
with
117 additions
and
146 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import type { FC, PropsWithChildren } from 'react'; | ||
|
||
import WithMetaBar from '@/components/withMetaBar'; | ||
import WithNavBar from '@/components/withNavBar'; | ||
import WithSidebar from '@/components/withSidebar'; | ||
import ArticleLayout from '@/layouts/Article'; | ||
|
||
const ArticlePageLayout: FC<PropsWithChildren> = ({ children }) => ( | ||
<> | ||
<WithNavBar /> | ||
|
||
<ArticleLayout> | ||
<WithSidebar navKeys={[]} /> | ||
|
||
<div> | ||
<main>{children}</main> | ||
|
||
<WithMetaBar /> | ||
</div> | ||
</ArticleLayout> | ||
</> | ||
); | ||
|
||
export default ArticlePageLayout; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +0,0 @@ | ||
import type { FC, PropsWithChildren } from 'react'; | ||
|
||
import WithFooter from '@/components/withFooter'; | ||
import WithNavBar from '@/components/withNavBar'; | ||
|
||
import styles from './layouts.module.css'; | ||
|
||
const CenteredLayout: FC<PropsWithChildren> = ({ children }) => ( | ||
<> | ||
<WithNavBar /> | ||
|
||
<div className={styles.centeredLayout}>{children}</div> | ||
|
||
<WithFooter /> | ||
</> | ||
); | ||
|
||
export default CenteredLayout; | ||
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import classNames from 'classnames'; | ||
import type { FC, PropsWithChildren } from 'react'; | ||
|
||
import GlowingBackdrop from '@/components/Common/GlowingBackdrop'; | ||
import WithFooter from '@/components/withFooter'; | ||
import WithNavBar from '@/components/withNavBar'; | ||
|
||
import styles from './layouts.module.css'; | ||
|
||
type GlowingBackdropLayoutProps = PropsWithChildren<{ | ||
kind?: 'home'; | ||
}>; | ||
|
||
const GlowingBackdropLayout: FC<GlowingBackdropLayoutProps> = ({ | ||
kind, | ||
children, | ||
}) => ( | ||
<> | ||
<WithNavBar /> | ||
<div className={styles.centeredLayout}> | ||
<GlowingBackdrop /> | ||
|
||
<main | ||
className={classNames({ | ||
[styles.homeLayout]: kind === 'home', | ||
})} | ||
> | ||
{children} | ||
</main> | ||
</div> | ||
<WithFooter /> | ||
</> | ||
); | ||
|
||
export default GlowingBackdropLayout; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,4 +6,5 @@ export type Layouts = | |
| 'blog-category' | ||
| 'blog-post' | ||
| 'search' | ||
| 'download'; | ||
| 'download' | ||
| 'article'; |