root = Card([header, progressSection, calorieSection, workoutSection, logSection], "card", "column", "l")
header = CardHeader("Daily Summary", "Your fitness overview for today")
progressSection = Card([progressTitle, stepProgress, stepGoalText], "sunk", "column", "m")
progressTitle = Heading("Steps Today", "h3")
stepProgress = Progress(72, "8,640 of 12,000 steps")
stepGoalText = TextContent("You are **72%** of the way to your daily goal. Keep it up!")
calorieSection = Card([calorieTitle, calorieText], "sunk", "column", "m")
calorieTitle = Heading("Calories Burned", "h3")
calorieText = TextContent("**486 kcal** burned so far today, including active and resting burn.")
workoutSection = Card([workoutTitle, workoutChart, workoutSummary], "sunk", "column", "m")
workoutTitle = Heading("Workouts This Week", "h3")
workoutChart = BarChart(["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"], [minutesSeries], "grouped", "Day", "Minutes")
minutesSeries = Series("Active minutes", [35, 50, 0, 45, 60, 75, 20])
workoutSummary = TextContent("You trained **5 of 7** days this week with an average of **41 minutes** per session.")
logSection = Card([logTitle, logForm], "sunk", "column", "m")
logTitle = Heading("Log a Workout", "h3")
logForm = Form("log-workout", formButtons, [typeField, durationField, intensityField])
typeField = FormControl("Workout type", typeSelect)
typeSelect = Select("workout_type", [typeRun, typeRide, typeLift, typeYoga], "Choose a workout")
typeRun = SelectItem("run", "Running")
typeRide = SelectItem("ride", "Cycling")
typeLift = SelectItem("lift", "Strength training")
typeYoga = SelectItem("yoga", "Yoga")
durationField = FormControl("Duration (minutes)", durationInput)
durationInput = Input("duration", "e.g. 30", "number")
intensityField = FormControl("Intensity", intensitySlider)
intensitySlider = Slider("intensity", "discrete", 1, 10, 1, [5], "1 = easy, 10 = all out")
formButtons = Buttons([saveBtn, cancelBtn])
saveBtn = Button("Save workout", null, "primary")
cancelBtn = Button("Cancel", null, "tertiary")