feat: update HTTP handlers and templates for shelf model

This commit is contained in:
2026-06-21 22:58:52 -04:00
parent 346fd7af5b
commit c4248dcc89
3 changed files with 11 additions and 26 deletions
+5 -4
View File
@@ -60,10 +60,11 @@
<form method="post" action="/add">
<label>Date added <input type="date" name="date_added" /></label>
<label>Title * <input type="text" name="title" required autofocus /></label>
<label>Author <input type="text" name="author" list="authors-list" /></label>
<datalist id="authors-list">{{#existing_authors}}<option value="{{.}}">{{/existing_authors}}</datalist>
<label>Category <input type="text" name="category" list="categories-list" /></label>
<datalist id="categories-list">{{#existing_categories}}<option value="{{.}}">{{/existing_categories}}</datalist>
<label>Author <input type="text" name="author" /></label>
<label>Shelf * <select name="shelf" required>
<option value="">— select —</option>
{{#shelves}}<option value="{{.}}">{{.}}</option>{{/shelves}}
</select></label>
<label>Format <select name="format"><option value="">—</option><option value="hardcover">Hardcover</option><option value="ebook">eBook</option><option value="audiobook">Audiobook</option></select></label>
<label>ISBN <input type="text" name="isbn" /></label>
<label>Cover (path) <input type="text" name="cover" placeholder="covers/filename.jpg" /></label>