From 0baf7c3d785db872cdef1eec1c423163a5c107c8 Mon Sep 17 00:00:00 2001 From: hajola Date: Fri, 14 Jun 2024 18:31:25 +0300 Subject: [PATCH] Added wave patterns, adjusted primary color, minor UI tweaks --- site/docusaurus.config.ts | 1 - site/src/css/custom.css | 11 ++++++++++- site/src/pages/index.module.css | 2 +- site/src/pages/index.tsx | 18 ++++++++++++++++++ site/src/theme/Footer/index.tsx | 22 ++++++++++++++++++++++ site/static/img/hero-border-bottom.svg | 1 + site/static/img/hero-border-top.svg | 1 + site/static/img/prefooter.svg | 1 + 8 files changed, 54 insertions(+), 3 deletions(-) create mode 100644 site/src/theme/Footer/index.tsx create mode 100644 site/static/img/hero-border-bottom.svg create mode 100644 site/static/img/hero-border-top.svg create mode 100644 site/static/img/prefooter.svg diff --git a/site/docusaurus.config.ts b/site/docusaurus.config.ts index 90e3abb..d869c74 100644 --- a/site/docusaurus.config.ts +++ b/site/docusaurus.config.ts @@ -75,7 +75,6 @@ const config: Config = { ], }, footer: { - style: 'dark', links: [ { title: 'Docs', diff --git a/site/src/css/custom.css b/site/src/css/custom.css index 2bc6a4c..dace290 100644 --- a/site/src/css/custom.css +++ b/site/src/css/custom.css @@ -6,7 +6,9 @@ /* You can override the default Infima variables here. */ :root { - --ifm-color-primary: #2e8555; + --ifm-background-color: #f1f6f8; + + --ifm-color-primary: #3c647c; --ifm-color-primary-dark: #29784c; --ifm-color-primary-darker: #277148; --ifm-color-primary-darkest: #205d3b; @@ -15,6 +17,13 @@ --ifm-color-primary-lightest: #3cad6e; --ifm-code-font-size: 95%; --docusaurus-highlighted-code-line-bg: rgba(0, 0, 0, 0.1); + + --ifm-footer-background-color: #3c647c; + --ifm-footer-title-color: #fff; + --ifm-footer-link-color: #ffffffaa; + --ifm-footer-color: #ffffffaa; + + --ifm-footer-link-hover-color: #ffffffdd; } /* For readability concerns, you should choose a lighter palette in dark mode. */ diff --git a/site/src/pages/index.module.css b/site/src/pages/index.module.css index 14337c2..d101b4a 100644 --- a/site/src/pages/index.module.css +++ b/site/src/pages/index.module.css @@ -4,7 +4,7 @@ */ .heroBanner { - background: #4391B2; + background: var(--ifm-color-primary); padding: 4rem 0; text-align: center; position: relative; diff --git a/site/src/pages/index.tsx b/site/src/pages/index.tsx index b9509fc..8b01917 100644 --- a/site/src/pages/index.tsx +++ b/site/src/pages/index.tsx @@ -4,12 +4,26 @@ import useDocusaurusContext from '@docusaurus/useDocusaurusContext'; import Layout from '@theme/Layout'; import HomepageFeatures from '@site/src/components/HomepageFeatures'; import Heading from '@theme/Heading'; +import { useColorMode } from '@docusaurus/theme-common'; + import styles from './index.module.css'; +import HeaderBorderTop from '@site/static/img/hero-border-top.svg'; +import HeaderBorderBottom from '@site/static/img/hero-border-bottom.svg'; + +import HeaderBorderTopDark from '@site/static/img/hero-border-top.svg'; +import HeaderBorderBottomDark from '@site/static/img/hero-border-bottom.svg'; + function HomepageHeader() { const { siteConfig } = useDocusaurusContext(); + const { isDarkTheme } = useColorMode(); + return ( + <> +
+ {isDarkTheme ? : } +
@@ -25,6 +39,10 @@ function HomepageHeader() {
+
+ {isDarkTheme ? : } +
+ ); } diff --git a/site/src/theme/Footer/index.tsx b/site/src/theme/Footer/index.tsx new file mode 100644 index 0000000..f202374 --- /dev/null +++ b/site/src/theme/Footer/index.tsx @@ -0,0 +1,22 @@ +import React from 'react'; +import Footer from '@theme-original/Footer'; +import type FooterType from '@theme/Footer'; +import type {WrapperProps} from '@docusaurus/types'; +import { useColorMode } from '@docusaurus/theme-common'; + +import Prefooter from '@site/static/img/prefooter.svg'; +import PrefooterDark from '@site/static/img/prefooter.svg'; + +type Props = WrapperProps; + +export default function FooterWrapper(props: Props): JSX.Element { + const { isDarkTheme } = useColorMode(); + return ( + <> +
+ {isDarkTheme ? : } +
+