guestbook/templates/default.html
lew 6ca40e2321 feat: add base_path support for mounting under a URL prefix
Wraps the router in axum's `nest` when BOOK_BASE_PATH is set, prepends
the prefix to form actions and asset URLs, and exposes a {{base}}
template placeholder. basePath option added to the NixOS module.
2026-04-29 01:40:48 +01:00

44 lines
1.4 KiB
HTML

<!--
Default guestbook template.
Copy this file and point BOOK_TEMPLATE at your copy to customize.
Placeholders are inserted with double curly braces, e.g. curly-title-curly.
Available placeholders:
title - Site title (BOOK_SITE_TITLE). Useful in <title> and headings.
form - The submission form (labels, inputs, button). Controlled by
BOOK_LABEL_NAME, BOOK_LABEL_WEBSITE, BOOK_LABEL_MESSAGE,
BOOK_LABEL_DRAWING, BOOK_LABEL_VOICE_NOTE, BOOK_BUTTON_TEXT,
BOOK_TEXTAREA_WIDTH, BOOK_TEXTAREA_HEIGHT. Empty when
BOOK_ENABLE_SUBMISSIONS=false.
entries - Approved guestbook entries, newest first.
style - Custom CSS from BOOK_STYLE or BOOK_STYLE_FILE, wrapped in
a <style> tag. Uses built-in default.css when neither is set.
base - URL prefix the guestbook is mounted at (BOOK_BASE_PATH).
Empty when serving at the domain root.
See default.css for available CSS classes on rendered elements.
-->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>{{title}}</title>
{{style}}
</head>
<body>
<div class="page-container">
<h1>{{title}}</h1>
<details class="guestbook-details">
<summary class="guestbook-summary">Click me to leave an entry</summary>
{{form}}
</details>
<h1>entries</h1>
{{entries}}
</div>
</body>
</html>