From 18279e9a827a05aceb63f33f63e50ec5a50d0729 Mon Sep 17 00:00:00 2001 From: OCDkirby Date: Fri, 14 Jul 2023 23:49:41 -0500 Subject: [PATCH] Fix theming --- .gitignore | 4 + src/App.vue | 203 ++++++++++++++++----------------- src/assets/text-styles.css | 21 +--- src/components/ContentCard.vue | 8 +- src/components/Hook.vue | 38 +++--- src/components/MainCard.vue | 9 +- src/components/TopBarMenu.vue | 177 +++++++++++++--------------- vite.config.js | 13 ++- 8 files changed, 226 insertions(+), 247 deletions(-) diff --git a/.gitignore b/.gitignore index 38adffa..5f3fc85 100644 --- a/.gitignore +++ b/.gitignore @@ -26,3 +26,7 @@ coverage *.njsproj *.sln *.sw? + +# Typescript generated +auto-imports.d.ts +components.d.ts diff --git a/src/App.vue b/src/App.vue index c8ae4fb..5541c6b 100644 --- a/src/App.vue +++ b/src/App.vue @@ -1,54 +1,101 @@
Use only with lawfully obtained archival copies of PS4 games you physically own.
diff --git a/src/components/TopBarMenu.vue b/src/components/TopBarMenu.vue index 1522514..2e59eb9 100644 --- a/src/components/TopBarMenu.vue +++ b/src/components/TopBarMenu.vue @@ -1,43 +1,88 @@ @@ -49,76 +94,14 @@ import { NIcon } from 'naive-ui' text-align: center; margin: 8px; } - -.dark-mode-button { - padding-left: 5px; -} - - + \ No newline at end of file diff --git a/vite.config.js b/vite.config.js index 7f8db1c..68d96cc 100644 --- a/vite.config.js +++ b/vite.config.js @@ -6,6 +6,8 @@ * Important notes: * The project automatically imports *most* vue and naive-ui code as you go, which saves significant space in your script blocks. Just make sure to export your components. * However, the icon library does not have an auto-importer, so your script blocks will need to import those. + * Theming is not done with CSS, but overrides. See App.vue for examples. They're very similar to CSS, but check the docs. + * Also look into the NThemeEditor component, makes theming much easier. */ import { fileURLToPath, URL } from 'node:url' @@ -26,10 +28,13 @@ export default defineConfig({ 'vue', { 'naive-ui': [ - 'useDialog', - 'useMessage', - 'useNotification', - 'useLoadingBar' + 'NIcon', + 'NConfigProvider', + 'NCard', + 'NText', + 'NH1', + 'NH2', + 'NH3' ] } ]