Add ProfilePage and ProgressPage

ProfilePage:
- View/edit user info (name, age, height, goal, level)
- Show current measurements (weight, body fat, waist, neck)
- Show strength records (bench/squat/deadlift 1RM)

ProgressPage:
- Tab navigation (weight, body fat, strength)
- SVG line charts for progress visualization
- Stats showing current, first, and change
- Trend indicators (up/down)

Dashboard:
- Navigation icons for profile (👤) and progress (📊)
- Connected navigation to App.jsx routing
This commit is contained in:
2026-02-01 11:50:52 +01:00
parent 968b719be7
commit add0b2a86b
5 changed files with 1024 additions and 4 deletions
+377
View File
@@ -773,3 +773,380 @@
.upcoming-arrow {
color: var(--text-muted);
}
/* ============================================
PROFILE PAGE STYLES
============================================ */
.profile-page,
.progress-page {
min-height: 100vh;
background: var(--bg);
}
.profile-page.loading,
.progress-page.loading {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
gap: 1rem;
}
/* Page Header */
.page-header {
background: var(--bg-secondary);
padding: 1rem 1.25rem;
display: flex;
justify-content: space-between;
align-items: center;
border-bottom: 1px solid var(--border);
position: sticky;
top: 0;
z-index: 100;
}
.page-header h1 {
font-size: 1.25rem;
font-weight: 600;
}
.back-btn {
background: transparent;
border: none;
color: var(--accent);
font-size: 1rem;
cursor: pointer;
padding: 0.5rem;
}
/* Page Main */
.page-main {
padding: 1rem;
max-width: 600px;
margin: 0 auto;
display: flex;
flex-direction: column;
gap: 1.5rem;
}
/* Profile Section */
.profile-section {
background: var(--bg-secondary);
border-radius: 16px;
padding: 1.25rem;
border: 1px solid var(--border);
}
.section-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 1rem;
}
.section-header h2 {
font-size: 1.1rem;
font-weight: 600;
}
.edit-btn {
background: var(--bg);
border: 1px solid var(--border);
padding: 0.5rem 0.75rem;
border-radius: 8px;
cursor: pointer;
font-size: 0.85rem;
color: var(--text);
}
/* Info Grid */
.info-grid {
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: 1rem;
}
.info-item {
display: flex;
flex-direction: column;
gap: 0.25rem;
}
.info-label {
font-size: 0.75rem;
color: var(--text-muted);
text-transform: uppercase;
}
.info-value {
font-size: 1rem;
font-weight: 500;
}
/* Edit Form */
.edit-form {
display: flex;
flex-direction: column;
gap: 1rem;
}
.form-row {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 1rem;
}
.form-group {
display: flex;
flex-direction: column;
gap: 0.5rem;
}
.form-group label {
font-size: 0.85rem;
color: var(--text-muted);
}
.form-group input,
.form-group select {
padding: 0.75rem;
border: 1px solid var(--border);
border-radius: 8px;
background: var(--bg);
color: var(--text);
font-size: 1rem;
}
.form-group input:focus,
.form-group select:focus {
outline: none;
border-color: var(--accent);
}
.form-actions {
display: flex;
gap: 1rem;
margin-top: 0.5rem;
}
.cancel-btn {
flex: 1;
padding: 0.75rem;
border: 1px solid var(--border);
background: var(--bg);
border-radius: 8px;
cursor: pointer;
color: var(--text);
}
.save-btn {
flex: 1;
padding: 0.75rem;
border: none;
background: var(--accent);
color: white;
border-radius: 8px;
cursor: pointer;
font-weight: 600;
}
.save-btn:disabled {
opacity: 0.7;
}
/* Measurements Grid */
.measurements-grid {
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: 1rem;
}
.measurement-card {
background: var(--bg);
padding: 1rem;
border-radius: 12px;
display: flex;
flex-direction: column;
align-items: center;
gap: 0.25rem;
}
.measurement-icon {
font-size: 1.5rem;
}
.measurement-value {
font-size: 1.25rem;
font-weight: 700;
color: var(--accent);
}
.measurement-label {
font-size: 0.75rem;
color: var(--text-muted);
}
/* Strength Grid */
.strength-grid {
display: flex;
flex-direction: column;
gap: 0.75rem;
}
.strength-card {
display: flex;
justify-content: space-between;
padding: 1rem;
background: var(--bg);
border-radius: 12px;
}
.strength-exercise {
font-weight: 500;
}
.strength-value {
font-weight: 700;
color: var(--accent);
}
.no-data {
color: var(--text-muted);
text-align: center;
padding: 1rem;
}
/* ============================================
PROGRESS PAGE STYLES
============================================ */
.progress-tabs {
display: flex;
gap: 0.5rem;
background: var(--bg-secondary);
padding: 0.5rem;
border-radius: 12px;
border: 1px solid var(--border);
}
.tab-btn {
flex: 1;
padding: 0.75rem;
border: none;
background: transparent;
border-radius: 8px;
cursor: pointer;
font-size: 0.9rem;
color: var(--text-muted);
transition: all 0.2s;
}
.tab-btn.active {
background: var(--accent);
color: white;
}
.tab-btn:hover:not(.active) {
background: var(--bg);
}
/* Chart Section */
.chart-section {
background: var(--bg-secondary);
border-radius: 16px;
padding: 1.25rem;
border: 1px solid var(--border);
}
.chart-section h2 {
font-size: 1.1rem;
font-weight: 600;
margin-bottom: 1rem;
}
.chart-container {
margin-bottom: 1rem;
}
.line-chart {
width: 100%;
max-width: 100%;
}
.chart-labels {
display: flex;
justify-content: space-between;
font-size: 0.75rem;
color: var(--text-muted);
padding: 0 0.5rem;
}
/* Strength Charts */
.strength-charts {
display: flex;
flex-direction: column;
gap: 2rem;
}
.strength-chart-item h3 {
font-size: 1rem;
margin-bottom: 0.75rem;
}
/* Progress Stats */
.progress-stats {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 0.5rem;
padding-top: 0.5rem;
border-top: 1px solid var(--border);
}
.progress-stats .stat-item {
text-align: center;
}
.progress-stats .stat-label {
font-size: 0.7rem;
color: var(--text-muted);
text-transform: uppercase;
}
.progress-stats .stat-value {
font-size: 0.9rem;
font-weight: 600;
}
.trend-up {
color: #10b981;
}
.trend-down {
color: #ef4444;
}
.trend-neutral {
color: var(--text-muted);
}
/* Empty State */
.empty-state {
text-align: center;
padding: 2rem;
}
.empty-icon {
font-size: 3rem;
display: block;
margin-bottom: 1rem;
}
.empty-state p {
color: var(--text-muted);
}
.empty-hint {
font-size: 0.85rem;
margin-top: 0.5rem;
}