|
1 | 1 | # Math Problems |
2 | 2 |
|
3 | | -Access the page here: https://jspann21.github.io/Math_Problems/ |
| 3 | +**Live site:** https://jspann21.github.io/Math_Problems/ |
4 | 4 |
|
5 | | -I created this site so that my daughter doesn't have to watch 30-second ads or pay a subscription to practice math |
6 | | -problems. My plan is to expand the quantity and types of problems over time. |
| 5 | +I created this site so that my daughter doesn't have to watch 30-second ads or pay a subscription to practice math problems. My plan is to expand the quantity and types of problems over time. |
7 | 6 |
|
8 | | -A JavaScript-based project that generates math problems with interactive options and a built-in scratchpad for drawing |
9 | | -and annotating solutions. The project uses HTML, CSS, and vanilla JavaScript to display problems, handle user |
10 | | -interactions, and provide a fun, dynamic learning experience. |
| 7 | +Ad-free math practice pages built with static HTML/CSS/JavaScript, deployed on GitHub Pages. |
11 | 8 |
|
12 | | -## Features |
| 9 | +## Usage |
13 | 10 |
|
14 | | -- Interactive math problems with multiple-choice options |
15 | | -- Scratchpad for handwritten notes and drawings |
16 | | -- Undo, redo, and clear functions in the scratchpad |
17 | | -- Animated stars for correct answers |
18 | | -- Responsive design and touch support for mobile devices |
| 11 | +Visit the live site and pick a topic from the homepage. Each problem page shows a question with multiple-choice answers. Use **Previous** and **Next** to move between problems. Open the **scratchpad** to work out solutions on a drawing canvas (undo, redo, clear). Use the **Home** button to return to the topic list. |
19 | 12 |
|
20 | | -## Usage |
| 13 | +## Problem Types |
21 | 14 |
|
22 | | -1. Open the index.html file in your browser. |
23 | | -2. The first math problem will display with multiple-choice options. |
24 | | -3. Use the scratchpad on the side to work out your solutions: |
25 | | - * Click on the Toggle Scratchpad button to open it. |
26 | | - * Use your mouse or touch to draw on the canvas. |
27 | | - * Use the Undo, Redo, and Clear buttons to manage your drawing. |
28 | | -4. Select an answer option to check if your answer is correct. Animated stars will appear for correct answers. |
29 | | -5. Navigate between problems using the provided navigation buttons. |
| 15 | +- **Customary Units of Length:** Using 3 One or Two Digit Numbers, Units Up to 100, Appropriate Metric Unit of Length |
| 16 | +- **Word Problems:** Length Word Problems |
| 17 | +- **Basic Operations:** Addition & Subtraction (0–20), Flashcards: Add & Subtract (0–20) |
| 18 | +- **Time:** Telling Time Problems, Read Clock Time (Minute Tick Marks) |
30 | 19 |
|
31 | | -## Project Structure |
| 20 | +## Current Stack |
32 | 21 |
|
33 | | -* index.html — Main entry point of the application. |
34 | | -* script.js — Contains the logic for math problems, event handlers, and the scratchpad. |
35 | | -* styles.css — Styles for the application layout and elements. |
36 | | -* README.md — Project documentation file. |
| 22 | +- Static HTML pages for each problem type |
| 23 | +- Shared ES modules for animations, scratchpad, and utilities |
| 24 | +- Data-driven homepage catalog (`site-catalog.js` + `index.js`) |
| 25 | +- Single global stylesheet (`styles.css`) with reusable design tokens |
37 | 26 |
|
38 | | -## Contributing |
| 27 | +## Local Development |
39 | 28 |
|
40 | | -Contributions are welcome. To contribute: |
| 29 | +Use any static file server from the repo root: |
41 | 30 |
|
42 | | -1. Fork the repository. |
43 | | -2. Create a new branch for your feature or bugfix. |
44 | | -3. Commit your changes with clear commit messages. |
45 | | -4. Open a pull request for review. |
| 31 | +```bash |
| 32 | +python -m http.server 8000 |
| 33 | +``` |
46 | 34 |
|
47 | | -## License |
| 35 | +Then open `http://localhost:8000`. |
48 | 36 |
|
49 | | -This project is open source and available under the MIT License. |
| 37 | +## Project Structure |
50 | 38 |
|
| 39 | +- `index.html`: homepage shell |
| 40 | +- `index.js`: renders topic cards from catalog data |
| 41 | +- `site-catalog.js`: single source of truth for homepage links/topics |
| 42 | +- `shared.js`: shared scratchpad + utility functions |
| 43 | +- `animations.js`: reusable correct/wrong answer feedback |
| 44 | +- `*.html` + matching `*.js`: individual problem pages and logic |
| 45 | +- `styles.css`: global and page-specific styling |
| 46 | + |
| 47 | +## Add A New Page |
| 48 | + |
| 49 | +1. Create `your-topic.html` and `your-topic.js`. |
| 50 | +2. Reuse existing page structure and include module scripts. |
| 51 | +3. Import shared helpers in your script: |
| 52 | + - `setupScratchpad()` for scratchpad controls |
| 53 | + - `shuffleArray()` and other shared utilities as needed |
| 54 | +4. Add your page link to `site-catalog.js` in the correct topic section. |
| 55 | +5. Commit and push to `main` for GitHub Pages deployment. |
0 commit comments