diff --git a/frontend/src/components/LegalPage.vue b/frontend/src/components/LegalPage.vue new file mode 100644 index 0000000..090a51d --- /dev/null +++ b/frontend/src/components/LegalPage.vue @@ -0,0 +1,232 @@ + + + + + diff --git a/frontend/src/composables/useLandingTheme.ts b/frontend/src/composables/useLandingTheme.ts new file mode 100644 index 0000000..3922764 --- /dev/null +++ b/frontend/src/composables/useLandingTheme.ts @@ -0,0 +1,43 @@ +import { ref, computed } from 'vue' + +/** + * Theme selector for the public pages (landing + legal/contact). + * Same 8 themes and cycle order as the ROA app / autopass landing. + * Persisted under its own key so it doesn't clash with the in-app theme. + */ +const THEMES: [string, string][] = [ + ['light', 'Light'], + ['dark', 'Dark'], + ['petrol', 'Petrol'], + ['grafit', 'Grafit'], + ['cobalt', 'Cobalt'], + ['cupru', 'Cupru'], + ['hartie', 'Hârtie'], + ['auto', 'Auto'] +] +const THEME_KEY = 'roa-landing-theme' +const VALID = new Set(THEMES.map((t) => t[0])) + +function resolve(id: string): string { + if (id === 'auto') { + return window.matchMedia('(prefers-color-scheme: light)').matches ? 'light' : 'dark' + } + return id +} + +// Module-level singleton so every public page shares the same selection. +const stored = localStorage.getItem(THEME_KEY) +const themeId = ref(stored && VALID.has(stored) ? stored : 'grafit') + +export function useLandingTheme() { + const theme = computed(() => resolve(themeId.value)) + const themeLabel = computed(() => THEMES.find((t) => t[0] === themeId.value)?.[1] ?? 'Grafit') + + function cycleTheme() { + const idx = THEMES.findIndex((t) => t[0] === themeId.value) + themeId.value = THEMES[(idx + 1) % THEMES.length][0] + localStorage.setItem(THEME_KEY, themeId.value) + } + + return { themeId, theme, themeLabel, cycleTheme } +} diff --git a/frontend/src/router/index.ts b/frontend/src/router/index.ts index 1b3f188..bd83962 100644 --- a/frontend/src/router/index.ts +++ b/frontend/src/router/index.ts @@ -12,6 +12,24 @@ const router = createRouter({ component: () => import('@/views/Landing.vue'), meta: { requiresAuth: false, fullBleed: true } }, + { + path: '/termeni', + name: 'Termeni', + component: () => import('@/views/Termeni.vue'), + meta: { requiresAuth: false, fullBleed: true } + }, + { + path: '/confidentialitate', + name: 'Confidentialitate', + component: () => import('@/views/Confidentialitate.vue'), + meta: { requiresAuth: false, fullBleed: true } + }, + { + path: '/contact', + name: 'Contact', + component: () => import('@/views/Contact.vue'), + meta: { requiresAuth: false, fullBleed: true } + }, { path: '/login', name: 'Login', diff --git a/frontend/src/views/Confidentialitate.vue b/frontend/src/views/Confidentialitate.vue new file mode 100644 index 0000000..d95d1bd --- /dev/null +++ b/frontend/src/views/Confidentialitate.vue @@ -0,0 +1,76 @@ + + + diff --git a/frontend/src/views/Contact.vue b/frontend/src/views/Contact.vue new file mode 100644 index 0000000..6fef3f9 --- /dev/null +++ b/frontend/src/views/Contact.vue @@ -0,0 +1,30 @@ + + + diff --git a/frontend/src/views/Landing.vue b/frontend/src/views/Landing.vue index bd2e680..3467f26 100644 --- a/frontend/src/views/Landing.vue +++ b/frontend/src/views/Landing.vue @@ -172,9 +172,9 @@ @@ -185,40 +185,11 @@