# tui-pages website

Static marketing site for the [`tui-pages`](https://gitlab.com/filipriec/tui-pages) Rust crate.
No build step — it's plain HTML/CSS/JS.

## Build & serve

```bash
make serve     # serve the working tree on http://localhost:8000
make size      # report file sizes
make validate  # quick HTML syntax check
```

Just edit the `.html` / `static/` files and refresh.

## ASCII video background

The full-page background is a video re-rendered into animated ASCII. `ffmpeg`
extracts frames, `chafa` turns each into an ASCII grid, and
`tools/build_mountain_js.py` bundles them into `static/js/mountain.js`, which
the page plays back.

### Render a video

1. Drop your clip in `video/`, e.g. `video/nature1.mp4`.
2. Render + bundle (needs `ffmpeg` + `chafa`, so run in the nix shell):

   ```bash
   nix develop -c make video NAME=nature1 SIZE=480x144 SCALE=1920
   ```

3. `make serve` and hard-refresh the browser (Ctrl+Shift+R).

- `NAME`  — the file name without `.mp4`.
- `SIZE`  — ASCII grid `cols×rows`. Bigger = sharper + heavier bundle. Keep
  the ~3.33:1 ratio (e.g. `80x24`, `160x48`, `240x72`, `480x144`).
- `SCALE` — source pixel width fed to chafa; scale it up with `SIZE`.

After changing `SIZE`, set a matching `font-size` in `static/css/ascii.css`
(it halves each time you double the grid) so the ASCII fills the screen.

Current setup: `480x144`, font-size `max(0.35vw, 0.695vh)`.

## License

MIT. Crate: <https://gitlab.com/filipriec/tui-pages>.
