diff --git a/frontend/src/App.vue b/frontend/src/App.vue index ce658910..6e1511c1 100644 --- a/frontend/src/App.vue +++ b/frontend/src/App.vue @@ -19,6 +19,8 @@ import NavBar from "@/components/navigation/NavBar.vue"; import { computed, onBeforeMount, ref } from "vue"; import { useI18n } from "vue-i18n"; import { useLocale } from "@/stores/locale-store"; +import { useThemeStore } from "@/stores/theme-store"; +import { useTheme } from "vuetify"; const navBar = ref | null>(null); @@ -28,6 +30,15 @@ const hideHeader = computed(() => currentRoute.meta.hideHeader); onBeforeMount(() => { const { locale } = useI18n(); const { selectedLocale } = useLocale(); + const { storedTheme } = useThemeStore(); + const theme = useTheme(); locale.value = selectedLocale; + theme.global.name.value = storedTheme; }); + + diff --git a/frontend/src/assets/base.scss b/frontend/src/assets/base.scss index deace0a4..c6059b62 100644 --- a/frontend/src/assets/base.scss +++ b/frontend/src/assets/base.scss @@ -5,7 +5,7 @@ --color-primary-dark: color-mod(var(--color-primary) shade(15%)); --color-primary-bg: color-mod(var(--color-primary) alpha(30)); - --color-secondary: #dfe5f7; + --color-secondary: #ebeffb; --color-accent: #ffd200; --color-accent-light: color-mod(var(--color-accent) tint(15%)); diff --git a/frontend/src/assets/ghent-university-logo-white.png b/frontend/src/assets/ghent-university-logo-white.png new file mode 100644 index 00000000..56e2f20f Binary files /dev/null and b/frontend/src/assets/ghent-university-logo-white.png differ diff --git a/frontend/src/components/ApolloHeader.vue b/frontend/src/components/ApolloHeader.vue index 35ea45d3..3882ce78 100644 --- a/frontend/src/components/ApolloHeader.vue +++ b/frontend/src/components/ApolloHeader.vue @@ -1,5 +1,5 @@ @@ -17,8 +18,9 @@ + + diff --git a/frontend/src/i18n/locales/en.ts b/frontend/src/i18n/locales/en.ts index 255d0402..5c21f850 100644 --- a/frontend/src/i18n/locales/en.ts +++ b/frontend/src/i18n/locales/en.ts @@ -7,6 +7,8 @@ export default { loading_page: "Loading...", }, }, + logo: "ghent-university-logo-white.png", + logout: "logout", login: { about: "The official submission application of Ghent University", login: "Login", diff --git a/frontend/src/i18n/locales/nl.ts b/frontend/src/i18n/locales/nl.ts index 3ea22ba4..2a009b7b 100644 --- a/frontend/src/i18n/locales/nl.ts +++ b/frontend/src/i18n/locales/nl.ts @@ -7,6 +7,8 @@ export default { loading_page: "Aan het laden...", }, }, + logo: "universiteit-gent-logo-white.png", + logout: "uitloggen", login: { about: "De officiƫle indienapplicatie van de Universiteit Gent", login: "Inloggen", diff --git a/frontend/src/plugins/vuetify.ts b/frontend/src/plugins/vuetify.ts index d0ffe19e..89c457a3 100644 --- a/frontend/src/plugins/vuetify.ts +++ b/frontend/src/plugins/vuetify.ts @@ -26,7 +26,13 @@ const vuetify = createVuetify({ dark: false, colors: { background: "#ffffff", - surface: "#1d357e", + surface: "#ffffff", + text: "#0E2057", + textsecondary: "#868fab", + primary: "#1d357e", + secondary: "#DFE5F7", + tertiary: "#E9EDFA", + navtext: "#DFE5F7", // TODO: Add rest of colors }, }, @@ -34,7 +40,13 @@ const vuetify = createVuetify({ dark: true, colors: { background: "#222222", - surface: "#1d357e", + surface: "#222222", + text: "#DFE5F7", + textsecondary: "#b2b2b2", + primary: "#233161", + secondary: "#595D6C", + tertiary: "#353740", + navtext: "#DFE5F7", // TODO: Add rest of colors }, }, diff --git a/frontend/src/stores/theme-store.ts b/frontend/src/stores/theme-store.ts new file mode 100644 index 00000000..46eab399 --- /dev/null +++ b/frontend/src/stores/theme-store.ts @@ -0,0 +1,16 @@ +import { defineStore } from "pinia"; +import { ref } from "vue"; + +export const useThemeStore = defineStore("theme", () => { + const storedTheme = ref(localStorage.getItem("theme")); + + function setTheme(newTheme?: string | null) { + if (!newTheme) { + return; + } + storedTheme.value = newTheme; + localStorage.setItem("theme", newTheme); + } + + return { storedTheme, setTheme }; +}); diff --git a/frontend/src/views/HomeScreenView.vue b/frontend/src/views/HomeScreenView.vue index 52b52142..65dfc796 100644 --- a/frontend/src/views/HomeScreenView.vue +++ b/frontend/src/views/HomeScreenView.vue @@ -1,39 +1,38 @@