1
0
Fork 0
mirror of https://github.com/miniflux/v2.git synced 2025-07-02 16:38:37 +00:00

Updating read/star icons to SVGs

This commit is contained in:
Bogdan Brinza 2020-12-29 20:47:18 -08:00 committed by GitHub
parent 9a4b045bdc
commit 9a6c80f562
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 89 additions and 39 deletions

View file

@ -43,6 +43,12 @@ SOFTWARE.
<path d="M12 17.75l-6.172 3.245 1.179-6.873-4.993-4.867 6.9-1.002L12 2l3.086 6.253 6.9 1.002-4.993 4.867 1.179 6.873z" />
</svg>
{{ end }}
{{ define "icon_unstar" }}
<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-unstar" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
<path stroke="none" d="M0 0h24v24H0z"/>
<path fill="currentColor" d="M12 17.75l-6.172 3.245 1.179-6.873-4.993-4.867 6.9-1.002L12 2l3.086 6.253 6.9 1.002-4.993 4.867 1.179 6.873z" />
</svg>
{{ end }}
{{ define "icon_save" }}
<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-download" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
<path stroke="none" d="M0 0h24v24H0z"/>

View file

@ -20,20 +20,20 @@
<a href="#"
title="{{ t "entry.status.title" }}"
data-toggle-status="true"
data-label-read="&nbsp;{{ t "entry.status.read" }}"
data-label-unread="&nbsp;{{ t "entry.status.unread" }}"
data-label-read="{{ t "entry.status.read" }}"
data-label-unread="{{ t "entry.status.unread" }}"
data-value="{{ if eq .entry.Status "read" }}read{{ else }}unread{{ end }}"
><span class="icon-label">{{ if eq .entry.Status "read" }}&nbsp;{{ t "entry.status.unread" }}{{ else }}&nbsp;{{ t "entry.status.read" }}{{ end }}</span></a>
>{{ if eq .entry.Status "read" }}{{ template "icon_unread" }}{{ else }}{{ template "icon_read" }}{{ end }}<span class="icon-label">{{ if eq .entry.Status "read" }}{{ t "entry.status.unread" }}{{ else }}{{ t "entry.status.read" }}{{ end }}</span></a>
</li>
<li>
<a href="#"
data-toggle-bookmark="true"
data-bookmark-url="{{ route "toggleBookmark" "entryID" .entry.ID }}"
data-label-loading="{{ t "entry.state.saving" }}"
data-label-star="&nbsp;{{ t "entry.bookmark.toggle.on" }}"
data-label-unstar="&nbsp;{{ t "entry.bookmark.toggle.off" }}"
data-label-star="{{ t "entry.bookmark.toggle.on" }}"
data-label-unstar="{{ t "entry.bookmark.toggle.off" }}"
data-value="{{ if .entry.Starred }}star{{ else }}unstar{{ end }}"
><span class="icon-label">{{ if .entry.Starred }}&nbsp;{{ t "entry.bookmark.toggle.off" }}{{ else }}&nbsp;{{ t "entry.bookmark.toggle.on" }}{{ end }}</span></a>
>{{ if .entry.Starred }}{{ template "icon_unstar" }}{{ else }}{{ template "icon_star" }}{{ end }}<span class="icon-label">{{ if .entry.Starred }}{{ t "entry.bookmark.toggle.off" }}{{ else }}{{ t "entry.bookmark.toggle.on" }}{{ end }}</span></a>
</li>
{{ if .entry.ShareCode }}
<li>

View file

@ -157,6 +157,18 @@
</div>
</div>
</template>
<template id="icon_read">
{{ template "icon_read" }}
</template>
<template id="icon_unread">
{{ template "icon_unread" }}
</template>
<template id="icon_star">
{{ template "icon_star" }}
</template>
<template id="icon_unstar">
{{ template "icon_unstar" }}
</template>
</body>
</html>
{{ end }}

View file

@ -13,24 +13,24 @@
<a href="#"
title="{{ t "entry.status.title" }}"
data-toggle-status="true"
data-label-unread="&nbsp;{{ t "entry.status.unread" }}"
data-label-read="✔︎&nbsp;{{ t "entry.status.read" }}"
data-label-unread="{{ t "entry.status.unread" }}"
data-label-read="{{ t "entry.status.read" }}"
data-toast-unread="✘&nbsp;{{ t "entry.status.toast.unread" }}"
data-toast-read="✔︎&nbsp;{{ t "entry.status.toast.read" }}"
data-value="{{ if eq .entry.Status "read" }}read{{ else }}unread{{ end }}"
><span class="icon-label">{{ if eq .entry.Status "unread" }}&nbsp;{{ t "entry.status.read" }}{{ else }}&nbsp;{{ t "entry.status.unread" }}{{ end }}</span></a>
>{{ if eq .entry.Status "unread" }}{{ template "icon_read" }}{{ else }}{{ template "icon_unread" }}{{ end }}<span class="icon-label">{{ if eq .entry.Status "unread" }}{{ t "entry.status.read" }}{{ else }}{{ t "entry.status.unread" }}{{ end }}</span></a>
</li>
<li>
<a href="#"
data-toggle-bookmark="true"
data-bookmark-url="{{ route "toggleBookmark" "entryID" .entry.ID }}"
data-label-loading="{{ t "entry.state.saving" }}"
data-label-star="&nbsp;{{ t "entry.bookmark.toggle.on" }}"
data-label-unstar="&nbsp;{{ t "entry.bookmark.toggle.off" }}"
data-label-star="{{ t "entry.bookmark.toggle.on" }}"
data-label-unstar="{{ t "entry.bookmark.toggle.off" }}"
data-toast-star="★&nbsp;{{ t "entry.bookmark.toast.on" }}"
data-toast-unstar="☆&nbsp;{{ t "entry.bookmark.toast.off" }}"
data-value="{{ if .entry.Starred }}star{{ else }}unstar{{ end }}"
><span class="icon-label">{{ if .entry.Starred }}&nbsp;{{ t "entry.bookmark.toggle.off" }}{{ else }}&nbsp;{{ t "entry.bookmark.toggle.on" }}{{ end }}</span></a>
>{{ if .entry.Starred }}{{ template "icon_unstar" }}{{ else }}{{ template "icon_star" }}{{ end }}<span class="icon-label">{{ if .entry.Starred }}{{ t "entry.bookmark.toggle.off" }}{{ else }}{{ t "entry.bookmark.toggle.on" }}{{ end }}</span></a>
</li>
{{ if .hasSaveEntry }}
<li>