From 6b421d56edcfc4c58d8cce8bc03f75a4942da9d1 Mon Sep 17 00:00:00 2001 From: Zheyuan Wu <60459821+Trance-0@users.noreply.github.com> Date: Mon, 18 Nov 2024 21:52:40 -0600 Subject: [PATCH] Add dark mode and try to edit meta but failed. --- pages/Math429/_meta.js | 2 +- pages/_meta.js | 17 ++++++++--------- theme.config.jsx | 26 +++++++++++++++++++++++++- 3 files changed, 34 insertions(+), 11 deletions(-) diff --git a/pages/Math429/_meta.js b/pages/Math429/_meta.js index cc9e3d7..ebe89c4 100644 --- a/pages/Math429/_meta.js +++ b/pages/Math429/_meta.js @@ -1,6 +1,6 @@ export default { index: { - display: "hidden" + display: 'hidden' }, Math429_L1: "Lecture 1", Math429_L2: "Lecture 2", diff --git a/pages/_meta.js b/pages/_meta.js index 5f7d63f..a48c129 100644 --- a/pages/_meta.js +++ b/pages/_meta.js @@ -15,23 +15,22 @@ export default { title: 'Contact Me', href: '/contact' } + }, + theme:{ + sidebar: false, } }, - Math429: { - title: 'Math 429', - type: 'page' + Math429:{ + type: 'page', }, Math4111: { - title: 'Math 4111', - type: 'page' + type: 'page', }, CSE442T: { - title: 'CSE 442T', - type: 'page' + type: 'page', }, CSE347: { - title: 'CSE347', - type: 'page' + type: 'page', }, about: { display: 'hidden' diff --git a/theme.config.jsx b/theme.config.jsx index 83ef7b9..3251d3a 100644 --- a/theme.config.jsx +++ b/theme.config.jsx @@ -2,6 +2,20 @@ import { useRouter } from 'next/router' import { useConfig } from 'nextra-theme-docs' export default { + color: { + hue: { + dark: 336, + light: 164 + }, + saturation: { + dark: 72, + light: 49 + }, + lightness: { + dark: 59, + light: 35 + } + }, footer: { content: ( @@ -34,7 +48,7 @@ export default { logo: ( <> - + @@ -51,5 +65,15 @@ export default { name: 'Source' } ], + darkMode: true, + themeSwitch: { + useOptions() { + return { + light: 'Light', + dark: 'Dark', + system: 'System' + } + } + }, docsRepositoryBase: 'https://github.com/Trance-0/NoteNextra/tree/main' } \ No newline at end of file