From d0fb368b2e9f8de2464e7b15730b0fa02a1a0b02 Mon Sep 17 00:00:00 2001 From: man90 Date: Tue, 26 Dec 2023 19:33:55 +0100 Subject: [PATCH] Add improvements --- public/master.css | 48 +++++++--------------- src/App.vue | 9 ---- src/components/AddToCustomCard.vue | 2 +- src/components/FooterCard.vue | 25 ++++++------ src/components/HeaderCard.vue | 25 ++---------- src/components/LeaderboardLine.vue | 7 +--- src/core/generateLeaderboardItems.js | 28 +++++++++---- src/data/index.ts | 2 +- src/data/supportedServers.ts | 22 ++++++---- src/hooks/updateTheme.js | 17 -------- src/main.ts | 4 +- src/models/index.js | 9 ---- src/stores/index.ts | 1 + src/stores/main.js | 61 ---------------------------- src/stores/useMainStore.ts | 43 ++++++++++++++++++++ src/views/HomePage.vue | 5 ++- src/views/LeaderboardPage.vue | 2 +- 17 files changed, 116 insertions(+), 194 deletions(-) delete mode 100644 src/App.vue delete mode 100644 src/hooks/updateTheme.js delete mode 100644 src/models/index.js create mode 100644 src/stores/index.ts delete mode 100644 src/stores/main.js create mode 100644 src/stores/useMainStore.ts diff --git a/public/master.css b/public/master.css index fa09ac1..22cecdb 100644 --- a/public/master.css +++ b/public/master.css @@ -1,47 +1,27 @@ -body { - font-family: Avenir, Helvetica, Arial, sans-serif; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; - background-color: #111; - background-attachment: fixed; - margin: 0; - min-height: 100vh; -} - -body:not(.light-theme) { +:root { --colour-black: #24272d; - --colour-red: #dc6069; + --colour-blue: #57a5ed; --colour-green: #8dbb6e; --colour-orange: #e1b86f; - --colour-blue: #57a5ed; + --colour-red: #dc6069; + --button-text-colour: #f8f8f8; --card-colour: #37393f; --card-shadow-colour: #0005; - --text-colour: #f0f0f0; --input-shadow-colour: #0005; - --button-text-colour: #f8f8f8; - --load-remaining-colour: #111; --load-done-colour: #f0f0f0; - - --dark-theme-invert: invert(1); + --load-remaining-colour: #111; + --text-colour: #f0f0f0; } -body.light-theme { - --colour-black: #282c34; - --colour-red: #e06c75; - --colour-green: #98c379; - --colour-orange: #f1ac2c; - --colour-blue: #61afef; - - --card-colour: #f0f0f0; - --card-shadow-colour: #0005; - --text-colour: #282c34; - --input-shadow-colour: #0005; - --button-text-colour: #f8f8f8; - --load-remaining-colour: #ccc; - --load-done-colour: #8dbb6e; - - --dark-theme-invert: invert(0); +body { + font-family: Avenir, Helvetica, Arial, sans-serif; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + background-color: #111; + background-attachment: fixed; + margin: 0; + min-height: 100vh; } * { diff --git a/src/App.vue b/src/App.vue deleted file mode 100644 index 6b3082d..0000000 --- a/src/App.vue +++ /dev/null @@ -1,9 +0,0 @@ - - - diff --git a/src/components/AddToCustomCard.vue b/src/components/AddToCustomCard.vue index f168dd6..64a01c4 100644 --- a/src/components/AddToCustomCard.vue +++ b/src/components/AddToCustomCard.vue @@ -13,7 +13,7 @@ import { ContentCard } from "@/components" import { ref } from "vue" import { supportedServers } from "@/data" - import { useMainStore } from "@/stores/main" + import { useMainStore } from "@/stores" const familyName = ref("") const maxProfiles = 100 diff --git a/src/components/FooterCard.vue b/src/components/FooterCard.vue index b2277a7..fbb3aaa 100644 --- a/src/components/FooterCard.vue +++ b/src/components/FooterCard.vue @@ -1,12 +1,13 @@ - - diff --git a/src/components/HeaderCard.vue b/src/components/HeaderCard.vue index 34c7b83..13f1bd1 100644 --- a/src/components/HeaderCard.vue +++ b/src/components/HeaderCard.vue @@ -1,18 +1,13 @@ - diff --git a/src/views/LeaderboardPage.vue b/src/views/LeaderboardPage.vue index f4ef879..dae55df 100644 --- a/src/views/LeaderboardPage.vue +++ b/src/views/LeaderboardPage.vue @@ -34,7 +34,7 @@ import { computed } from "vue" import { siteName, supportedServers } from "@/data" import { useHead } from "@vueuse/head" - import { useMainStore } from "@/stores/main" + import { useMainStore } from "@/stores" import { useRoute } from "vue-router" import generateLeaderboardItems from "@/core/generateLeaderboardItems" import useGuild from "@/hooks/API"