From 86ff4c59537f489cbb11704cd593fa8e2e137443 Mon Sep 17 00:00:00 2001 From: Alexander Bocken Date: Thu, 23 Apr 2026 21:43:04 +0200 Subject: [PATCH] style(fitness/workout-fab): floating glass pill matching header MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Redesign the active-workout footer as a floating glass pill that mirrors the site header — same backdrop-blur recipe, same token set, anchored to the bottom instead of the top. Inner controls recomposed: icon-only pause button, dominant elapsed time, subtle divider, label + chevron or rest-timer pill. Mount animation, hover-lift, reduced- motion fallback. --- package.json | 2 +- src/lib/components/fitness/WorkoutFab.svelte | 352 ++++++++++++++----- 2 files changed, 274 insertions(+), 80 deletions(-) diff --git a/package.json b/package.json index bdd5fddf..18f020de 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "homepage", - "version": "1.47.3", + "version": "1.47.4", "private": true, "type": "module", "scripts": { diff --git a/src/lib/components/fitness/WorkoutFab.svelte b/src/lib/components/fitness/WorkoutFab.svelte index c3f5567d..0313acd4 100644 --- a/src/lib/components/fitness/WorkoutFab.svelte +++ b/src/lib/components/fitness/WorkoutFab.svelte @@ -2,6 +2,7 @@ import { goto } from '$app/navigation'; import Play from '@lucide/svelte/icons/play'; import Pause from '@lucide/svelte/icons/pause'; +import ChevronRight from '@lucide/svelte/icons/chevron-right'; import SyncIndicator from '$lib/components/fitness/SyncIndicator.svelte'; import { page } from '$app/stores'; import { detectFitnessLang, t } from '$lib/js/fitnessI18n'; @@ -18,131 +19,324 @@ function formatRest(secs) { return `${m}:${s.toString().padStart(2, '0')}`; } +const restActive = $derived(restTotal > 0 && restSeconds > 0); const restProgress = $derived(restTotal > 0 ? restSeconds / restTotal : 0); - -
goto(href)} onkeydown={(e) => { if (e.key === 'Enter') goto(href); }}> -
- - {elapsed} - -
- {#if restTotal > 0 && restSeconds > 0} - -
e.stopPropagation()}> -
-
- - - -
+
goto(href)} + onkeydown={(e) => { if (e.key === 'Enter' || e.key === ' ') { e.preventDefault(); goto(href); } }} +> + + + {elapsed} + + + + + + {#if restActive} +
+ + + +
{:else} - {t('active_workout', lang)} + {t('active_workout', lang)} + {/if}