| 1 |
/* |
| 2 |
* Copyright 2022 The JSpecify Authors. |
| 3 |
* |
| 4 |
* Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 |
* you may not use this file except in compliance with the License. |
| 6 |
* You may obtain a copy of the License at |
| 7 |
* |
| 8 |
* http://www.apache.org/licenses/LICENSE-2.0 |
| 9 |
* |
| 10 |
* Unless required by applicable law or agreed to in writing, software |
| 11 |
* distributed under the License is distributed on an "AS IS" BASIS, |
| 12 |
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 |
* See the License for the specific language governing permissions and |
| 14 |
* limitations under the License. |
| 15 |
*/ |
| 16 |
|
| 17 |
import React from 'react'; |
| 18 |
import clsx from 'clsx'; |
| 19 |
import Link from '@docusaurus/Link'; |
| 20 |
import useDocusaurusContext from '@docusaurus/useDocusaurusContext'; |
| 21 |
import Layout from '@theme/Layout'; |
| 22 |
import HomepageFeatures from '@site/src/components/HomepageFeatures'; |
| 23 |
|
| 24 |
import styles from './index.module.css'; |
| 25 |
|
| 26 |
import useBaseUrl from '@docusaurus/useBaseUrl'; |
| 27 |
|
| 28 |
function HomepageHeader() { |
| 29 |
const {siteConfig} = useDocusaurusContext(); |
| 30 |
return ( |
| 31 |
<header className={clsx('hero hero--primary', styles.heroBanner)}> |
| 32 |
<div className="container"> |
| 33 |
<h1> |
| 34 |
<img src={useBaseUrl('/img/jspecify-banner.svg')} className={styles.banner} alt='JSpecify Banner' /> |
| 35 |
</h1> |
| 36 |
<p className="hero__subtitle">{siteConfig.tagline}</p> |
| 37 |
<div className={styles.buttons}> |
| 38 |
<Link |
| 39 |
className="button button--secondary button--lg" |
| 40 |
to="/docs/start-here"> |
| 41 |
Learn More |
| 42 |
</Link> |
| 43 |
</div> |
| 44 |
</div> |
| 45 |
</header> |
| 46 |
); |
| 47 |
} |
| 48 |
|
| 49 |
export default function Home() { |
| 50 |
const {siteConfig} = useDocusaurusContext(); |
| 51 |
return ( |
| 52 |
<Layout |
| 53 |
title={`${siteConfig.title} Main`} |
| 54 |
description="Standard Annotations for Java Static Analysis"> |
| 55 |
<HomepageHeader /> |
| 56 |
<main> |
| 57 |
<HomepageFeatures /> |
| 58 |
</main> |
| 59 |
</Layout> |
| 60 |
); |
| 61 |
} |