| 1 |
{{ define "title"}}{{ t "page.shared_entries.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.shared_entries.title" }} |
| 7 |
<span aria-hidden="true">({{ .total }})</span> |
| 8 |
</h1> |
| 9 |
<span id="page-header-title-count" class="sr-only">{{ plural "page.shared_entries_count" .total .total }}</span> |
| 10 |
{{ if .entries }} |
| 11 |
<nav aria-label="{{ t "page.shared_entries.title" }} {{ t "menu.title" }}"> |
| 12 |
<ul> |
| 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 |
<li> |
| 24 |
<a class="page-link" href="{{ routePath "/shares" }}">{{ icon "share" }}{{ t "menu.shared_entries" }}</a> |
| 25 |
</li> |
| 26 |
</ul> |
| 27 |
</nav> |
| 28 |
{{ end }} |
| 29 |
</section> |
| 30 |
{{ end }} |
| 31 |
|
| 32 |
{{ define "content"}} |
| 33 |
{{ if not .entries }} |
| 34 |
<p role="alert" class="alert alert-info">{{ t "alert.no_shared_entry" }}</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 |
{{ if .ShareCode }} |
| 56 |
<a href="{{ routePath "/share/%s" .ShareCode }}" |
| 57 |
title="{{ t "entry.shared_entry.title" }}" |
| 58 |
{{ if $.user.OpenExternalLinksInNewTab }}target="_blank"{{ end }}>{{ icon "share" }}</a> |
| 59 |
{{ end }} |
| 60 |
</h2> |
| 61 |
<span class="category"><a href="{{ routePath "/category/%d/entries" .Feed.Category.ID }}">{{ .Feed.Category.Title }}</a></span> |
| 62 |
</header> |
| 63 |
<div class="item-meta"> |
| 64 |
<ul class="item-meta-info"> |
| 65 |
<li class="item-meta-info-site-url"> |
| 66 |
<a href="{{ routePath "/feed/%d/entries" .Feed.ID }}" title="{{ .Feed.SiteURL }}">{{ truncate .Feed.Title 35 }}</a> |
| 67 |
</li> |
| 68 |
<li class="item-meta-info-timestamp"> |
| 69 |
<time datetime="{{ isodate .Date }}" title="{{ isodate .Date }}">{{ elapsed $.user.Timezone .Date }}</time> |
| 70 |
</li> |
| 71 |
</ul> |
| 72 |
<ul class="item-meta-icons"> |
| 73 |
<li class="item-meta-icons-delete"> |
| 74 |
{{ icon "delete" }} |
| 75 |
<a href="#" |
| 76 |
data-confirm="true" |
| 77 |
data-url="{{ routePath "/entry/unshare/%d" .ID }}" |
| 78 |
data-label-question="{{ t "confirm.question" }}" |
| 79 |
data-label-yes="{{ t "confirm.yes" }}" |
| 80 |
data-label-no="{{ t "confirm.no" }}" |
| 81 |
data-label-loading="{{ t "confirm.loading" }}">{{ t "entry.unshare.label" }}</a> |
| 82 |
</li> |
| 83 |
</ul> |
| 84 |
</div> |
| 85 |
</article> |
| 86 |
{{ end }} |
| 87 |
</div> |
| 88 |
<div class="pagination-bottom"> |
| 89 |
{{ template "pagination" .pagination }} |
| 90 |
</div> |
| 91 |
{{ end }} |
| 92 |
|
| 93 |
{{ end }} |