-
-
Notifications
You must be signed in to change notification settings - Fork 476
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: fix eslint & update CODEOWNERS & update document homepage (#625)
- Loading branch information
Showing
9 changed files
with
284 additions
and
412 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 |
---|---|---|
@@ -1,6 +1,11 @@ | ||
# Build | ||
dist | ||
lib | ||
local | ||
.turbo | ||
.docusaurus | ||
typedoc | ||
|
||
|
||
# Coverage | ||
coverage-report/ | ||
|
Validating CODEOWNERS rules …
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
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,23 +1,26 @@ | ||
/** | ||
* CSS files with the .module.css suffix will be treated as CSS modules | ||
* and scoped locally. | ||
*/ | ||
.header { | ||
margin-top: 6rem; | ||
margin-bottom: 8rem; | ||
} | ||
|
||
.heroBanner { | ||
position: relative; | ||
overflow: hidden; | ||
padding: 4rem 0; | ||
text-align: center; | ||
.h1 { | ||
font-size: 40px; | ||
font-weight: 500; | ||
color: var(--ifm-heading-color); | ||
} | ||
|
||
@media screen and (width <=996px) { | ||
.heroBanner { | ||
padding: 2rem; | ||
} | ||
.h2 { | ||
font-size: 32px; | ||
font-weight: normal; | ||
color: var(--ifm-hero-text-color); | ||
} | ||
|
||
.buttons { | ||
display: flex; | ||
.btn { | ||
display: inline-flex; | ||
gap: 4px; | ||
align-items: center; | ||
justify-content: center; | ||
} | ||
|
||
.icon { | ||
font-size: 20px; | ||
} |
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,30 +1,57 @@ | ||
import { useHistory } from '@docusaurus/router'; | ||
import useDocusaurusContext from '@docusaurus/useDocusaurusContext'; | ||
import Heading from '@theme/Heading'; | ||
import Layout from '@theme/Layout'; | ||
import { DiscordSingle24, GithubSingle24 } from '@univerjs/icons'; | ||
import clsx from 'clsx'; | ||
|
||
import styles from './index.module.css'; | ||
|
||
function HomepageHeader() { | ||
export default function Home() { | ||
const { siteConfig } = useDocusaurusContext(); | ||
const history = useHistory(); | ||
|
||
function handleRedirect(external: boolean, url: string) { | ||
if (external) { | ||
window.open(url, '_blank'); | ||
} else { | ||
history.push(url); | ||
} | ||
} | ||
|
||
return ( | ||
<header className={clsx('hero hero--primary', styles.heroBanner)}> | ||
<div className="container"> | ||
<Heading as="h1" className="hero__title"> | ||
<Layout> | ||
<header className={clsx('container', styles.header)}> | ||
<Heading as="h1" className={styles.h1}> | ||
{siteConfig.title} | ||
</Heading> | ||
<p className="hero__subtitle">{siteConfig.tagline}</p> | ||
</div> | ||
</header> | ||
); | ||
} | ||
|
||
export default function Home(): JSX.Element { | ||
const { siteConfig } = useDocusaurusContext(); | ||
return ( | ||
<Layout> | ||
<HomepageHeader /> | ||
<main>main area, Hello {siteConfig.title}</main> | ||
<Heading as="h2" className={styles.h2}> | ||
{siteConfig.tagline} | ||
</Heading> | ||
|
||
<section> | ||
<button | ||
className="button button--primary margin-right--sm" | ||
onClick={() => handleRedirect(false, '/docs/tutorial/intro')} | ||
> | ||
Get Started | ||
</button> | ||
<button | ||
className={clsx('button button--outline button--secondary margin-right--sm', styles.btn)} | ||
onClick={() => handleRedirect(true, 'https://discord.gg/z3NKNT6D2f')} | ||
> | ||
<DiscordSingle24 className={styles.icon} /> | ||
Discord | ||
</button> | ||
<button | ||
className={clsx('button button--outline button--secondary', styles.btn)} | ||
onClick={() => handleRedirect(true, 'https://github.com/dream-num/univer')} | ||
> | ||
<GithubSingle24 className={styles.icon} /> | ||
</button> | ||
</section> | ||
</header> | ||
</Layout> | ||
); | ||
} |
Oops, something went wrong.