miniflux/template/html/entry.html

126 lines
5.8 KiB
HTML
Raw Normal View History

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>
<a href="{{ .entry.URL }}" target="_blank" rel="noopener noreferrer" referrerpolicy="no-referrer">{{ .entry.Title }}</a>
</h1>
2017-12-03 04:32:14 +01:00
<div class="entry-actions">
<ul>
2018-08-29 05:44:34 +02:00
<li>
<a href="#"
title="{{ t "Change entry status" }}"
data-toggle-status="true"
data-label-read="✔&#xfe0e;&nbsp;{{ t "Read" }}"
data-label-unread="✘&nbsp;{{ t "Unread" }}"
2018-08-29 05:44:34 +02:00
data-value="{{ if eq .entry.Status "read" }}read{{ else }}unread{{ end }}"
>{{ if eq .entry.Status "read" }}✘&nbsp;{{ t "Unread" }}{{ else }}✔&#xfe0e;&nbsp;{{ t "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 }}"
data-label-loading="{{ t "Saving..." }}"
data-label-star="☆&nbsp;{{ t "Star" }}"
data-label-unstar="★&nbsp;{{ t "Unstar" }}"
data-value="{{ if .entry.Starred }}star{{ else }}unstar{{ end }}"
>{{ if .entry.Starred }}★&nbsp;{{ t "Unstar" }}{{ else }}☆&nbsp;{{ t "Star" }}{{ end }}</a>
2017-12-22 20:33:01 +01:00
</li>
{{ if .hasSaveEntry }}
<li>
<a href="#"
title="{{ t "Save this article" }}"
data-save-entry="true"
data-save-url="{{ route "saveEntry" "entryID" .entry.ID }}"
data-label-loading="{{ t "Saving..." }}"
data-label-done="{{ t "Done!" }}"
>{{ t "Save" }}</a>
</li>
{{ end }}
<li>
<a href="#"
title="{{ t "Fetch original content" }}"
data-fetch-content-entry="true"
data-fetch-content-url="{{ route "fetchContent" "entryID" .entry.ID }}"
data-label-loading="{{ t "Loading..." }}"
data-label-done="{{ t "Done!" }}"
>{{ t "Fetch original content" }}</a>
</li>
2018-04-07 22:50:45 +02:00
{{ if .entry.CommentsURL }}
<li>
<a href="{{ .entry.CommentsURL }}" title="{{ t "View Comments" }}" target="_blank" rel="noopener noreferrer" referrerpolicy="no-referrer">{{ t "Comments" }}</a>
</li>
{{ end }}
</ul>
2017-12-03 04:32:14 +01:00
</div>
2017-11-20 06:10:04 +01:00
<div class="entry-meta">
<span class="entry-website">
{{ if ne .entry.Feed.Icon.IconID 0 }}
2018-07-11 08:20:32 +02:00
<img src="{{ route "icon" "iconID" .entry.Feed.Icon.IconID }}" width="16" height="16" alt="{{ .entry.Feed.Title }}">
2017-11-20 06:10:04 +01:00
{{ end }}
<a href="{{ route "feedEntries" "feedID" .entry.Feed.ID }}">{{ .entry.Feed.Title }}</a>
</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 }}
<span class="category">
<a href="{{ route "categoryEntries" "categoryID" .entry.Feed.Category.ID }}">{{ .entry.Feed.Category.Title }}</a>
</span>
</div>
<div class="entry-date">
<time datetime="{{ isodate .entry.Date }}" title="{{ isodate .entry.Date }}">{{ elapsed $.user.Timezone .entry.Date }}</time>
2017-11-20 06:10:04 +01:00
</div>
</header>
{{ if gt (len .entry.Content) 120 }}
2017-11-20 06:10:04 +01:00
<div class="pagination-top">
{{ template "entry_pagination" . }}
</div>
{{ end }}
2017-11-20 06:10:04 +01:00
<article class="entry-content">
{{ noescape (proxyFilter .entry.Content) }}
</article>
{{ if .entry.Enclosures }}
<aside class="entry-enclosures">
<h3>{{ t "Attachments" }}</h3>
{{ range .entry.Enclosures }}
<div class="entry-enclosure">
{{ if hasPrefix .MimeType "audio/" }}
<div class="enclosure-audio">
<audio controls preload="metadata">
<source src="{{ .URL }}" type="{{ .MimeType }}">
</audio>
</div>
{{ else if hasPrefix .MimeType "video/" }}
<div class="enclosure-video">
<video controls preload="metadata">
<source src="{{ .URL }}" type="{{ .MimeType }}">
</video>
</div>
{{ else if hasPrefix .MimeType "image/" }}
<div class="enclosure-image">
2017-12-02 07:29:18 +01:00
<img src="{{ proxyURL .URL }}" title="{{ .URL }} ({{ .MimeType }})" alt="{{ .URL }} ({{ .MimeType }})">
2017-11-20 06:10:04 +01:00
</div>
{{ end }}
<div class="entry-enclosure-download">
<a href="{{ .URL }}" title="{{ .URL }} ({{ .MimeType }})" target="_blank" rel="noopener noreferrer" referrerpolicy="no-referrer">{{ t "Download" }}</a>
<small>({{ .URL }})</small>
</div>
</div>
{{ end }}
</aside>
{{ end }}
</section>
<div class="pagination-bottom">
{{ template "entry_pagination" . }}
</div>
{{ end }}