Debian Codegraph @

internal/template/templates/views/unread_entries.html

raw symbols SCIP
1 {{ define "title"}}{{ t "page.unread.title" }} {{ if gt .countUnread 0 }}({{ .countUnread }}){{ end }} {{ 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.unread.title" }}
7 <span aria-hidden="true">(<span class="unread-counter">{{ .countUnread }}</span>)</span>
8 </h1>
9 <span id="page-header-title-count" class="sr-only">{{ plural "page.unread_entry_count" .countUnread .countUnread }}</span>
10 {{ if .entries }}
11 <nav aria-label="{{ t "page.unread.title" }} {{ t "menu.title" }}">
12 <ul>
13 <li>
14 <button
15 class="page-button"
16 data-action="markPageAsRead"
17 data-show-only-unread="1"
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 "mark-page-as-read" }}{{ t "menu.mark_page_as_read" }}</button>
22 </li>
23 <li>
24 <button
25 class="page-button"
26 data-confirm="true"
27 data-url="{{ routePath "/mark-all-as-read" }}"
28 data-redirect-url="{{ routePath "/unread" }}"
29 data-label-question="{{ t "confirm.question" }}"
30 data-label-yes="{{ t "confirm.yes" }}"
31 data-label-no="{{ t "confirm.no" }}"
32 data-label-loading="{{ t "confirm.loading" }}">{{ icon "mark-all-as-read" }}{{ t "menu.mark_all_as_read" }}</button>
33 </li>
34 </ul>
35 </nav>
36 {{ end }}
37 </section>
38 {{ end }}
39
40 {{ define "content"}}
41 {{ if not .entries }}
42 <p role="alert" class="alert">{{ t "alert.no_unread_entry" }}</p>
43 {{ else }}
44 <div class="pagination-top">
45 {{ template "pagination" .pagination -}}
46 </div>
47 <div class="items hide-read-items">
48 {{ range .entries -}}
49 <article
50 class="item entry-item {{ if $.user.EntrySwipe }}entry-swipe{{ end }} item-status-{{ .Status }}"
51 data-id="{{ .ID }}"
52 aria-labelledby="entry-title-{{ .ID }}"
53 tabindex="-1"
54 >
55 <header class="item-header" dir="auto">
56 <h2 id="entry-title-{{ .ID }}" class="item-title">
57 <a href="{{ routePath "/unread/entry/%d" .ID }}" {{ if and $.user.AlwaysOpenExternalLinks $.user.OpenExternalLinksInNewTab }}target="_blank"{{ end }}>
58 {{ if ne .Feed.Icon.IconID 0 -}}
59 <img src="{{ routePath "/feed-icon/%s" .Feed.Icon.ExternalIconID }}" width="16" height="16" loading="lazy" alt="">
60 {{ end -}}
61 {{ .Title }}
62 </a>
63 </h2>
64 <span class="category">
65 <a href="{{ routePath "/category/%d/entries" .Feed.Category.ID }}">
66 {{ .Feed.Category.Title }}
67 </a>
68 </span>
69 </header>
70 {{ template "item_meta" dict "user" $.user "entry" . "hasSaveEntry" $.hasSaveEntry -}}
71 </article>
72 {{ end }}
73 </div>
74 <section class="page-footer">
75 {{ if .entries }}
76 <ul>
77 <li>
78 <button
79 class="page-button"
80 data-action="markPageAsRead"
81 data-label-question="{{ t "confirm.question" }}"
82 data-label-yes="{{ t "confirm.yes" }}"
83 data-label-no="{{ t "confirm.no" }}"
84 data-label-loading="{{ t "confirm.loading" }}"
85 >
86 {{ icon "mark-page-as-read" }}{{ t "menu.mark_page_as_read" }}
87 </button>
88 </li>
89 </ul>
90 {{ end }}
91 </section>
92 <div class="pagination-bottom">
93 {{ template "pagination" .pagination }}
94 </div>
95 {{ end }}
96
97 {{ end }}