Become a Pro / website · becomeapro.ai / src / app / practice / page.tsx
| 1 | import Link from "next/link"; |
| 2 | import { practiceLessons } from "@/lib/practice"; |
| 3 | import { pageMetadata } from "@/lib/seo"; |
| 4 | import styles from "./practice.module.css"; |
| 5 | |
| 6 | export const metadata = pageMetadata({ |
| 7 | title: "Practice room", |
| 8 | description: "Eight short, hands-on lessons with diagrams, exercises, and answers. Start with paper, a pencil, and a few minutes.", |
| 9 | }); |
| 10 | |
| 11 | const groups = [ |
| 12 | { title: "Measure and make", description: "Check the shape before you fasten it. Check the math before you cut.", lessons: [0, 1], alt: "Hands checking the edge of a small wooden bracket with a metal ruler" }, |
| 13 | { title: "Plan and verify", description: "Spot the task holding up a project, then learn to catch a count that looks right but isn’t.", lessons: [2, 4], alt: "A person marking a printed checklist beside a laptop" }, |
| 14 | { title: "Communicate clearly", description: "Leave a handoff someone can act on and say instructions back without guessing.", lessons: [5, 6], alt: "Two people at a workbench looking at a drawing together" }, |
| 15 | { title: "Design and teach", description: "Make a sign people can scan and check whether a lesson actually taught a skill.", lessons: [3, 7], alt: "Two pencil sketches of the same wooden bracket in a notebook" }, |
| 16 | ] as const; |
| 17 | |
| 18 | const stages = [ |
| 19 | ["Observe", "Read the example. Notice which detail changes the result."], |
| 20 | ["Try", "Do the exercise before looking at the answer."], |
| 21 | ["Check", "Compare your result and find the first step that differed."], |
| 22 | ["Repeat", "Change one detail and see if you can explain the new result."], |
| 23 | ] as const; |
| 24 | |
| 25 | export default function PracticePage() { |
| 26 | return ( |
| 27 | <div className={styles.page}> |
| 28 | <p className={styles.crumb}><Link href="/">Become a Pro</Link> / Practice room</p> |
| 29 | <header className={styles.intro}> |
| 30 | <p className={styles.kicker}>Eight hands-on lessons</p> |
| 31 | <h1>Practice room</h1> |
| 32 | <p>Learn one useful skill by doing it. Pick an exercise, follow the diagram, and check your work. Start with paper, a pencil, and a few minutes.</p> |
| 33 | </header> |
| 34 | <nav aria-label="Practice paths" className={styles.jump}> |
| 35 | {groups.map((group, i) => <a key={group.title} href={`#path-${i + 1}`}>{group.title}</a>)} |
| 36 | </nav> |
| 37 | <section aria-labelledby="practice-method" className={styles.method}> |
| 38 | <h2 id="practice-method">How to practice</h2> |
| 39 | <ol> |
| 40 | {stages.map(([stage, note], i) => ( |
| 41 | <li key={stage}> |
| 42 | <span aria-hidden="true">0{i + 1}</span> |
| 43 | <h3>{stage}</h3> |
| 44 | <p>{note}</p> |
| 45 | </li> |
| 46 | ))} |
| 47 | </ol> |
| 48 | </section> |
| 49 | {groups.map((group, i) => ( |
| 50 | <section key={group.title} id={`path-${i + 1}`} className={styles.group} aria-labelledby={`title-${i}`}> |
| 51 | {/* Static WebP files are already resized and optimized. */} |
| 52 | {/* eslint-disable-next-line @next/next/no-img-element */} |
| 53 | <img src={`/practice-images/scene-${i}.webp`} alt={group.alt} width={540} height={540} loading="lazy" /> |
| 54 | <div> |
| 55 | <p className={styles.kicker}>Path 0{i + 1}</p> |
| 56 | <h2 id={`title-${i}`}>{group.title}</h2> |
| 57 | <p className={styles.description}>{group.description}</p> |
| 58 | <ul className={styles.lessons}> |
| 59 | {group.lessons.map((index) => { |
| 60 | const lesson = practiceLessons[index]; |
| 61 | return ( |
| 62 | <li key={lesson.href}> |
| 63 | <div><Link href={lesson.href}>{lesson.title}</Link><p>{lesson.outcome}</p></div> |
| 64 | <span>{lesson.time}</span> |
| 65 | </li> |
| 66 | ); |
| 67 | })} |
| 68 | </ul> |
| 69 | </div> |
| 70 | </section> |
| 71 | ))} |
| 72 | <p className={styles.back}><Link href="/#subjects">Browse the full lesson library</Link></p> |
| 73 | </div> |
| 74 | ); |
| 75 | } |