diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/components/HomepageFeatures/index.tsx | 70 | ||||
-rw-r--r-- | src/components/HomepageFeatures/styles.module.css | 11 | ||||
-rw-r--r-- | src/css/custom.css | 108 | ||||
-rw-r--r-- | src/pages/index.module.css | 23 | ||||
-rw-r--r-- | src/pages/index.tsx | 47 | ||||
-rw-r--r-- | src/pages/markdown-page.md | 7 |
6 files changed, 266 insertions, 0 deletions
diff --git a/src/components/HomepageFeatures/index.tsx b/src/components/HomepageFeatures/index.tsx new file mode 100644 index 0000000..91ef460 --- /dev/null +++ b/src/components/HomepageFeatures/index.tsx @@ -0,0 +1,70 @@ +import React from 'react'; +import clsx from 'clsx'; +import styles from './styles.module.css'; + +type FeatureItem = { + title: string; + Svg: React.ComponentType<React.ComponentProps<'svg'>>; + description: JSX.Element; +}; + +const FeatureList: FeatureItem[] = [ + { + title: 'Easy to Use', + Svg: require('@site/static/img/undraw_docusaurus_mountain.svg').default, + description: ( + <> + Docusaurus was designed from the ground up to be easily installed and + used to get your website up and running quickly. + </> + ), + }, + { + title: 'Focus on What Matters', + Svg: require('@site/static/img/undraw_docusaurus_tree.svg').default, + description: ( + <> + Docusaurus lets you focus on your docs, and we'll do the chores. Go + ahead and move your docs into the <code>docs</code> directory. + </> + ), + }, + { + title: 'Powered by React', + Svg: require('@site/static/img/undraw_docusaurus_react.svg').default, + description: ( + <> + Extend or customize your website layout by reusing React. Docusaurus can + be extended while reusing the same header and footer. + </> + ), + }, +]; + +function Feature({title, Svg, description}: FeatureItem) { + return ( + <div className={clsx('col col--4')}> + <div className="text--center"> + <Svg className={styles.featureSvg} role="img" /> + </div> + <div className="text--center padding-horiz--md"> + <h3>{title}</h3> + <p>{description}</p> + </div> + </div> + ); +} + +export default function HomepageFeatures(): JSX.Element { + return ( + <section className={styles.features}> + <div className="container"> + <div className="row"> + {FeatureList.map((props, idx) => ( + <Feature key={idx} {...props} /> + ))} + </div> + </div> + </section> + ); +} diff --git a/src/components/HomepageFeatures/styles.module.css b/src/components/HomepageFeatures/styles.module.css new file mode 100644 index 0000000..b248eb2 --- /dev/null +++ b/src/components/HomepageFeatures/styles.module.css @@ -0,0 +1,11 @@ +.features { + display: flex; + align-items: center; + padding: 2rem 0; + width: 100%; +} + +.featureSvg { + height: 200px; + width: 200px; +} diff --git a/src/css/custom.css b/src/css/custom.css new file mode 100644 index 0000000..4537517 --- /dev/null +++ b/src/css/custom.css @@ -0,0 +1,108 @@ +/** + * Any CSS included here will be global. The classic template + * bundles Infima by default. Infima is a CSS framework designed to + * work well for content-centric websites. + */ + +@import url('https://fonts.googleapis.com/css2?family=Lexend+Mega:wght@900&family=Ubuntu&display=swap'); +@tailwind base; +@tailwind components; +@tailwind utilities; + +body { + background-color: theme('colors.background'); +} + +h1, h2, h3, h4, h5, h6 { + font-family: 'Lexend Mega', sans-serif; +} + +* { + font-family: 'Ubuntu', sans-serif; +} + +.navbar { + flex: auto; + background-color: theme('colors.background'); + border: 0; + box-shadow: none; +} + +.navbar__item { + background-color: #A6FAFF; + border-color: black; + border-width: 2px; + border-radius: 10px; + margin: 0 0.5rem; + padding: 10px 15px; +} + +.navbar__item:hover { + background-color: #79F7FF; + box-shadow: 2px 2px 0px 0px black; + border-color: black; + color: black; + font-weight: bold; + border-width: 2px; + margin: 0 0.5rem; +} + +.navbar__items--right > .navbar__item { + background-color: yellow; + border-color: black; + border-width: 2px; + border-radius: 10px; + margin: 0 0.5rem; + padding: 10px 15px; +} + +.navbar__items--right > .navbar__item:hover { + background-color: #E3A018; + box-shadow: 2px 2px 0px 0px black; + border-color: black; + color: black; + font-weight: bold; + border-width: 2px; + margin: 0 0.5rem; +} + +.navbar__logo { + margin: 0; + background-color: white; + border-radius: 100%; + height: 64px; +} + +.navbar__logo > img { + padding: 12px; +} + +.navbar__items--right > .navbar__item > svg { + display: none; +} + +/* You can override the default Infima variables here. */ +/* :root { + --ifm-color-primary: #2e8555; + --ifm-color-primary-dark: #29784c; + --ifm-color-primary-darker: #277148; + --ifm-color-primary-darkest: #205d3b; + --ifm-color-primary-light: #33925d; + --ifm-color-primary-lighter: #359962; + --ifm-color-primary-lightest: #3cad6e; + --ifm-code-font-size: 95%; + --docusaurus-highlighted-code-line-bg: rgba(0, 0, 0, 0.1); +} + +/* For readability concerns, you should choose a lighter palette in dark mode. */ +/*[data-theme='dark'] { + --ifm-color-primary: #25c2a0; + --ifm-color-primary-dark: #21af90; + --ifm-color-primary-darker: #1fa588; + --ifm-color-primary-darkest: #1a8870; + --ifm-color-primary-light: #29d5b0; + --ifm-color-primary-lighter: #32d8b4; + --ifm-color-primary-lightest: #4fddbf; + --docusaurus-highlighted-code-line-bg: rgba(0, 0, 0, 0.3); +} +*/ diff --git a/src/pages/index.module.css b/src/pages/index.module.css new file mode 100644 index 0000000..9f71a5d --- /dev/null +++ b/src/pages/index.module.css @@ -0,0 +1,23 @@ +/** + * CSS files with the .module.css suffix will be treated as CSS modules + * and scoped locally. + */ + +.heroBanner { + padding: 4rem 0; + text-align: center; + position: relative; + overflow: hidden; +} + +@media screen and (max-width: 996px) { + .heroBanner { + padding: 2rem; + } +} + +.buttons { + display: flex; + align-items: center; + justify-content: center; +} diff --git a/src/pages/index.tsx b/src/pages/index.tsx new file mode 100644 index 0000000..8762287 --- /dev/null +++ b/src/pages/index.tsx @@ -0,0 +1,47 @@ +import React from "react"; +import clsx from "clsx"; +import Link from "@docusaurus/Link"; +import useDocusaurusContext from "@docusaurus/useDocusaurusContext"; +import Layout from "@theme/Layout"; +import HomepageFeatures from "@site/src/components/HomepageFeatures"; + +import styles from "./index.module.css"; + +function HomepageHeader() { + const { siteConfig } = useDocusaurusContext(); + return ( + <header + className={clsx("bg-background hero hero--primary", styles.heroBanner)} + > + <div className="bg-white-500 text-black container"> + <div className="px-8 py-4 bg-white border-4 border-black shadow-[8px_8px_0px_rgba(0,0,0,1)] grid place-content-center space-y-4"> + <img src="/img/logo.svg" alt="logo" className="mx-auto h-64" /> + <h1 className="hero__title">{siteConfig.title}</h1> + <div className={styles.buttons}></div> + <p className="text-2xl mb-4">{siteConfig.tagline}</p> + <div className="mx-auto p-5"> + <Link to="/docs/intro"> + <button className="h-12 border-black border-2 p-2.5 bg-accent hover:bg-secondary hover:shadow-[3px_2px_0px_rgba(0,0,0,1)] text-black hover:text-white active:bg-secondary rounded-full"> + <h2>Read the Manifesto!</h2> + </button> + </Link> + </div> + </div> + </div> + </header> + ); +} + +export default function Home(): JSX.Element { + const { siteConfig } = useDocusaurusContext(); + return ( + <> + <Layout description={`${siteConfig.tagline}`}> + <HomepageHeader /> + <main> + <HomepageFeatures /> + </main> + </Layout> + </> + ); +} diff --git a/src/pages/markdown-page.md b/src/pages/markdown-page.md new file mode 100644 index 0000000..9756c5b --- /dev/null +++ b/src/pages/markdown-page.md @@ -0,0 +1,7 @@ +--- +title: Markdown page example +--- + +# Markdown page example + +You don't need React to write simple standalone pages. |