-
Notifications
You must be signed in to change notification settings - Fork 173
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* back button component * back button in getting started pages * prettier * linting
- Loading branch information
1 parent
9207db6
commit d8e3269
Showing
4 changed files
with
93 additions
and
79 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import { FunctionComponent } from 'react' | ||
|
||
import ArrowLeftIcon from 'mdi-react/ArrowLeftIcon' | ||
import Link from 'next/link' | ||
|
||
interface BackButtonProps { | ||
href: string | ||
text: string | ||
bold?: boolean | ||
} | ||
|
||
export const BackButton: FunctionComponent<BackButtonProps> = ({ href, text, bold }) => ( | ||
<Link href={href} passHref={true}> | ||
<div className="btn p-0 text-uppercase mb-3 font-weight-normal"> | ||
<ArrowLeftIcon className="mb-1" /> | ||
<span className={`h6 font-weight-${bold ? 'bold' : 'normal'} ml-3`}>{text}</span> | ||
</div> | ||
</Link> | ||
) |
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 |
---|---|---|
@@ -1,93 +1,86 @@ | ||
import { FunctionComponent } from 'react' | ||
|
||
import ArrowLeftIcon from 'mdi-react/ArrowLeftIcon' | ||
import ArrowRightIcon from 'mdi-react/ArrowRightIcon' | ||
import { useRouter } from 'next/router' | ||
|
||
import { Layout, Install } from '@components' | ||
import { Layout, Install, BackButton } from '@components' | ||
import { useQueryString } from '@hooks' | ||
|
||
import { BestForTitle, MostPopularBadge } from '.' | ||
|
||
import styles from './getStarted.module.scss' | ||
|
||
export const BackButton: FunctionComponent = () => { | ||
const router = useRouter() | ||
export const SelfHostedPage: FunctionComponent = () => { | ||
const routerHook = useQueryString() | ||
|
||
return ( | ||
<div className="d-flex align-items-center btn p-0 text-uppercase mb-3 font-weight-normal"> | ||
<button className="btn p-0 text-uppercase font-weight-normal" type="button" onClick={() => router.back()}> | ||
<ArrowLeftIcon className="mb-1" /> | ||
</button> | ||
<span className="h6 font-weight-normal ml-3 mb-0">Deployment Options</span> | ||
</div> | ||
) | ||
} | ||
|
||
export const SelfHostedPage: FunctionComponent = () => ( | ||
<Layout | ||
meta={{ | ||
title: 'Get Started with Sourcegraph Self-Hosted', | ||
description: | ||
'Deploy and control Sourcegraph in your own infrastructure, or use Docker to install locally. Get started for free.', | ||
}} | ||
hero={ | ||
<div className="container-xl py-5"> | ||
<h1 className="display-1 mb-2"> | ||
<strong>What's best for you?</strong> | ||
</h1> | ||
<p>From Amazon to Uber, the world's best developers use Sourcegraph every day.</p> | ||
</div> | ||
} | ||
heroAndHeaderClassName={styles.hero} | ||
hideGetStartedButton={true} | ||
> | ||
<div className={`${styles.root} bg-gradient-blue-purple py-5`}> | ||
<div className="row container-xl mx-auto py-5"> | ||
<div className="col-lg-6"> | ||
<div> | ||
<BackButton /> | ||
|
||
<h1 className="display-2 font-weight-bolder mb-2"> | ||
Sourcegraph <br /> | ||
Self-Hosted | ||
</h1> | ||
|
||
<MostPopularBadge /> | ||
|
||
<p className="mt-4"> | ||
Deploy and control Sourcegraph in your own infrastructure, or use Docker to install locally. | ||
Get started for free. | ||
</p> | ||
|
||
<BestForTitle /> | ||
<p>Teams and enterprises</p> | ||
|
||
<p> | ||
Collaborate with your team on any code host (including private hosts) and access advanced | ||
security functionality. | ||
</p> | ||
</div> | ||
<Layout | ||
meta={{ | ||
title: 'Get Started with Sourcegraph Self-Hosted', | ||
description: | ||
'Deploy and control Sourcegraph in your own infrastructure, or use Docker to install locally. Get started for free.', | ||
}} | ||
hero={ | ||
<div className="container-xl py-5"> | ||
<h1 className="display-1 mb-2"> | ||
<strong>What's best for you?</strong> | ||
</h1> | ||
<p>From Amazon to Uber, the world's best developers use Sourcegraph every day.</p> | ||
</div> | ||
} | ||
heroAndHeaderClassName={styles.hero} | ||
hideGetStartedButton={true} | ||
> | ||
<div className={`${styles.root} bg-gradient-blue-purple py-5`}> | ||
<div className="row container-xl mx-auto py-5"> | ||
<div className="col-lg-6"> | ||
<div> | ||
<BackButton | ||
href={`/get-started${routerHook.queryString ? `?${routerHook.queryString}` : ''}`} | ||
text="Deployment Options" | ||
/> | ||
|
||
<h1 className="display-2 font-weight-bolder mb-2"> | ||
Sourcegraph <br /> | ||
Self-Hosted | ||
</h1> | ||
|
||
<MostPopularBadge /> | ||
|
||
<p className="mt-4"> | ||
Deploy and control Sourcegraph in your own infrastructure, or use Docker to install | ||
locally. Get started for free. | ||
</p> | ||
|
||
<BestForTitle /> | ||
<p>Teams and enterprises</p> | ||
|
||
<p> | ||
Collaborate with your team on any code host (including private hosts) and access | ||
advanced security functionality. | ||
</p> | ||
</div> | ||
</div> | ||
|
||
<div className="col-lg-6"> | ||
<Install /> | ||
|
||
<div className="d-flex flex-column align-items-start"> | ||
<a | ||
className="btn p-0 my-4 text-primary" | ||
href="https://info.sourcegraph.com/talk-to-a-developer" | ||
> | ||
Talk to an engineer <ArrowRightIcon /> | ||
</a> | ||
|
||
<a className="btn p-0 text-primary" href="https://docs.sourcegraph.com/"> | ||
Deploy to a server or cluster <ArrowRightIcon /> | ||
</a> | ||
<div className="col-lg-6"> | ||
<Install /> | ||
|
||
<div className="d-flex flex-column align-items-start"> | ||
<a | ||
className="btn p-0 my-4 text-primary" | ||
href="https://info.sourcegraph.com/talk-to-a-developer" | ||
> | ||
Talk to an engineer <ArrowRightIcon /> | ||
</a> | ||
|
||
<a className="btn p-0 text-primary" href="https://docs.sourcegraph.com/"> | ||
Deploy to a server or cluster <ArrowRightIcon /> | ||
</a> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</Layout> | ||
) | ||
</Layout> | ||
) | ||
} | ||
|
||
export default SelfHostedPage |