2017-11-20 06:10:04 +01:00
|
|
|
|
{{ define "title"}}{{ .entry.Title }}{{ end }}
|
|
|
|
|
|
|
|
|
|
{{ define "content"}}
|
2018-08-29 05:44:34 +02:00
|
|
|
|
<section class="entry" data-id="{{ .entry.ID }}">
|
2017-11-20 06:10:04 +01:00
|
|
|
|
<header class="entry-header">
|
|
|
|
|
<h1>
|
2020-01-02 20:06:57 +01:00
|
|
|
|
<a href="{{ .entry.URL | safeURL }}" target="_blank" rel="noopener noreferrer" referrerpolicy="no-referrer">{{ .entry.Title }}</a>
|
2017-11-20 06:10:04 +01:00
|
|
|
|
</h1>
|
2019-10-05 13:30:25 +02:00
|
|
|
|
{{ if .user }}
|
2017-12-03 04:32:14 +01:00
|
|
|
|
<div class="entry-actions">
|
2017-12-11 04:01:38 +01:00
|
|
|
|
<ul>
|
2018-08-29 05:44:34 +02:00
|
|
|
|
<li>
|
|
|
|
|
<a href="#"
|
2018-09-22 03:53:29 +02:00
|
|
|
|
title="{{ t "entry.status.title" }}"
|
2018-08-29 05:44:34 +02:00
|
|
|
|
data-toggle-status="true"
|
2018-09-22 03:53:29 +02:00
|
|
|
|
data-label-read="✔︎ {{ t "entry.status.read" }}"
|
|
|
|
|
data-label-unread="✘ {{ t "entry.status.unread" }}"
|
2019-10-07 05:55:15 +02:00
|
|
|
|
data-toast-read="✔︎ {{ t "entry.status.toast.read" }}"
|
|
|
|
|
data-toast-unread="✘ {{ t "entry.status.toast.unread" }}"
|
2018-08-29 05:44:34 +02:00
|
|
|
|
data-value="{{ if eq .entry.Status "read" }}read{{ else }}unread{{ end }}"
|
2018-09-22 03:53:29 +02:00
|
|
|
|
>{{ if eq .entry.Status "read" }}✘ {{ t "entry.status.unread" }}{{ else }}✔︎ {{ t "entry.status.read" }}{{ end }}</a>
|
2018-08-29 05:44:34 +02:00
|
|
|
|
</li>
|
2017-12-22 20:33:01 +01:00
|
|
|
|
<li>
|
|
|
|
|
<a href="#"
|
|
|
|
|
data-toggle-bookmark="true"
|
|
|
|
|
data-bookmark-url="{{ route "toggleBookmark" "entryID" .entry.ID }}"
|
2018-09-22 03:53:29 +02:00
|
|
|
|
data-label-loading="{{ t "entry.state.saving" }}"
|
|
|
|
|
data-label-star="☆ {{ t "entry.bookmark.toggle.on" }}"
|
|
|
|
|
data-label-unstar="★ {{ t "entry.bookmark.toggle.off" }}"
|
2019-10-07 05:55:15 +02:00
|
|
|
|
data-toast-star="★ {{ t "entry.bookmark.toast.on" }}"
|
|
|
|
|
data-toast-unstar="☆ {{ t "entry.bookmark.toast.off" }}"
|
2018-06-29 03:56:04 +02:00
|
|
|
|
data-value="{{ if .entry.Starred }}star{{ else }}unstar{{ end }}"
|
2018-09-22 03:53:29 +02:00
|
|
|
|
>{{ if .entry.Starred }}★ {{ t "entry.bookmark.toggle.off" }}{{ else }}☆ {{ t "entry.bookmark.toggle.on" }}{{ end }}</a>
|
2017-12-22 20:33:01 +01:00
|
|
|
|
</li>
|
2018-04-30 02:43:40 +02:00
|
|
|
|
{{ if .hasSaveEntry }}
|
|
|
|
|
<li>
|
|
|
|
|
<a href="#"
|
2018-09-22 03:53:29 +02:00
|
|
|
|
title="{{ t "entry.save.title" }}"
|
2018-04-30 02:43:40 +02:00
|
|
|
|
data-save-entry="true"
|
|
|
|
|
data-save-url="{{ route "saveEntry" "entryID" .entry.ID }}"
|
2018-09-22 03:53:29 +02:00
|
|
|
|
data-label-loading="{{ t "entry.state.saving" }}"
|
|
|
|
|
data-label-done="{{ t "entry.save.completed" }}"
|
2019-10-07 05:55:15 +02:00
|
|
|
|
data-toast-done="{{ t "entry.save.toast.completed" }}"
|
2018-09-22 03:53:29 +02:00
|
|
|
|
>{{ t "entry.save.title" }}</a>
|
2018-04-30 02:43:40 +02:00
|
|
|
|
</li>
|
|
|
|
|
{{ end }}
|
2019-10-05 13:30:25 +02:00
|
|
|
|
<li>
|
|
|
|
|
<a href="{{ route "shareGenerate" "entryID" .entry.ID }}"
|
|
|
|
|
title="{{ t "entry.share.title" }}"
|
|
|
|
|
target="_blank"
|
|
|
|
|
>{{ t "entry.share.label" }}</a>
|
|
|
|
|
</li>
|
2017-12-11 04:01:38 +01:00
|
|
|
|
<li>
|
|
|
|
|
<a href="#"
|
2018-09-22 03:53:29 +02:00
|
|
|
|
title="{{ t "entry.scraper.title" }}"
|
2017-12-11 04:01:38 +01:00
|
|
|
|
data-fetch-content-entry="true"
|
|
|
|
|
data-fetch-content-url="{{ route "fetchContent" "entryID" .entry.ID }}"
|
2018-09-22 03:53:29 +02:00
|
|
|
|
data-label-loading="{{ t "entry.state.loading" }}"
|
|
|
|
|
data-label-done="{{ t "entry.scraper.completed" }}"
|
|
|
|
|
>{{ t "entry.scraper.label" }}</a>
|
2017-12-11 04:01:38 +01:00
|
|
|
|
</li>
|
2018-04-07 22:50:45 +02:00
|
|
|
|
{{ if .entry.CommentsURL }}
|
|
|
|
|
<li>
|
2020-01-07 07:02:02 +01:00
|
|
|
|
<a href="{{ .entry.CommentsURL | safeURL }}" title="{{ t "entry.comments.title" }}" target="_blank" rel="noopener noreferrer" referrerpolicy="no-referrer" data-comments-link="true">{{ t "entry.comments.label" }}</a>
|
2018-04-07 22:50:45 +02:00
|
|
|
|
</li>
|
|
|
|
|
{{ end }}
|
2017-12-11 04:01:38 +01:00
|
|
|
|
</ul>
|
2017-12-03 04:32:14 +01:00
|
|
|
|
</div>
|
2019-10-05 13:30:25 +02:00
|
|
|
|
{{ end }}
|
2017-11-20 06:10:04 +01:00
|
|
|
|
<div class="entry-meta">
|
|
|
|
|
<span class="entry-website">
|
2019-10-05 13:30:25 +02:00
|
|
|
|
{{ if and .user (ne .entry.Feed.Icon.IconID 0) }}
|
2019-09-11 06:12:38 +02:00
|
|
|
|
<img src="{{ route "icon" "iconID" .entry.Feed.Icon.IconID }}" width="16" height="16" loading="lazy" alt="{{ .entry.Feed.Title }}">
|
2017-11-20 06:10:04 +01:00
|
|
|
|
{{ end }}
|
2020-03-18 04:22:02 +01:00
|
|
|
|
{{ if .user }}
|
|
|
|
|
<a href="{{ route "feedEntries" "feedID" .entry.Feed.ID }}">{{ .entry.Feed.Title }}</a>
|
|
|
|
|
{{ else }}
|
|
|
|
|
<a href="{{ .entry.Feed.SiteURL | safeURL }}">{{ .entry.Feed.Title }}</a>
|
|
|
|
|
{{ end }}
|
2017-11-20 06:10:04 +01:00
|
|
|
|
</span>
|
|
|
|
|
{{ if .entry.Author }}
|
|
|
|
|
<span class="entry-author">
|
2017-11-26 02:08:04 +01:00
|
|
|
|
{{ if isEmail .entry.Author }}
|
2017-11-20 06:10:04 +01:00
|
|
|
|
- <a href="mailto:{{ .entry.Author }}">{{ .entry.Author }}</a>
|
|
|
|
|
{{ else }}
|
|
|
|
|
– <em>{{ .entry.Author }}</em>
|
|
|
|
|
{{ end }}
|
|
|
|
|
</span>
|
|
|
|
|
{{ end }}
|
2019-10-05 13:30:25 +02:00
|
|
|
|
{{ if .user }}
|
|
|
|
|
<span class="category">
|
|
|
|
|
<a href="{{ route "categoryEntries" "categoryID" .entry.Feed.Category.ID }}">{{ .entry.Feed.Category.Title }}</a>
|
|
|
|
|
</span>
|
|
|
|
|
{{ end }}
|
2017-11-20 06:10:04 +01:00
|
|
|
|
</div>
|
|
|
|
|
<div class="entry-date">
|
2019-10-05 13:30:25 +02:00
|
|
|
|
{{ if .user }}
|
|
|
|
|
<time datetime="{{ isodate .entry.Date }}" title="{{ isodate .entry.Date }}">{{ elapsed $.user.Timezone .entry.Date }}</time>
|
|
|
|
|
{{ else }}
|
|
|
|
|
<time datetime="{{ isodate .entry.Date }}" title="{{ isodate .entry.Date }}">{{ elapsed "UTC" .entry.Date }}</time>
|
|
|
|
|
{{ end }}
|
2017-11-20 06:10:04 +01:00
|
|
|
|
</div>
|
|
|
|
|
</header>
|
2017-12-05 06:09:08 +01:00
|
|
|
|
{{ if gt (len .entry.Content) 120 }}
|
2019-10-05 13:30:25 +02:00
|
|
|
|
{{ if .user }}
|
2017-11-20 06:10:04 +01:00
|
|
|
|
<div class="pagination-top">
|
|
|
|
|
{{ template "entry_pagination" . }}
|
|
|
|
|
</div>
|
2017-12-05 06:09:08 +01:00
|
|
|
|
{{ end }}
|
2019-10-05 13:30:25 +02:00
|
|
|
|
{{ end }}
|
2017-11-20 06:10:04 +01:00
|
|
|
|
<article class="entry-content">
|
2019-10-05 13:30:25 +02:00
|
|
|
|
{{ if .user }}
|
|
|
|
|
{{ noescape (proxyFilter .entry.Content) }}
|
|
|
|
|
{{ else }}
|
|
|
|
|
{{ noescape .entry.Content }}
|
|
|
|
|
{{ end }}
|
2017-11-20 06:10:04 +01:00
|
|
|
|
</article>
|
|
|
|
|
{{ if .entry.Enclosures }}
|
2019-11-29 19:43:30 +01:00
|
|
|
|
<details class="entry-enclosures">
|
|
|
|
|
<summary>{{ t "page.entry.attachments" }} ({{ len .entry.Enclosures }})</summary>
|
2017-11-20 06:10:04 +01:00
|
|
|
|
{{ range .entry.Enclosures }}
|
2020-01-31 06:08:11 +01:00
|
|
|
|
{{ if ne .URL "" }}
|
2017-11-20 06:10:04 +01:00
|
|
|
|
<div class="entry-enclosure">
|
|
|
|
|
{{ if hasPrefix .MimeType "audio/" }}
|
|
|
|
|
<div class="enclosure-audio">
|
|
|
|
|
<audio controls preload="metadata">
|
2020-03-19 01:55:15 +01:00
|
|
|
|
<source src="{{ .URL | safeURL }}" type="{{ .MimeType }}">
|
2017-11-20 06:10:04 +01:00
|
|
|
|
</audio>
|
|
|
|
|
</div>
|
|
|
|
|
{{ else if hasPrefix .MimeType "video/" }}
|
|
|
|
|
<div class="enclosure-video">
|
|
|
|
|
<video controls preload="metadata">
|
2020-03-19 01:55:15 +01:00
|
|
|
|
<source src="{{ .URL | safeURL }}" type="{{ .MimeType }}">
|
2017-11-20 06:10:04 +01:00
|
|
|
|
</video>
|
|
|
|
|
</div>
|
|
|
|
|
{{ else if hasPrefix .MimeType "image/" }}
|
|
|
|
|
<div class="enclosure-image">
|
2020-03-19 01:55:15 +01:00
|
|
|
|
{{ if $.user }}
|
2019-10-05 13:30:25 +02:00
|
|
|
|
<img src="{{ proxyURL .URL }}" title="{{ .URL }} ({{ .MimeType }})" loading="lazy" alt="{{ .URL }} ({{ .MimeType }})">
|
|
|
|
|
{{ else }}
|
2020-03-19 01:55:15 +01:00
|
|
|
|
<img src="{{ .URL | safeURL }}" title="{{ .URL }} ({{ .MimeType }})" loading="lazy" alt="{{ .URL }} ({{ .MimeType }})">
|
2019-10-05 13:30:25 +02:00
|
|
|
|
{{ end }}
|
2017-11-20 06:10:04 +01:00
|
|
|
|
</div>
|
|
|
|
|
{{ end }}
|
|
|
|
|
|
|
|
|
|
<div class="entry-enclosure-download">
|
2020-01-02 20:06:57 +01:00
|
|
|
|
<a href="{{ .URL | safeURL }}" title="{{ t "action.download" }}{{ if gt .Size 0 }} - {{ formatFileSize .Size }}{{ end }} ({{ .MimeType }})" target="_blank" rel="noopener noreferrer" referrerpolicy="no-referrer">{{ .URL | safeURL }}</a>
|
2019-11-29 19:27:25 +01:00
|
|
|
|
<small>{{ if gt .Size 0 }} - <strong>{{ formatFileSize .Size }}</strong>{{ end }}</small>
|
2017-11-20 06:10:04 +01:00
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2020-01-31 06:08:11 +01:00
|
|
|
|
{{ end }}
|
2017-11-20 06:10:04 +01:00
|
|
|
|
{{ end }}
|
2019-11-29 19:43:30 +01:00
|
|
|
|
</details>
|
2017-11-20 06:10:04 +01:00
|
|
|
|
{{ end }}
|
|
|
|
|
</section>
|
|
|
|
|
|
2019-10-05 13:30:25 +02:00
|
|
|
|
{{ if .user }}
|
2017-11-20 06:10:04 +01:00
|
|
|
|
<div class="pagination-bottom">
|
|
|
|
|
{{ template "entry_pagination" . }}
|
|
|
|
|
</div>
|
|
|
|
|
{{ end }}
|
2019-10-05 13:30:25 +02:00
|
|
|
|
{{ end }}
|