55 lines
1.8 KiB
Markdown
55 lines
1.8 KiB
Markdown
# CLAUDE.md
|
|
|
|
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
|
|
|
|
## Project Purpose
|
|
|
|
A minimal web page with a rural background image, a title, and three buttons:
|
|
1. Play a local video (inline, no navigation)
|
|
2. Play a second local video (inline, no navigation)
|
|
3. Embed another web app via `<iframe>`
|
|
|
|
## Stack
|
|
|
|
- **Python 3.13** via `uv` (see `.python-version` and `pyproject.toml`)
|
|
- **Flask** — lightweight server to serve static assets and the HTML page
|
|
- **Vanilla HTML/CSS/JS** — no frontend build step; keep it simple
|
|
|
|
## Common Commands
|
|
|
|
```powershell
|
|
# Install dependencies
|
|
uv sync
|
|
|
|
# Run the development server
|
|
uv run python app/main.py
|
|
```
|
|
|
|
## Architecture
|
|
|
|
`app/main.py` is the entry point. It starts a Flask server that:
|
|
- Serves the single-page HTML (index.html or a rendered template)
|
|
- Serves static assets (background image, local video files) from `app/resources/`
|
|
|
|
Button behavior is handled with plain JavaScript in the page (no SPA framework):
|
|
- Video buttons toggle a `<video>` element's `src` and call `.play()`
|
|
- The iframe button swaps in the target URL into a hidden `<iframe>`
|
|
|
|
```
|
|
mini_page/
|
|
├── app/
|
|
│ ├── main.py # Flask entry point
|
|
│ ├── templates/
|
|
│ │ └── index.html # Single-page Jinja2 template
|
|
│ └── resources/ # Flask static_folder → served at /resources/
|
|
│ ├── css/
|
|
│ │ └── style.css # All styles (separate from HTML)
|
|
│ └── videos/ # Place video1.mp4, video2.mp4 here
|
|
├── pyproject.toml
|
|
└── CLAUDE.md
|
|
```
|
|
|
|
## Dependencies
|
|
|
|
Add packages via `uv add <package>` — this updates `pyproject.toml` automatically. Flask is the only expected runtime dependency.
|