forked from github/docs
-
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.
SCSS and Component cleanup (pt 1) (github#20572)
* turn article.scss into a module + componentized * Update Survey to use only component styles, add cancel button * Update GenericError + 404 page to use only standard classes * update LearningTrack to not use markdown-body * remove / consolidate stylesheets * cleanup Graphiql explorer page and scss * Componentize Breadcrumb styles * Componentize DeprecationBanner styles * scope h2 a link style to markdown-body * cleanup nav, organize page-header and page-footer components * remove unused scroll-button.scss * organize LanguagePicker and ProductPicker * add declarations file * remove featured-links.scss, update tests * update list utility and toc test * fix bad merge resolution * update breadcrumbs test
- Loading branch information
1 parent
4d87ccf
commit a511c95
Showing
52 changed files
with
441 additions
and
601 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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
type Props = { | ||
children: string | ||
} | ||
export const ArticleContent = ({ children }: Props) => { | ||
return ( | ||
<div | ||
id="article-contents" | ||
className="markdown-body" | ||
dangerouslySetInnerHTML={{ __html: children }} | ||
/> | ||
) | ||
} |
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,28 @@ | ||
import React from 'react' | ||
import cx from 'classnames' | ||
import styles from './ArticleGridLayout.module.scss' | ||
|
||
type Props = { | ||
head?: React.ReactNode | ||
toc?: React.ReactNode | ||
children?: React.ReactNode | ||
className?: string | ||
} | ||
export const ArticleGridLayout = ({ head, toc, children, className }: Props) => { | ||
return ( | ||
<div className={cx(styles.container, className)}> | ||
{/* head */} | ||
{head && <div className={styles.head}>{head}</div>} | ||
|
||
{/* toc */} | ||
{toc && ( | ||
<div className={cx(styles.sidebar, 'border-bottom border-xl-0 pb-4 mb-5 pb-xl-0 mb-xl-0')}> | ||
<div className={styles.sidebarContent}>{toc}</div> | ||
</div> | ||
)} | ||
|
||
{/* content */} | ||
<div className={styles.content}>{children}</div> | ||
</div> | ||
) | ||
} |
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,18 @@ | ||
import { Breadcrumbs } from 'components/Breadcrumbs' | ||
import { ArticleVersionPicker } from 'components/article/ArticleVersionPicker' | ||
|
||
export const ArticleTopper = () => { | ||
return ( | ||
<div className="d-lg-flex flex-justify-between"> | ||
<div className="d-block d-lg-none mb-2"> | ||
<ArticleVersionPicker /> | ||
</div> | ||
<div className="d-flex flex-items-center"> | ||
<Breadcrumbs /> | ||
</div> | ||
<div className="d-none d-lg-block"> | ||
<ArticleVersionPicker /> | ||
</div> | ||
</div> | ||
) | ||
} |
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
Oops, something went wrong.