aboutsummaryrefslogtreecommitdiff
path: root/internal/web/templates/bookmarks.html
blob: 770c73a801a7017bffd0c2a8e42d253db13233e4 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
{{/* 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; {{.L.NavReader}}</a>
    <a class="nav-link" href="/">{{.L.NavHome}}</a>
  </p>

  <nav class="tag-filter">
    <a class="nav-link{{if eq .Tag ""}} active{{end}}" href="/bookmarks">{{.L.WebAllTags}}</a>
    {{range .AllTags}}
    <a class="nav-link{{if eq $.Tag .}} active{{end}}" href="/bookmarks?tag={{.}}">{{.}}</a>
    {{end}}
  </nav>

  {{if not .Items}}
  <p>{{.L.WebNoBookmarks}}</p>
  {{else}}
  <div class="bookmarks">
    {{range .Items}}
    <div class="bookmark">
      <a href="/reader?book={{.Book}}&chap={{.Chapter}}">{{.Display}} {{.Chapter}}{{if .Verse}}:{{.Verse}}{{end}}</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">{{$.L.WebDelete}}</button>
      </form>
    </div>
    {{end}}
  </div>
  {{end}}

</div>

<footer class="licence"><a href="/source">source</a> · AGPL-3.0-or-later</footer>
</body>
</html>