aboutsummaryrefslogtreecommitdiff
path: root/internal/web/templates/bookmarks.html
diff options
context:
space:
mode:
Diffstat (limited to 'internal/web/templates/bookmarks.html')
-rw-r--r--internal/web/templates/bookmarks.html50
1 files changed, 50 insertions, 0 deletions
diff --git a/internal/web/templates/bookmarks.html b/internal/web/templates/bookmarks.html
new file mode 100644
index 0000000..f51515b
--- /dev/null
+++ b/internal/web/templates/bookmarks.html
@@ -0,0 +1,50 @@
+{{/* bookmarks.html — lectio-web /bookmarks page: the saved book+chapter
+ bookmarks (note + tags), filterable by tag, each with an "open" link
+ back into the reader and its own delete form. A plain page like
+ index.html/settings.html's head; no htmx round trip needed for the
+ list itself (a plain GET with ?tag=), each delete is its own POST form. */}}
+<!doctype html>
+<html lang="{{.Lang}}">
+<head>
+<meta charset="utf-8">
+<meta name="viewport" content="width=device-width, initial-scale=1">
+<title>lectio — bookmarks</title>
+<link rel="stylesheet" href="/static/base.css">
+<link id="theme" rel="stylesheet" href="/theme.css">
+</head>
+<body>
+<div class="page">
+
+ <p>
+ <a class="nav-link" href="/reader">&larr; reader</a>
+ <a class="nav-link" href="/">home</a>
+ </p>
+
+ <nav class="tag-filter">
+ <a class="nav-link{{if eq .Tag ""}} active{{end}}" href="/bookmarks">all</a>
+ {{range .AllTags}}
+ <a class="nav-link{{if eq $.Tag .}} active{{end}}" href="/bookmarks?tag={{.}}">{{.}}</a>
+ {{end}}
+ </nav>
+
+ {{if not .Items}}
+ <p>No bookmarks yet.</p>
+ {{else}}
+ <div class="bookmarks">
+ {{range .Items}}
+ <div class="bookmark">
+ <a href="/reader?book={{.Book}}&chap={{.Chapter}}">{{.Display}} {{.Chapter}}</a>
+ {{if .Note}}<span class="note">{{.Note}}</span>{{end}}
+ {{if .Tags}}<span class="tags">{{range .Tags}}#{{.}} {{end}}</span>{{end}}
+ <form method="post" action="/bookmarks/delete">
+ <input type="hidden" name="id" value="{{.ID}}">
+ <button type="submit">delete</button>
+ </form>
+ </div>
+ {{end}}
+ </div>
+ {{end}}
+
+</div>
+</body>
+</html>