/* GoalCards.jsx — Apple Health-style progress rings on a grid of goals. */
function ProgressRing({ pct, color }) {
const R = 30;
const C = 2 * Math.PI * R;
const off = C * (1 - pct / 100);
return (
);
}
const GOAL_ICON = {
target: ,
book: ,
bolt: ,
flag: ,
};
const GOALS = [
{ color:'var(--purple)', icon: 'book', pct: 64, title:'Finish CS 240 project', why:'Submission due Friday 16. 2 milestones left.' },
{ color:'var(--green)', icon: 'bolt', pct: 78, title:'5k under 24:00', why:'Two practice runs this week. Last: 24:38.' },
{ color:'var(--accent)', icon: 'target', pct: 41, title:'Sleep debt < 1h', why:'Currently 3.1h. Recovery plan active.' },
{ color:'var(--orange)', icon: 'flag', pct: 92, title:'Visa documents · Spain', why:'One signature outstanding.' },
];
function GoalCards() {
return (
Goals
All goals →
{GOALS.map((g, i) => (
{GOAL_ICON[g.icon]}
{g.title}
{g.why}
{g.pct}% · on track
))}
);
}
window.GoalCards = GoalCards;