feat(frontend): add dark/light theme toggle with system detection
- Add ThemeToggle component (Auto / Dark / Light) to all views - Store preference per browser and detect system preference live via prefers-color-scheme - Apply theme before first render in index.html to prevent flash - Extend CSS with light theme variables and refactor glass styles
This commit is contained in:
parent
cb30223fd4
commit
f220d96e3b
11 changed files with 217 additions and 26 deletions
|
|
@ -4,6 +4,7 @@ import { useRoute, useRouter } from 'vue-router'
|
|||
import { useAuth } from '../stores/auth'
|
||||
import { useToast } from '../stores/toast'
|
||||
import LogoMark from '../components/LogoMark.vue'
|
||||
import ThemeToggle from '../components/ThemeToggle.vue'
|
||||
import ShareLinkCard from '../components/ShareLinkCard.vue'
|
||||
import SectionConnections from '../components/SectionConnections.vue'
|
||||
import SectionRequests from '../components/SectionRequests.vue'
|
||||
|
|
@ -62,6 +63,7 @@ function logout() {
|
|||
</div>
|
||||
<div class="row">
|
||||
<span class="muted small hide-sm">{{ auth.user.email }}</span>
|
||||
<ThemeToggle />
|
||||
<button class="btn btn-sm" @click="logout">Abmelden</button>
|
||||
</div>
|
||||
</header>
|
||||
|
|
@ -142,7 +144,7 @@ function logout() {
|
|||
transition: transform 0.15s ease, border-color 0.15s ease;
|
||||
cursor: pointer;
|
||||
}
|
||||
.tile:hover { transform: translateY(-2px); border-color: rgba(255, 255, 255, 0.24); }
|
||||
.tile:hover { transform: translateY(-2px); border-color: var(--border-strong); }
|
||||
.tile-icon { font-size: 26px; }
|
||||
.privacy { padding: 20px 24px; }
|
||||
@media (max-width: 520px) { .hide-sm { display: none; } }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue