2022-03-12 23:40:28 -05:00
|
|
|
import styles from '@styles/Home.module.css'
|
2022-03-09 20:47:54 -05:00
|
|
|
import { Page, Spacer, Text } from '@geist-ui/core'
|
2022-03-07 19:42:47 -05:00
|
|
|
|
2022-03-12 23:40:28 -05:00
|
|
|
import Header from '@components/header'
|
2022-03-07 19:42:47 -05:00
|
|
|
import { ThemeProps } from './_app'
|
2022-03-12 23:40:28 -05:00
|
|
|
import Document from '@components/document'
|
2022-03-09 20:47:54 -05:00
|
|
|
import Image from 'next/image'
|
2022-03-12 23:40:28 -05:00
|
|
|
import ShiftBy from '@components/shift-by'
|
|
|
|
import PageSeo from '@components/page-seo'
|
2022-03-08 19:39:24 -05:00
|
|
|
|
|
|
|
export function getStaticProps() {
|
2022-03-11 18:57:42 -05:00
|
|
|
const introDoc = process.env.WELCOME_CONTENT
|
2022-03-08 19:39:24 -05:00
|
|
|
return {
|
|
|
|
props: {
|
|
|
|
introContent: introDoc,
|
2022-03-11 18:57:42 -05:00
|
|
|
introTitle: process.env.WELCOME_TITLE,
|
2022-03-08 19:39:24 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
type Props = ThemeProps & {
|
|
|
|
introContent: string
|
|
|
|
}
|
|
|
|
|
2022-03-10 15:51:26 -05:00
|
|
|
const Home = ({ theme, changeTheme, introContent }: Props) => {
|
2022-03-07 19:42:47 -05:00
|
|
|
return (
|
2022-03-07 21:36:36 -05:00
|
|
|
<Page className={styles.container} width="100%">
|
2022-03-12 23:13:35 -05:00
|
|
|
<PageSeo />
|
|
|
|
|
2022-03-07 19:42:47 -05:00
|
|
|
<Page.Header>
|
|
|
|
<Header theme={theme} changeTheme={changeTheme} />
|
|
|
|
</Page.Header>
|
2022-03-08 19:39:24 -05:00
|
|
|
<Page.Content width={"var(--main-content-width)"} margin="auto" paddingTop={"var(--gap)"}>
|
2022-03-09 20:47:54 -05: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 19:42:47 -05:00
|
|
|
<Document
|
|
|
|
editable={false}
|
2022-03-08 19:39:24 -05:00
|
|
|
content={introContent}
|
2022-03-08 00:02:51 -05:00
|
|
|
title={`Welcome to Drift.md`}
|
|
|
|
initialTab={`preview`}
|
|
|
|
/>
|
2022-03-07 19:42:47 -05:00
|
|
|
</Page.Content>
|
2022-03-12 23:13:35 -05:00
|
|
|
</Page>
|
2022-03-07 19:42:47 -05:00
|
|
|
)
|
|
|
|
}
|
|
|
|
|
|
|
|
export default Home
|