From d15bb6e6b905a63392e596abca64147485836213 Mon Sep 17 00:00:00 2001 From: futantan Date: Wed, 6 Dec 2023 21:26:59 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=F0=9F=8E=B8=20dark=20mode=20logo?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 2 ++ components/counters.module.css | 6 ---- components/counters.tsx | 24 -------------- components/logo.tsx | 59 ++++++++++++++++++++++++++++++++++ pages/_app.js | 6 ++++ pages/styles.css | 11 +++++++ theme.config.tsx | 30 ++--------------- 7 files changed, 80 insertions(+), 58 deletions(-) delete mode 100644 components/counters.module.css delete mode 100644 components/counters.tsx create mode 100644 components/logo.tsx create mode 100644 pages/_app.js create mode 100644 pages/styles.css diff --git a/.gitignore b/.gitignore index f74c781..5ef3677 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,4 @@ .next node_modules + +.DS_Store diff --git a/components/counters.module.css b/components/counters.module.css deleted file mode 100644 index 4a5d0c8..0000000 --- a/components/counters.module.css +++ /dev/null @@ -1,6 +0,0 @@ -.counter { - border: 1px solid #ccc; - border-radius: 5px; - padding: 2px 6px; - margin: 12px 0 0; -} diff --git a/components/counters.tsx b/components/counters.tsx deleted file mode 100644 index b78f12d..0000000 --- a/components/counters.tsx +++ /dev/null @@ -1,24 +0,0 @@ -// Example from https://beta.reactjs.org/learn - -import { useState } from 'react' -import styles from './counters.module.css' - -function MyButton() { - const [count, setCount] = useState(0) - - function handleClick() { - setCount(count + 1) - } - - return ( -
- -
- ) -} - -export default function MyApp() { - return -} diff --git a/components/logo.tsx b/components/logo.tsx new file mode 100644 index 0000000..5e89202 --- /dev/null +++ b/components/logo.tsx @@ -0,0 +1,59 @@ +export const Logo = () => { + return ( +
+ + + + + + + + + + +
+ ); +}; diff --git a/pages/_app.js b/pages/_app.js new file mode 100644 index 0000000..0c0b5ea --- /dev/null +++ b/pages/_app.js @@ -0,0 +1,6 @@ +import './styles.css'; + +// This default export is required in a new `pages/_app.js` file. +export default function MyApp({ Component, pageProps }) { + return ; +} diff --git a/pages/styles.css b/pages/styles.css new file mode 100644 index 0000000..870409f --- /dev/null +++ b/pages/styles.css @@ -0,0 +1,11 @@ +.white-logo { + display: none; +} + +.dark .white-logo { + display: block; +} + +.dark .dark-logo { + display: none; +} diff --git a/theme.config.tsx b/theme.config.tsx index f6e9061..b31cead 100644 --- a/theme.config.tsx +++ b/theme.config.tsx @@ -1,34 +1,8 @@ import { DocsThemeConfig } from 'nextra-theme-docs'; +import { Logo } from './components/logo'; const config: DocsThemeConfig = { - logo: ( - - - - - - ), + logo: , project: { link: 'https://github.com/smarttokenlabs/tokenscript-doc', },