Debian Codegraph @

internal/template/templates/views/history_entries.html

raw
1 {{ define "title"}}{{ t "page.history.title" }} ({{ .total }}){{ end }}
2
3 {{ define "page_header"}}
4 <section class="page-header" aria-labelledby="page-header-title page-header-title-count">
5 <h1 id="page-header-title">
6 {{ t "page.history.title" }}
7 <span aria-hidden="true">({{ .total }})</span>
8 </h1>
9 <span id="page-header-title-count" class="sr-only">{{ plural "page.read_entry_count" .total .total }}</span>
10 <nav aria-label="{{ t "page.history.title" }} {{ t "menu.title" }}">
11 <ul>
12 {{ if .entries }}
13 <li>
14 <button
15 class="page-button"
16 data-confirm="true"
17 data-url="{{ routePath "/history/flush" }}"
18 data-label-question="{{ t "confirm.question" }}"
19 data-label-yes="{{ t "confirm.yes" }}"
20 data-label-no="{{ t "confirm.no" }}"
21 data-label-loading="{{ t "confirm.loading" }}">{{ icon "delete" }}{{ t "menu.flush_history" }}</button>
22 </li>
23 {{ end }}
24 <li>
25 <a class="page-link" href="{{ routePath "/shares" }}">{{ icon "share" }}{{ t "menu.shared_entries" }}</a>
26 </li>
27 </ul>
28 </nav>
29 </section>
30 {{ end }}
31
32 {{ define "content"}}
33 {{ if not .entries }}
34 <p role="alert" class="alert alert-info">{{ t "alert.no_history" }}</p>
35 {{ else }}
36 <div class="pagination-top">
37 {{ template "pagination" .pagination }}
38 </div>
39 <div class="items">
40 {{ range .entries }}
41 <article
42 class="item entry-item {{ if $.user.EntrySwipe }}entry-swipe{{ end }} item-status-{{ .Status }}"
43 data-id="{{ .ID }}"
44 aria-labelledby="entry-title-{{ .ID }}"
45 tabindex="-1"
46 >
47 <header class="item-header" dir="auto">
48 <h2 id="entry-title-{{ .ID }}" class="item-title">
49 <a href="{{ routePath "/history/entry/%d" .ID }}" {{ if and $.user.AlwaysOpenExternalLinks $.user.OpenExternalLinksInNewTab }}target="_blank"{{ end }}>
50 {{ if ne .Feed.Icon.IconID 0 }}
51 <img src="{{ routePath "/feed-icon/%s" .Feed.Icon.ExternalIconID }}" width="16" height="16" loading="lazy" alt="">
52 {{ end }}
53 {{ .Title }}
54 </a>
55 </h2>
56 <span class="category">
57 <a href="{{ routePath "/category/%d/entries" .Feed.Category.ID }}">
58 {{ .Feed.Category.Title }}
59 </a>
60 </span>
61 </header>
62 {{ template "item_meta" dict "user" $.user "entry" . "hasSaveEntry" $.hasSaveEntry }}
63 </article>
64 {{ end }}
65 </div>
66 <div class="pagination-bottom">
67 {{ template "pagination" .pagination }}
68 </div>
69 {{ end }}
70
71 {{ end }}