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
|
|
@ -535,6 +535,20 @@
|
|||
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 */
|
||||
.page-container-wide {
|
||||
width: 100%;
|
||||
|
|
@ -589,9 +603,6 @@
|
|||
============================================================ */
|
||||
@media (min-width: 1024px) {
|
||||
|
||||
/* Etwas breiterer Standard-Container auf großen Screens */
|
||||
.page-container { max-width: 860px; }
|
||||
|
||||
/* Admin: breit + Sidebar-Layout */
|
||||
#page-admin .page-container { max-width: 1200px; }
|
||||
|
||||
|
|
|
|||
|
|
@ -102,7 +102,7 @@
|
|||
|
||||
<!-- CSS: Reihenfolge ist wichtig — ?v= zwingt Browser zur Neuladung -->
|
||||
<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">
|
||||
</head>
|
||||
<body>
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
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 IS_STAGING = location.hostname === 'staging.banyaro.app';
|
||||
// Cache-Bust-Parameter nach Update-Reload sofort entfernen
|
||||
|
|
@ -256,6 +256,8 @@ const App = (() => {
|
|||
if (mod?.init) {
|
||||
await mod.init(container, state, params);
|
||||
page.module = mod;
|
||||
// Desktop: erste Inhalts-Div auf Standardbreite setzen
|
||||
_applyDesktopWidth(pageId, container);
|
||||
} else {
|
||||
// Platzhalter wenn Seite noch nicht gebaut
|
||||
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
|
||||
// ----------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
Offline-Cache + Push Notifications + Tile-Cache
|
||||
============================================================ */
|
||||
|
||||
const CACHE_VERSION = 'by-v1013';
|
||||
const CACHE_VERSION = 'by-v1014';
|
||||
const CACHE_STATIC = `${CACHE_VERSION}-static`;
|
||||
const CACHE_TILES = 'ban-yaro-tiles-v1'; // bleibt über SW-Updates erhalten
|
||||
const CACHE_API = 'ban-yaro-api-v1'; // API-Response-Cache
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue