You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

64 lines
2.2 KiB
Markdown

+++
title = "Add contact footer to all service front-ends"
priority = 3
status = "todo"
ticket_type = "task"
dependencies = []
+++
## Background
The root `TODO.md` calls for a footer on every service front-end with contact info:
> Contact: `<site>@elijah.run`
Where `<site>` depends on the service.
## Target services and email addresses
| Service | Front-end type | Contact email |
|---|---|---|
| `quotesdb` | Yew (Rust/Wasm) | `quotes@elijah.run` |
| `edu` | mdbook static site | `vibedbooks@elijah.run` |
| Blog editor | Yew (not yet built) | `editor@elijah.run` |
## Implementation
### quotesdb/ui
Add a `Footer` component to the Yew app:
1. Create `quotesdb/ui/src/components/footer.rs` (or add inline to `app.rs`).
2. Render a `<footer>` element at the bottom of every page with the text:
`Contact: quotes@elijah.run`
3. Use an `<a href="mailto:quotes@elijah.run">` tag so it is clickable.
4. Include the footer in the top-level layout so every route shows it.
### edu (mdbook)
mdbook supports injecting HTML before/after the content via the `[output.html]` table in `book.toml`:
```toml
[output.html]
additional-js = []
additional-css = []
```
Or use the `before-content` / `after-content` HTML templates. More precisely, create `edu/theme/footer.hbs` with the footer markup and register it in `book.toml`.
Alternatively (simpler): add a `theme/` directory with an `index.hbs` that extends the default template and appends the footer. The mdbook docs for custom theming describe this approach.
Simplest option: add `footer.html` fragment via `[output.html] additional-js` hack, or just add a sentence at the bottom of each page — but that is not scalable.
**Recommended approach for mdbook:** Use mdbook's `theme/index.hbs` override (copy the default from the mdbook source) and add the footer HTML before the closing `</body>` tag:
```html
<footer style="text-align:center;padding:1em;opacity:0.6">
Contact: <a href="mailto:vibedbooks@elijah.run">vibedbooks@elijah.run</a>
</footer>
```
## Files involved
- `edu/theme/index.hbs` (new — copy from mdbook default, add footer)
- `edu/book.toml` (may need `[output.html] theme = "theme"` entry)
- `quotesdb/ui/src/components/footer.rs` (new) or similar