73 lines
4.5 KiB
HTML
73 lines
4.5 KiB
HTML
{{ define "feed_list" }}
|
|
<div class="items">
|
|
{{ range .feeds }}
|
|
<article role="article" class="item feed-item {{ if ne .ParsingErrorCount 0 }}feed-parsing-error{{ else if ne .UnreadCount 0 }}feed-has-unread{{ end }}">
|
|
<div class="item-header" dir="auto">
|
|
<span class="item-title">
|
|
{{ if and (.Icon) (gt .Icon.IconID 0) }}
|
|
<img src="{{ route "icon" "iconID" .Icon.IconID }}" width="16" height="16" loading="lazy" alt="{{ .Title }}">
|
|
{{ end }}
|
|
{{ if .Disabled }} 🚫 {{ end }}
|
|
<a href="{{ route "feedEntries" "feedID" .ID }}">{{ .Title }}</a>
|
|
</span>
|
|
<span class="feed-entries-counter">
|
|
(<span title="{{ t "page.feeds.unread_counter" }}">{{ .UnreadCount }}</span>/<span title="{{ t "page.feeds.read_counter" }}">{{ .ReadCount }}</span>)
|
|
</span>
|
|
<span class="category">
|
|
<a href="{{ route "categoryEntries" "categoryID" .Category.ID }}">{{ .Category.Title }}</a>
|
|
</span>
|
|
</div>
|
|
<div class="item-meta">
|
|
<ul class="item-meta-info">
|
|
<li class="item-meta-info-site-url" dir="auto">
|
|
<a href="{{ .SiteURL | safeURL }}" title="{{ .SiteURL }}" target="_blank" rel="noopener noreferrer" referrerpolicy="no-referrer" data-original-link="{{ $.user.MarkReadOnView }}">{{ domain .SiteURL }}</a>
|
|
</li>
|
|
<li class="item-meta-info-checked-at">
|
|
{{ t "page.feeds.last_check" }} <time datetime="{{ isodate .CheckedAt }}" title="{{ isodate .CheckedAt }}">{{ elapsed $.user.Timezone .CheckedAt }}</time>
|
|
</li>
|
|
{{ $nextCheckDuration := duration .NextCheckAt }}
|
|
{{ if ne $nextCheckDuration "" }}
|
|
<li class="item-meta-info-next-check-at">
|
|
{{ t "page.feeds.next_check" }} <time datetime="{{ isodate .NextCheckAt }}" title="{{ isodate .NextCheckAt }}">{{ $nextCheckDuration }}</time>
|
|
</li>
|
|
{{ end }}
|
|
</ul>
|
|
<ul class="item-meta-icons">
|
|
<li class="item-meta-icons-refresh">
|
|
<a href="{{ route "refreshFeed" "feedID" .ID }}">{{ icon "refresh" }}<span class="icon-label">{{ t "menu.refresh_feed" }}</span></a>
|
|
</li>
|
|
<li class="item-meta-icons-edit">
|
|
<a href="{{ route "editFeed" "feedID" .ID }}">{{ icon "edit" }}<span class="icon-label">{{ t "menu.edit_feed" }}</span></a>
|
|
</li>
|
|
<li class="item-meta-icons-remove">
|
|
<a href="#"
|
|
data-confirm="true"
|
|
data-label-question="{{ t "confirm.question" }}"
|
|
data-label-yes="{{ t "confirm.yes" }}"
|
|
data-label-no="{{ t "confirm.no" }}"
|
|
data-label-loading="{{ t "confirm.loading" }}"
|
|
data-url="{{ route "removeFeed" "feedID" .ID }}">{{ icon "delete" }}<span class="icon-label">{{ t "action.remove" }}</span></a>
|
|
</li>
|
|
{{ if .UnreadCount }}
|
|
<li class="item-meta-icons-mark-as-read">
|
|
<a href="#"
|
|
data-confirm="true"
|
|
data-label-question="{{ t "confirm.question" }}"
|
|
data-label-yes="{{ t "confirm.yes" }}"
|
|
data-label-no="{{ t "confirm.no" }}"
|
|
data-label-loading="{{ t "confirm.loading" }}"
|
|
data-url="{{ route "markFeedAsRead" "feedID" .ID }}">{{ icon "read" }}<span class="icon-label">{{ t "menu.mark_all_as_read" }}</span></a>
|
|
</li>
|
|
{{ end }}
|
|
</ul>
|
|
</div>
|
|
{{ if ne .ParsingErrorCount 0 }}
|
|
<div class="parsing-error">
|
|
<strong title="{{ .ParsingErrorMsg }}" class="parsing-error-count">{{ plural "page.feeds.error_count" .ParsingErrorCount .ParsingErrorCount }}</strong>
|
|
- <small class="parsing-error-message">{{ .ParsingErrorMsg }}</small>
|
|
</div>
|
|
{{ end }}
|
|
</article>
|
|
{{ end }}
|
|
</div>
|
|
{{ end }}
|