1
0
Fork 0
mirror of https://github.com/miniflux/v2.git synced 2025-08-16 18:01:37 +00:00

perf(templates): removes superfluous whitespaces in two templates

This commit is contained in:
Julien Voisin 2025-08-15 04:40:30 +02:00 committed by GitHub
parent 261b72f149
commit 2c4f4e2ae6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 12 additions and 14 deletions

View file

@ -1,4 +1,4 @@
{{ define "item_meta" }} {{ define "item_meta" -}}
<div class="item-meta"> <div class="item-meta">
<ul class="item-meta-info"> <ul class="item-meta-info">
<li class="item-meta-info-title"> <li class="item-meta-info-title">
@ -7,13 +7,11 @@
<li class="item-meta-info-timestamp"> <li class="item-meta-info-timestamp">
<time datetime="{{ isodate .entry.Date }}" title="{{ isodate .entry.Date }}">{{ elapsed .user.Timezone .entry.Date }}</time> <time datetime="{{ isodate .entry.Date }}" title="{{ isodate .entry.Date }}">{{ elapsed .user.Timezone .entry.Date }}</time>
</li> </li>
{{ if and .user.ShowReadingTime (gt .entry.ReadingTime 0) }} {{ if and .user.ShowReadingTime (gt .entry.ReadingTime 0) -}}
<li class="item-meta-info-reading-time"> <li class="item-meta-info-reading-time">
<span> <span>{{ plural "entry.estimated_reading_time" .entry.ReadingTime .entry.ReadingTime }}</span>
{{ plural "entry.estimated_reading_time" .entry.ReadingTime .entry.ReadingTime }}
</span>
</li> </li>
{{ end }} {{ end -}}
</ul> </ul>
<ul class="item-meta-icons"> <ul class="item-meta-icons">
<li class="item-meta-icons-read"> <li class="item-meta-icons-read">
@ -55,7 +53,7 @@
data-label-no="{{ t "confirm.no" }}" data-label-no="{{ t "confirm.no" }}"
data-label-loading="{{ t "confirm.loading" }}">{{ icon "delete" }}<span class="icon-label">{{ t "entry.unshare.label" }}</span></button> data-label-loading="{{ t "confirm.loading" }}">{{ icon "delete" }}<span class="icon-label">{{ t "entry.unshare.label" }}</span></button>
</li> </li>
{{ end }} {{ end -}}
{{ if .hasSaveEntry }} {{ if .hasSaveEntry }}
<li> <li>
<button <button
@ -67,7 +65,7 @@
data-label-done="{{ t "entry.save.completed" }}" data-label-done="{{ t "entry.save.completed" }}"
>{{ icon "save" }}<span class="icon-label">{{ t "entry.save.label" }}</span></button> >{{ icon "save" }}<span class="icon-label">{{ t "entry.save.label" }}</span></button>
</li> </li>
{{ end }} {{ end -}}
<li class="item-meta-icons-external-url"> <li class="item-meta-icons-external-url">
<a href="{{ .entry.URL | safeURL }}" <a href="{{ .entry.URL | safeURL }}"
aria-describedby="entry-title-{{ .entry.ID }}" aria-describedby="entry-title-{{ .entry.ID }}"
@ -86,7 +84,7 @@
referrerpolicy="no-referrer" referrerpolicy="no-referrer"
data-comments-link="true">{{ icon "comment" }}<span class="icon-label">{{ t "entry.comments.label" }}</span></a> data-comments-link="true">{{ icon "comment" }}<span class="icon-label">{{ t "entry.comments.label" }}</span></a>
</li> </li>
{{ end }} {{ end -}}
</ul> </ul>
</div> </div>
{{ end }} {{ end }}

View file

@ -42,10 +42,10 @@
<p role="alert" class="alert">{{ t "alert.no_unread_entry" }}</p> <p role="alert" class="alert">{{ t "alert.no_unread_entry" }}</p>
{{ else }} {{ else }}
<div class="pagination-top"> <div class="pagination-top">
{{ template "pagination" .pagination }} {{ template "pagination" .pagination -}}
</div> </div>
<div class="items hide-read-items"> <div class="items hide-read-items">
{{ range .entries }} {{ range .entries -}}
<article <article
class="item entry-item {{ if $.user.EntrySwipe }}entry-swipe{{ end }} item-status-{{ .Status }}" class="item entry-item {{ if $.user.EntrySwipe }}entry-swipe{{ end }} item-status-{{ .Status }}"
data-id="{{ .ID }}" data-id="{{ .ID }}"
@ -55,9 +55,9 @@
<header class="item-header" dir="auto"> <header class="item-header" dir="auto">
<h2 id="entry-title-{{ .ID }}" class="item-title"> <h2 id="entry-title-{{ .ID }}" class="item-title">
<a href="{{ route "unreadEntry" "entryID" .ID }}"> <a href="{{ route "unreadEntry" "entryID" .ID }}">
{{ if ne .Feed.Icon.IconID 0 }} {{ if ne .Feed.Icon.IconID 0 -}}
<img src="{{ route "feedIcon" "externalIconID" .Feed.Icon.ExternalIconID }}" width="16" height="16" loading="lazy" alt=""> <img src="{{ route "feedIcon" "externalIconID" .Feed.Icon.ExternalIconID }}" width="16" height="16" loading="lazy" alt="">
{{ end }} {{ end -}}
{{ .Title }} {{ .Title }}
</a> </a>
</h2> </h2>
@ -67,7 +67,7 @@
</a> </a>
</span> </span>
</header> </header>
{{ template "item_meta" dict "user" $.user "entry" . "hasSaveEntry" $.hasSaveEntry }} {{ template "item_meta" dict "user" $.user "entry" . "hasSaveEntry" $.hasSaveEntry -}}
</article> </article>
{{ end }} {{ end }}
</div> </div>