From c558da5bebfebf239dde867f36cc35d56849accf Mon Sep 17 00:00:00 2001 From: Ellie Huxtable Date: Sat, 25 Feb 2023 23:29:59 +0000 Subject: Add fancy web docs (#725) * Add initial site * WIP again * Replace docs with web docs * Bring back translations * Update README.md * remove images --- docs/src/components/HomepageFeatures/index.js | 71 ++++++++++++++++++++++ .../components/HomepageFeatures/styles.module.css | 17 ++++++ docs/src/css/custom.css | 35 +++++++++++ docs/src/pages/index.js | 48 +++++++++++++++ docs/src/pages/index.module.css | 50 +++++++++++++++ docs/src/pages/markdown-page.md | 7 +++ 6 files changed, 228 insertions(+) create mode 100644 docs/src/components/HomepageFeatures/index.js create mode 100644 docs/src/components/HomepageFeatures/styles.module.css create mode 100644 docs/src/css/custom.css create mode 100644 docs/src/pages/index.js create mode 100644 docs/src/pages/index.module.css create mode 100644 docs/src/pages/markdown-page.md (limited to 'docs/src') diff --git a/docs/src/components/HomepageFeatures/index.js b/docs/src/components/HomepageFeatures/index.js new file mode 100644 index 00000000..c242c798 --- /dev/null +++ b/docs/src/components/HomepageFeatures/index.js @@ -0,0 +1,71 @@ +import React from 'react'; +import clsx from 'clsx'; +import styles from './styles.module.css'; + +const FeatureList = [ + { + title: 'History sync', + Svg: require('@site/static/img/undraw_docusaurus_mountain.svg').default, + description: ( + <> + + + ), + }, + { + title: 'Find it fast', + Svg: require('@site/static/img/undraw_docusaurus_tree.svg').default, + description: ( + <> + + + ), + }, + { + title: 'All the data', + Svg: require('@site/static/img/undraw_docusaurus_react.svg').default, + description: ( + <> + + + ), + }, +]; + +function Feature({ Svg, title, description }) { + return ( +
+
+

{title}

+

{description}

+
+
+ ); +} + +export default function HomepageFeatures() { + return ( +
+
+
+ {FeatureList.map((props, idx) => ( + + ))} +
+
+
+ ); +} diff --git a/docs/src/components/HomepageFeatures/styles.module.css b/docs/src/components/HomepageFeatures/styles.module.css new file mode 100644 index 00000000..7527f330 --- /dev/null +++ b/docs/src/components/HomepageFeatures/styles.module.css @@ -0,0 +1,17 @@ +.features { + display: flex; + align-items: center; + padding: 2rem 0; + width: 100%; +} + +.featureSvg { + height: 200px; + width: 200px; +} + +.whatisfeature { + background-color: var(--ifm-hero-background-color); + padding: 2rem; +} + diff --git a/docs/src/css/custom.css b/docs/src/css/custom.css new file mode 100644 index 00000000..d7c8f98e --- /dev/null +++ b/docs/src/css/custom.css @@ -0,0 +1,35 @@ +/** + * 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. + */ + +@tailwind base; +@tailwind components; +@tailwind utilities; + +/* 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/docs/src/pages/index.js b/docs/src/pages/index.js new file mode 100644 index 00000000..08500787 --- /dev/null +++ b/docs/src/pages/index.js @@ -0,0 +1,48 @@ +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 ( +
+ + +
+

Making your shell magical

+

Sync, search and backup shell history with Atuin

+
+ + Get Started + +
+
+
+ ); +} + +export default function Home() { + const { siteConfig } = useDocusaurusContext(); + return ( + + +
+
+
+

What is Atuin?

+ + +
+
+
+
+ ); +} diff --git a/docs/src/pages/index.module.css b/docs/src/pages/index.module.css new file mode 100644 index 00000000..fc7eb14e --- /dev/null +++ b/docs/src/pages/index.module.css @@ -0,0 +1,50 @@ +/** + * 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; +} + +.heroBanner h1 { + font-size: 3rem; +} + +@media screen and (max-width: 996px) { + .heroBanner { + padding: 2rem; + } +} + +.buttons { + display: flex; + align-items: center; + justify-content: center; +} + +.magical{ + background-image: linear-gradient(90deg, rgb(79, 30, 218) 0%,rgb(104, 100, 218) 33%,rgb(35, 219, 162) 100%); + background-clip: text; + + -webkit-background-clip: text; + -moz-background-clip: text; + -webkit-text-fill-color: transparent; + -moz-text-fill-color: transparent; +} + +.whatis { + padding: 4rem; + +} + +.whatis h1 { + font-size: 2em; +} + +.whatisfeature { + background-color: var(--ifm-hero-background-color); +} diff --git a/docs/src/pages/markdown-page.md b/docs/src/pages/markdown-page.md new file mode 100644 index 00000000..9756c5b6 --- /dev/null +++ b/docs/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. -- cgit v1.3.1