2022-03-13 01:40:28 -03:00
|
|
|
import styles from '@styles/Home.module.css'
|
2022-03-21 20:30:45 -07:00
|
|
|
import Page from '@geist-ui/core/dist/page'
|
|
|
|
import Spacer from '@geist-ui/core/dist/spacer'
|
|
|
|
import Text from '@geist-ui/core/dist/text'
|
2022-03-13 01:40:28 -03:00
|
|
|
import Header from '@components/header'
|
|
|
|
import Document from '@components/document'
|
2022-03-09 17:47:54 -08:00
|
|
|
import Image from 'next/image'
|
2022-03-13 01:40:28 -03:00
|
|
|
import ShiftBy from '@components/shift-by'
|
|
|
|
import PageSeo from '@components/page-seo'
|
2022-03-21 03:28:06 -07:00
|
|
|
import { ThemeProps } from '@lib/types'
|
2022-03-08 16:39:24 -08:00
|
|
|
|
|
|
|
export function getStaticProps() {
|
2022-03-11 15:57:42 -08:00
|
|
|
const introDoc = process.env.WELCOME_CONTENT
|
2022-03-08 16:39:24 -08:00
|
|
|
return {
|
|
|
|
props: {
|
|
|
|
introContent: introDoc,
|
2022-03-11 15:57:42 -08:00
|
|
|
introTitle: process.env.WELCOME_TITLE,
|
2022-03-08 16:39:24 -08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
type Props = ThemeProps & {
|
|
|
|
introContent: string
|
|
|
|
}
|
|
|
|
|
2022-03-10 12:51:26 -08:00
|
|
|
const Home = ({ theme, changeTheme, introContent }: Props) => {
|
2022-03-07 16:42:47 -08:00
|
|
|
return (
|
2022-03-07 18:36:36 -08:00
|
|
|
<Page className={styles.container} width="100%">
|
2022-03-13 01:13:35 -03:00
|
|
|
<PageSeo />
|
|
|
|
|
2022-03-07 16:42:47 -08:00
|
|
|
<Page.Header>
|
|
|
|
<Header theme={theme} changeTheme={changeTheme} />
|
|
|
|
</Page.Header>
|
2022-03-08 16:39:24 -08:00
|
|
|
<Page.Content width={"var(--main-content-width)"} margin="auto" paddingTop={"var(--gap)"}>
|
2022-03-09 17:47:54 -08:00
|
|
|
<div style={{ display: 'flex', flexDirection: 'row', alignItems: 'center' }}>
|
|
|
|
<ShiftBy y={-2}><Image src={'/assets/logo-optimized.svg'} width={'48px'} height={'48px'} alt="" /></ShiftBy>
|
|
|
|
<Spacer />
|
|
|
|
<Text style={{ display: 'inline' }} h1> Welcome to Drift</Text>
|
|
|
|
</div>
|
2022-03-07 16:42:47 -08:00
|
|
|
<Document
|
|
|
|
editable={false}
|
2022-03-08 16:39:24 -08:00
|
|
|
content={introContent}
|
2022-03-07 21:02:51 -08:00
|
|
|
title={`Welcome to Drift.md`}
|
|
|
|
initialTab={`preview`}
|
|
|
|
/>
|
2022-03-07 16:42:47 -08:00
|
|
|
</Page.Content>
|
2022-03-13 01:13:35 -03:00
|
|
|
</Page>
|
2022-03-07 16:42:47 -08:00
|
|
|
)
|
|
|
|
}
|
|
|
|
|
|
|
|
export default Home
|