a302ac09b4
CI / test (push) Has been cancelled
Lets users opt into the new atmospheric design without affecting users on v1.
Adds a beta-flag toggle in Settings → Design. Server-side preference persists
across devices; a cookie mirrors it so unauthenticated Twig pages do correct
first-paint without an extra DB roundtrip.
Backend:
- User.designVersion column (nullable VARCHAR(10); null defaults to 'v1')
- Migration Version20260515120000
- PATCH /api/user/design endpoint accepting 'v1'|'v2', sets wevisto_design cookie
- SpaController injects data-design on <html> + refreshes the cookie on every
SPA load (keeps cross-device pref in sync)
- Twig templates (base, login, register, help, setup, token-*) read the
cookie via {{ app.request.cookies.get('wevisto_design')|default('v1') }}
so login/setup pages also respect the user's design choice
Frontend:
- design-v2.scss — opt-in overlay scoped under [data-design="v2"]. Overrides
--color-* tokens to dusk variants per theme (warm-craft → amber, ocean-dusk
stays, etc.), adds harbor photo backdrop via body::before with theme tint
via body::after. Glass-card blur on existing surfaces. v1 untouched.
- harbor.jpg shipped as a public asset (270KB, single-fetch, cached)
- User type gains designVersion ('v1' | 'v2')
- SettingsView toggle (Original / Atmospheric) calls the API, updates the
data-design attribute optimistically, reverts on failure
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
27 lines
1.1 KiB
Twig
27 lines
1.1 KiB
Twig
<!DOCTYPE html>
|
|
<html data-design="{{ app.request.cookies.get('wevisto_design')|default('v1') }}">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<title>{% block title %}Welcome!{% endblock %}</title>
|
|
<link rel="icon" type="image/svg+xml" href="/build/favicon.svg">
|
|
<link rel="icon" type="image/png" sizes="32x32" href="/build/icons/favicon-32.png">
|
|
<link rel="icon" type="image/png" sizes="16x16" href="/build/icons/favicon-16.png">
|
|
<link rel="apple-touch-icon" sizes="180x180" href="/build/icons/apple-touch-icon.png">
|
|
{% block stylesheets %}
|
|
{% endblock %}
|
|
|
|
{% block javascripts %}
|
|
{% endblock %}
|
|
|
|
{% set frankenphpHotReload = app.request.server.get('FRANKENPHP_HOT_RELOAD') %}
|
|
{% if frankenphpHotReload %}
|
|
<meta name="frankenphp-hot-reload:url" content="{{ frankenphpHotReload }}">
|
|
<script src="https://cdn.jsdelivr.net/npm/idiomorph"></script>
|
|
<script src="https://cdn.jsdelivr.net/npm/frankenphp-hot-reload/+esm" type="module"></script>
|
|
{% endif %}
|
|
</head>
|
|
<body>
|
|
{% block body %}{% endblock %}
|
|
</body>
|
|
</html>
|