diff --git a/frontend/src/index.css b/frontend/src/index.css index 7d2d3e2..53be7c3 100644 --- a/frontend/src/index.css +++ b/frontend/src/index.css @@ -321,3 +321,11 @@ h4.sec{font-size:.8rem;text-transform:uppercase;letter-spacing:.08em;color:var(- .ss-ex{position:relative} .ss-amp{text-align:center;font-size:1.3rem;font-weight:800;color:var(--acc);margin:14px 0 8px} .exmedia.compact img{height:190px} + +/* ---------- home: today's session row under the week strip ---------- */ +.today-row{display:flex;align-items:center;justify-content:space-between;gap:10px; + margin-top:12px;padding:11px 13px;border-radius:13px;background:var(--bg2);border:1px solid var(--line)} +.today-row:active{background:var(--card2)} +.today-row .lbl2{font-size:.62rem;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--dim)} +.today-row .ttl{font-weight:700;font-size:.98rem;line-height:1.2;text-transform:capitalize; + white-space:nowrap;overflow:hidden;text-overflow:ellipsis} diff --git a/frontend/src/views/Home.jsx b/frontend/src/views/Home.jsx index 9b805ad..675870f 100644 --- a/frontend/src/views/Home.jsx +++ b/frontend/src/views/Home.jsx @@ -2,8 +2,9 @@ import { useState } from 'react' import { useNavigate } from 'react-router-dom' import { useStore } from '../store/useStore.js' import { effectiveRoutine, effectiveRoutineId, streakWeeks, lastBW, setsDoneActive } from '../lib/history.js' -import { fmtNum, fmtDate, todayISO, isoOf, weekKey, DAYS, DAYN } from '../lib/format.js' +import { fmtNum, fmtDate, todayISO, isoOf, weekKey, DAYS } from '../lib/format.js' import { bwSheet, goalSheet, dayOverrideSheet, calendarSheet, startFlow, loadStarterPlan, bwDeltaColor } from '../sheets.jsx' +import LineChart from '../components/LineChart.jsx' // Home = what to do now + a quick glance. Deep charts & history live in Stats. export default function Home() { @@ -35,6 +36,10 @@ export default function Home() { const wThisWeek = S.workouts.filter(w => weekKey(w.d) === weekKey(todayISO())).length const plannedPerWeek = Object.keys(S.week).filter(k => S.week[k]).length + const bwPoints = S.bodyweight.slice(-30).map(b => ({ t: b.t || new Date(b.d).getTime(), y: b.w, d: b.d })) + + // today's session shown right under the week strip + const onToday = () => { if (S.active) nav('/workout'); else if (routine) startFlow(routine.id); else dayOverrideSheet(todayISO()) } return