From 15388e5806605b2085206bb6f23e4e13be9b2c60 Mon Sep 17 00:00:00 2001
From: Scarriffle
Date: Thu, 7 May 2026 19:31:17 +0200
Subject: [PATCH] =?UTF-8?q?feat(mobile):=20Heute-Button=20im=20Topbar=20+?=
=?UTF-8?q?=20runder=20FAB=20f=C3=BCr=20Termin-Erstellen?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
- "Heute"-Button auf Mobile wieder im Topbar-Center sichtbar
(kompakter mit weniger Padding) statt nur im View-Popup.
- Neuer runder Floating-Action-Button unten rechts auf Mobile mit
Plus-Icon, öffnet das "Termin erstellen"-Modal — Google-Calendar-
artige Bedienung.
- Der "Erstellen"-Button in der Sidebar wird auf Mobile ausgeblendet,
weil der FAB ihn ersetzt. Auf Desktop bleibt alles wie bisher.
- iOS-Safe-Area unten respektiert (Home-Indicator).
Version v7 → v8.
---
frontend/css/app.css | 32 ++++++++++++++++++++++++++++++--
frontend/index.html | 27 ++++++++++++++++-----------
frontend/js/calendar.js | 2 ++
frontend/js/version.js | 2 +-
frontend/sw.js | 2 +-
5 files changed, 50 insertions(+), 15 deletions(-)
diff --git a/frontend/css/app.css b/frontend/css/app.css
index 6eefc88..547de3b 100644
--- a/frontend/css/app.css
+++ b/frontend/css/app.css
@@ -1223,6 +1223,7 @@ a { color: var(--primary); text-decoration: none; }
.settings-nav-toggle { display: none; }
.settings-nav-backdrop { display: none; }
.dropdown-item-mobile-only { display: none; }
+.create-fab { display: none; }
@media (max-width: 768px) {
html, body { overflow-x: hidden; max-width: 100vw; }
@@ -1418,8 +1419,35 @@ a { color: var(--primary); text-decoration: none; }
.view-mobile-wrapper { display: inline-block; }
.dropdown-item-mobile-only { display: flex; }
- /* Hide "Heute" button on desktop topbar (it's in the view popup now) */
- .topbar #btn-today { display: none; }
+ /* Heute-Button bleibt im Topbar-Center, kompakter Stil für Mobile */
+ .topbar #btn-today {
+ padding: 6px 10px;
+ font-size: 13px;
+ min-height: 36px;
+ flex-shrink: 0;
+ }
+ /* Sidebar create-button: auf Mobile durch den runden FAB ersetzt */
+ #btn-create-event { display: none; }
+ /* Floating action button — bottom-right round button */
+ .create-fab {
+ display: flex;
+ position: fixed;
+ bottom: calc(20px + env(safe-area-inset-bottom, 0px));
+ right: 20px;
+ width: 56px; height: 56px;
+ border-radius: 50%;
+ background: var(--primary);
+ color: #fff;
+ align-items: center;
+ justify-content: center;
+ box-shadow: 0 4px 14px rgba(0,0,0,.5);
+ z-index: 450;
+ transition: filter var(--transition), transform var(--transition);
+ -webkit-tap-highlight-color: transparent;
+ touch-action: manipulation;
+ }
+ .create-fab:active { transform: scale(.95); }
+ .create-fab:hover { filter: brightness(1.1); }
/* The title is the most important info — let it grow */
.topbar-center { flex: 1; min-width: 0; }
diff --git a/frontend/index.html b/frontend/index.html
index 5233a62..1ebe8b2 100644
--- a/frontend/index.html
+++ b/frontend/index.html
@@ -4,7 +4,7 @@
- Calendarr v7
+ Calendarr v8
@@ -80,7 +80,7 @@
-
+
@@ -159,7 +159,7 @@
diff --git a/frontend/js/calendar.js b/frontend/js/calendar.js
index 267723a..9d1cc46 100644
--- a/frontend/js/calendar.js
+++ b/frontend/js/calendar.js
@@ -865,6 +865,8 @@ function bindTopbar() {
document.getElementById('btn-settings').onclick = openSettingsModal;
document.getElementById('btn-create-event').onclick = () => openNewEventModal(state.selectedDate || state.currentDate);
+ const fab = document.getElementById('btn-create-fab');
+ if (fab) fab.onclick = () => openNewEventModal(state.selectedDate || state.currentDate);
// Mobile view-toggle popup
const viewMobileBtn = document.getElementById('btn-view-mobile');
diff --git a/frontend/js/version.js b/frontend/js/version.js
index 6e19206..5056cca 100644
--- a/frontend/js/version.js
+++ b/frontend/js/version.js
@@ -1,2 +1,2 @@
// Increment APP_VERSION with every code change
-export const APP_VERSION = 'v7';
+export const APP_VERSION = 'v8';
diff --git a/frontend/sw.js b/frontend/sw.js
index 63e8715..b987b31 100644
--- a/frontend/sw.js
+++ b/frontend/sw.js
@@ -1,7 +1,7 @@
// Calendarr Service Worker
// Cache-first for static assets, network-first for /api/* (graceful offline)
-const CACHE_VERSION = 'calendarr-v7';
+const CACHE_VERSION = 'calendarr-v8';
const STATIC_ASSETS = [
'/',
'/index.html',