-
Notifications
You must be signed in to change notification settings - Fork 171
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
White paper page and related components (#83)
* white papers WIP * jumbotron rework * cleanup * nuke dupe component * cleanup and bootstrap defaults * prettier and linting fix * improvements
- Loading branch information
1 parent
b236e12
commit 84d90a2
Showing
12 changed files
with
381 additions
and
136 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
import { FunctionComponent, ReactNode } from 'react' | ||
|
||
import classNames from 'classnames' | ||
|
||
import { TrySourcegraph } from 'components/TrySourcegraph' | ||
|
||
import styles from './whitePaperPage.module.scss' | ||
|
||
interface Props { | ||
title: string | ||
pdf?: string | ||
className?: string | ||
children?: ReactNode | ||
heroBackgroundImage?: string | ||
} | ||
|
||
export const WhitePaperPage: FunctionComponent<Props> = ({ title, className, pdf, children, heroBackgroundImage }) => ( | ||
<div className={className}> | ||
<div | ||
className={classNames('jumbotron rounded-0 min-h-250 d-flex align-items-center text-light', className, { | ||
[styles.hero]: heroBackgroundImage, | ||
})} | ||
// eslint-disable-next-line react/forbid-dom-props | ||
style={heroBackgroundImage ? { backgroundImage: `url(${heroBackgroundImage})` } : undefined} | ||
> | ||
<div className="container text-center py-5"> | ||
<span className="d-block mt-1 text-uppercase font-weight-bold">white paper</span> | ||
<h1>{title}</h1> | ||
{pdf && ( | ||
<a href={pdf} className="btn btn-primary mt-4" rel="noreferrer nofollow" target="_blank"> | ||
<i className="fa fa-file-pdf pr-2" /> | ||
Download PDF | ||
</a> | ||
)} | ||
</div> | ||
</div> | ||
|
||
{children} | ||
|
||
<div className="py-6"> | ||
<TrySourcegraph /> | ||
</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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
.hero { | ||
background-repeat: no-repeat; | ||
background-size: cover; | ||
background-position: center; | ||
} |
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
Oops, something went wrong.