Desktop: Einheitliche Seitenbreite 860px via pc-desktop Klasse
- app.js: _applyDesktopWidth() setzt nach Page-Init die Klasse pc-desktop
auf dem ersten Kind-Div aller Standard-Seiten (excl. admin/map/chat/etc.)
- layout.css: .pc-desktop { max-width:860px !important; margin:0 auto }
- layout.css: .page-container ab 768px auf 860px (statt erst 1024px)
- main.py: /force-update Text "Service Worker wird entfernt" →
"Wir besorgen neue Leckerlis 🦴"
- layout.css ?v=1013, components.css ?v=1010, SW by-v1014, APP_VER 1014
This commit is contained in:
parent
9816075c7e
commit
ed9dd08c14
5 changed files with 39 additions and 9 deletions
|
|
@ -410,7 +410,7 @@ async def serve_media(path: str, request: _Request):
|
||||||
raise _HE(404, "Nicht gefunden.")
|
raise _HE(404, "Nicht gefunden.")
|
||||||
return _media_response(filepath)
|
return _media_response(filepath)
|
||||||
|
|
||||||
APP_VER = "1013" # muss mit APP_VER in app.js übereinstimmen
|
APP_VER = "1014" # muss mit APP_VER in app.js übereinstimmen
|
||||||
|
|
||||||
@app.get("/.well-known/assetlinks.json")
|
@app.get("/.well-known/assetlinks.json")
|
||||||
async def assetlinks():
|
async def assetlinks():
|
||||||
|
|
@ -1724,8 +1724,8 @@ async def force_update():
|
||||||
height:100vh;margin:0;background:#0f1623;color:#fff;flex-direction:column;gap:16px}
|
height:100vh;margin:0;background:#0f1623;color:#fff;flex-direction:column;gap:16px}
|
||||||
p{color:#94a3b8;font-size:14px}</style></head>
|
p{color:#94a3b8;font-size:14px}</style></head>
|
||||||
<body>
|
<body>
|
||||||
<div>⏳ Aktualisiere Ban Yaro…</div>
|
<div>⏳ Einen Moment…</div>
|
||||||
<p id="s">Service Worker wird entfernt…</p>
|
<p id="s">Wir besorgen neue Leckerlis 🦴</p>
|
||||||
<script>
|
<script>
|
||||||
// Zweiten Reload durch SW-updatefound verhindern
|
// Zweiten Reload durch SW-updatefound verhindern
|
||||||
sessionStorage.setItem('by_skip_sw_reload','1');
|
sessionStorage.setItem('by_skip_sw_reload','1');
|
||||||
|
|
|
||||||
|
|
@ -535,6 +535,20 @@
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Desktop: Standard-Container auf 860px erweitern (768px–1023px) */
|
||||||
|
@media (min-width: 768px) {
|
||||||
|
.page-container { max-width: 860px; }
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Desktop-Breite: von app.js nach Page-Init gesetzt */
|
||||||
|
@media (min-width: 768px) {
|
||||||
|
.pc-desktop {
|
||||||
|
max-width: 860px !important;
|
||||||
|
margin-left: auto !important;
|
||||||
|
margin-right: auto !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* Wide-Layout für Karte und ähnliches */
|
/* Wide-Layout für Karte und ähnliches */
|
||||||
.page-container-wide {
|
.page-container-wide {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|
@ -589,9 +603,6 @@
|
||||||
============================================================ */
|
============================================================ */
|
||||||
@media (min-width: 1024px) {
|
@media (min-width: 1024px) {
|
||||||
|
|
||||||
/* Etwas breiterer Standard-Container auf großen Screens */
|
|
||||||
.page-container { max-width: 860px; }
|
|
||||||
|
|
||||||
/* Admin: breit + Sidebar-Layout */
|
/* Admin: breit + Sidebar-Layout */
|
||||||
#page-admin .page-container { max-width: 1200px; }
|
#page-admin .page-container { max-width: 1200px; }
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -102,7 +102,7 @@
|
||||||
|
|
||||||
<!-- CSS: Reihenfolge ist wichtig — ?v= zwingt Browser zur Neuladung -->
|
<!-- CSS: Reihenfolge ist wichtig — ?v= zwingt Browser zur Neuladung -->
|
||||||
<link rel="stylesheet" href="/css/design-system.css?v=907">
|
<link rel="stylesheet" href="/css/design-system.css?v=907">
|
||||||
<link rel="stylesheet" href="/css/layout.css?v=973">
|
<link rel="stylesheet" href="/css/layout.css?v=1013">
|
||||||
<link rel="stylesheet" href="/css/components.css?v=1010">
|
<link rel="stylesheet" href="/css/components.css?v=1010">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
Router, State-Management, Navigation, Initialisierung.
|
Router, State-Management, Navigation, Initialisierung.
|
||||||
============================================================ */
|
============================================================ */
|
||||||
|
|
||||||
const APP_VER = '1013'; // ← bei jedem Deploy mit Frontend-Änderungen erhöhen
|
const APP_VER = '1014'; // ← bei jedem Deploy mit Frontend-Änderungen erhöhen
|
||||||
const APP_VERSION = '1.6.0'; // ← semantische Version, wird bei make release gesetzt
|
const APP_VERSION = '1.6.0'; // ← semantische Version, wird bei make release gesetzt
|
||||||
const IS_STAGING = location.hostname === 'staging.banyaro.app';
|
const IS_STAGING = location.hostname === 'staging.banyaro.app';
|
||||||
// Cache-Bust-Parameter nach Update-Reload sofort entfernen
|
// Cache-Bust-Parameter nach Update-Reload sofort entfernen
|
||||||
|
|
@ -256,6 +256,8 @@ const App = (() => {
|
||||||
if (mod?.init) {
|
if (mod?.init) {
|
||||||
await mod.init(container, state, params);
|
await mod.init(container, state, params);
|
||||||
page.module = mod;
|
page.module = mod;
|
||||||
|
// Desktop: erste Inhalts-Div auf Standardbreite setzen
|
||||||
|
_applyDesktopWidth(pageId, container);
|
||||||
} else {
|
} else {
|
||||||
// Platzhalter wenn Seite noch nicht gebaut
|
// Platzhalter wenn Seite noch nicht gebaut
|
||||||
container.innerHTML = UI.emptyState({
|
container.innerHTML = UI.emptyState({
|
||||||
|
|
@ -280,6 +282,23 @@ const App = (() => {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ----------------------------------------------------------
|
||||||
|
// DESKTOP WIDTH — einheitliche Breite auf großen Screens
|
||||||
|
// ----------------------------------------------------------
|
||||||
|
const _FULLSCREEN_PAGES = new Set([
|
||||||
|
'admin','map','chat','forum','wiki','ernaehrung','movies','wurfboerse',
|
||||||
|
'routes','walks','litters','zucht-profil','widget',
|
||||||
|
]);
|
||||||
|
function _applyDesktopWidth(pageId, container) {
|
||||||
|
if (window.innerWidth < 768) return;
|
||||||
|
if (_FULLSCREEN_PAGES.has(pageId)) return;
|
||||||
|
const first = container.querySelector(':scope > div');
|
||||||
|
if (first && !first.classList.contains('page-container') &&
|
||||||
|
!first.classList.contains('pc-desktop')) {
|
||||||
|
first.classList.add('pc-desktop');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// ----------------------------------------------------------
|
// ----------------------------------------------------------
|
||||||
// LOGIN GATE — wird statt Seiteninhalt angezeigt
|
// LOGIN GATE — wird statt Seiteninhalt angezeigt
|
||||||
// ----------------------------------------------------------
|
// ----------------------------------------------------------
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
Offline-Cache + Push Notifications + Tile-Cache
|
Offline-Cache + Push Notifications + Tile-Cache
|
||||||
============================================================ */
|
============================================================ */
|
||||||
|
|
||||||
const CACHE_VERSION = 'by-v1013';
|
const CACHE_VERSION = 'by-v1014';
|
||||||
const CACHE_STATIC = `${CACHE_VERSION}-static`;
|
const CACHE_STATIC = `${CACHE_VERSION}-static`;
|
||||||
const CACHE_TILES = 'ban-yaro-tiles-v1'; // bleibt über SW-Updates erhalten
|
const CACHE_TILES = 'ban-yaro-tiles-v1'; // bleibt über SW-Updates erhalten
|
||||||
const CACHE_API = 'ban-yaro-api-v1'; // API-Response-Cache
|
const CACHE_API = 'ban-yaro-api-v1'; // API-Response-Cache
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue