diff --git a/package.json b/package.json index fbbc30e..3cb192a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "homepage", - "version": "1.18.0", + "version": "1.19.0", "private": true, "type": "module", "scripts": { diff --git a/src/lib/components/fitness/MuscleMap.svelte b/src/lib/components/fitness/MuscleMap.svelte new file mode 100644 index 0000000..b35584d --- /dev/null +++ b/src/lib/components/fitness/MuscleMap.svelte @@ -0,0 +1,198 @@ + + +
+
+ {#if hasFront} +
+
+ {@html frontSvg} +
+ {isEn ? 'Front' : 'Vorne'} +
+ {/if} + {#if hasBack} +
+
+ {@html backSvg} +
+ {isEn ? 'Back' : 'Hinten'} +
+ {/if} +
+ + {#if hoveredLabel} +
{hoveredLabel}
+ {/if} +
+ + diff --git a/src/routes/fitness/[exercises=fitnessExercises]/[id]/+page.svelte b/src/routes/fitness/[exercises=fitnessExercises]/[id]/+page.svelte index 67bf7d7..eccdff9 100644 --- a/src/routes/fitness/[exercises=fitnessExercises]/[id]/+page.svelte +++ b/src/routes/fitness/[exercises=fitnessExercises]/[id]/+page.svelte @@ -8,6 +8,7 @@ const lang = $derived(detectFitnessLang($page.url.pathname)); const s = $derived(fitnessSlugs(lang)); import FitnessChart from '$lib/components/fitness/FitnessChart.svelte'; + import MuscleMap from '$lib/components/fitness/MuscleMap.svelte'; import { onMount } from 'svelte'; let { data } = $props(); @@ -128,18 +129,76 @@ {#if activeTab === 'about'} -
- -
- {exercise?.localBodyPart} - {exercise?.localEquipment} - {exercise?.localTarget} +
+
+ +
+ {exercise?.localBodyPart} + {exercise?.localEquipment} + {exercise?.localTarget} +
+ + + {#if exercise?.localSecondaryMuscles?.length || exercise?.localTarget} +
+ +
+ {#if exercise?.localTarget} + {exercise.localTarget} + {/if} + {#each exercise?.localSecondaryMuscles ?? [] as muscle} + {muscle} + {/each} +
+
+ {/if} + + + {#if exercise?.overview} +

{exercise.overview}

+ {/if} + + + {#if exercise?.localInstructions?.length} +

{t('instructions', lang)}

+
    + {#each exercise.localInstructions as step} +
  1. {step}
  2. + {/each} +
+ {/if} + + + {#if similar.length > 0} +
+

{lang === 'en' ? 'Similar Exercises' : 'Ähnliche Übungen'}

+ +
+ {/if}
- + {#if exercise?.localSecondaryMuscles?.length || exercise?.localTarget} -
-

{lang === 'en' ? 'Muscles' : 'Muskeln'}

+
- {/if} - - - {#if exercise?.overview} -

{exercise.overview}

- {/if} - - - {#if exercise?.localInstructions?.length} -

{t('instructions', lang)}

-
    - {#each exercise.localInstructions as step} -
  1. {step}
  2. - {/each} -
- {/if} - - - {#if similar.length > 0} -
-

{lang === 'en' ? 'Similar Exercises' : 'Ähnliche Übungen'}

- -
+ {/if}
{:else if activeTab === 'history'} @@ -325,14 +351,53 @@ .equipment { background: rgba(163, 190, 140, 0.2); color: var(--nord14); } .target { background: rgba(208, 135, 112, 0.2); color: var(--nord12); } - /* Muscle pills */ - .muscle-section { - margin-bottom: 0.25rem; + /* About layout — two-column on wide screens */ + .about-layout { + display: flex; + flex-direction: column; } + .about-main { + flex: 1; + min-width: 0; + } + .muscle-sidebar { + display: none; + } + .muscle-section-mobile { + display: flex; + flex-direction: column; + align-items: center; + gap: 0.5rem; + margin-bottom: 0.5rem; + } + + @media (min-width: 600px) { + .about-layout { + flex-direction: row-reverse; + gap: 1.5rem; + align-items: flex-start; + } + .muscle-sidebar { + display: flex; + flex-direction: column; + align-items: center; + gap: 0.5rem; + position: sticky; + top: 1rem; + flex-shrink: 0; + width: 180px; + } + .muscle-section-mobile { + display: none; + } + } + + /* Muscle pills */ .muscle-pills { display: flex; flex-wrap: wrap; gap: 0.3rem; + justify-content: center; } .muscle-pill { padding: 0.2rem 0.55rem;