Add WorkoutPage with warmup exercises (Claude Code)

- Dedicated workout page with progress tracking
- Warmup section with general + muscle-specific exercises
- Preparatory sets (2x10 @ 50% of first exercise)
- Checkbox tracking for warmup completion
- Progress bar showing completed exercises
- Animated 'Finish workout' button when done
- Mobile-first CSS with responsive design

Built by Claude Code 2.1.29
This commit is contained in:
2026-02-01 14:20:00 +01:00
parent 66812f9db2
commit 73d1f39ea9
3 changed files with 658 additions and 154 deletions
+302
View File
@@ -1150,3 +1150,305 @@
font-size: 0.85rem;
margin-top: 0.5rem;
}
/* ============================================
WORKOUT PAGE STYLES
============================================ */
.workout-page {
min-height: 100vh;
background: var(--bg);
}
.workout-page .page-header {
display: grid;
grid-template-columns: auto 1fr auto;
gap: 1rem;
align-items: center;
}
.workout-page .header-center {
text-align: center;
}
.workout-page .header-center h1 {
font-size: 1.1rem;
font-weight: 600;
margin: 0;
}
.workout-page .header-subtitle {
font-size: 0.8rem;
color: var(--text-muted);
}
.workout-page .header-progress {
background: var(--accent);
color: white;
padding: 0.4rem 0.75rem;
border-radius: 20px;
font-size: 0.85rem;
font-weight: 600;
}
.workout-page .workout-main {
padding-bottom: 2rem;
}
/* Progress Bar */
.workout-progress-bar {
height: 4px;
background: var(--border);
border-radius: 2px;
margin-bottom: 1.5rem;
overflow: hidden;
}
.workout-progress-fill {
height: 100%;
background: linear-gradient(90deg, var(--accent), var(--success));
border-radius: 2px;
transition: width 0.3s ease;
}
/* Uppvärmningssektion */
.warmup-section {
background: var(--bg-secondary);
border-radius: 16px;
border: 1px solid var(--border);
margin-bottom: 1.5rem;
overflow: hidden;
transition: all 0.3s;
}
.warmup-section.completed {
border-color: var(--success);
background: rgba(78, 204, 163, 0.05);
}
.warmup-header {
display: flex;
justify-content: space-between;
align-items: center;
padding: 1rem 1.25rem;
cursor: pointer;
user-select: none;
}
.warmup-title {
display: flex;
align-items: center;
gap: 0.75rem;
}
.warmup-icon {
font-size: 1.5rem;
}
.warmup-title h2 {
font-size: 1.1rem;
font-weight: 600;
margin: 0;
}
.warmup-progress {
background: var(--bg);
padding: 0.25rem 0.6rem;
border-radius: 12px;
font-size: 0.8rem;
color: var(--text-muted);
}
.expand-icon {
font-size: 0.75rem;
color: var(--text-muted);
transition: transform 0.2s;
}
.expand-icon.expanded {
transform: rotate(180deg);
}
.warmup-content {
padding: 0 1.25rem 1.25rem;
}
.warmup-category {
margin-bottom: 1.25rem;
}
.warmup-category:last-of-type {
margin-bottom: 1rem;
}
.warmup-category h3 {
font-size: 0.85rem;
color: var(--text-muted);
margin-bottom: 0.75rem;
font-weight: 500;
}
.warmup-list {
display: flex;
flex-direction: column;
gap: 0.5rem;
}
.warmup-item {
display: flex;
align-items: center;
gap: 0.75rem;
padding: 0.75rem;
background: var(--bg);
border-radius: 10px;
cursor: pointer;
transition: all 0.2s;
}
.warmup-item:hover {
background: var(--bg-card-hover, var(--bg));
}
.warmup-item.done {
background: rgba(78, 204, 163, 0.15);
}
.warmup-item.done .warmup-name {
text-decoration: line-through;
opacity: 0.7;
}
.warmup-check {
width: 24px;
height: 24px;
display: flex;
align-items: center;
justify-content: center;
border-radius: 50%;
background: var(--bg-secondary);
color: var(--text-muted);
font-size: 0.85rem;
flex-shrink: 0;
}
.warmup-item.done .warmup-check {
background: var(--success);
color: white;
}
.warmup-item-icon {
font-size: 1.1rem;
flex-shrink: 0;
}
.warmup-name {
flex: 1;
font-size: 0.95rem;
}
.warmup-duration {
font-size: 0.85rem;
color: var(--text-muted);
white-space: nowrap;
}
.warmup-done-btn {
width: 100%;
padding: 1rem;
background: var(--bg);
border: 2px dashed var(--border);
border-radius: 12px;
color: var(--text-muted);
font-size: 0.95rem;
cursor: pointer;
transition: all 0.2s;
}
.warmup-done-btn:hover {
border-color: var(--accent);
color: var(--accent);
}
.warmup-done-btn.completed {
background: var(--success);
border: none;
color: white;
font-weight: 600;
}
/* Övningssektion */
.exercises-section {
margin-bottom: 1.5rem;
}
.exercises-section h2 {
font-size: 1.1rem;
font-weight: 600;
margin-bottom: 1rem;
}
/* Exercise Card utökad */
.exercise-card.all-done {
border-color: var(--success);
background: rgba(78, 204, 163, 0.05);
}
.exercise-card.all-done .exercise-info h3::after {
content: ' ✓';
color: var(--success);
}
/* Avsluta pass knapp */
.finish-workout-btn {
width: 100%;
padding: 1.25rem;
background: var(--bg-secondary);
border: 1px solid var(--border);
border-radius: 16px;
color: var(--text-muted);
font-size: 1rem;
cursor: pointer;
transition: all 0.2s;
margin-top: 1rem;
}
.finish-workout-btn:hover {
border-color: var(--accent);
color: var(--accent);
}
.finish-workout-btn.ready {
background: linear-gradient(135deg, var(--accent) 0%, #6366f1 100%);
border: none;
color: white;
font-weight: 600;
animation: pulse-glow 2s infinite;
}
@keyframes pulse-glow {
0%, 100% {
box-shadow: 0 0 0 0 rgba(233, 69, 96, 0.4);
}
50% {
box-shadow: 0 0 20px 5px rgba(233, 69, 96, 0.2);
}
}
/* Mobile optimeringar för WorkoutPage */
@media (max-width: 480px) {
.workout-page .page-header {
padding: 0.75rem 1rem;
}
.workout-page .header-center h1 {
font-size: 1rem;
}
.warmup-item {
padding: 0.6rem;
}
.warmup-name {
font-size: 0.9rem;
}
}