Add CSS classes to differentiate between category/feed/entry view and icons
This commit is contained in:
parent
48acd1feca
commit
34408b50a7
10 changed files with 32 additions and 32 deletions
|
@ -1,7 +1,7 @@
|
||||||
{{ define "feed_list" }}
|
{{ define "feed_list" }}
|
||||||
<div class="items">
|
<div class="items">
|
||||||
{{ range .feeds }}
|
{{ range .feeds }}
|
||||||
<article role="article" class="item {{ if ne .ParsingErrorCount 0 }}feed-parsing-error{{ else if ne .UnreadCount 0 }}feed-has-unread{{ end }}">
|
<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">
|
<div class="item-header" dir="auto">
|
||||||
<span class="item-title">
|
<span class="item-title">
|
||||||
{{ if and (.Icon) (gt .Icon.IconID 0) }}
|
{{ if and (.Icon) (gt .Icon.IconID 0) }}
|
||||||
|
@ -19,21 +19,21 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="item-meta">
|
<div class="item-meta">
|
||||||
<ul class="item-meta-info">
|
<ul class="item-meta-info">
|
||||||
<li dir="auto">
|
<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="true">{{ domain .SiteURL }}</a>
|
<a href="{{ .SiteURL | safeURL }}" title="{{ .SiteURL }}" target="_blank" rel="noopener noreferrer" referrerpolicy="no-referrer" data-original-link="true">{{ domain .SiteURL }}</a>
|
||||||
</li>
|
</li>
|
||||||
<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>
|
{{ t "page.feeds.last_check" }} <time datetime="{{ isodate .CheckedAt }}" title="{{ isodate .CheckedAt }}">{{ elapsed $.user.Timezone .CheckedAt }}</time>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<ul class="item-meta-icons">
|
<ul class="item-meta-icons">
|
||||||
<li>
|
<li class="item-meta-icons-refresh">
|
||||||
<a href="{{ route "refreshFeed" "feedID" .ID }}">{{ icon "refresh" }}<span class="icon-label">{{ t "menu.refresh_feed" }}</span></a>
|
<a href="{{ route "refreshFeed" "feedID" .ID }}">{{ icon "refresh" }}<span class="icon-label">{{ t "menu.refresh_feed" }}</span></a>
|
||||||
</li>
|
</li>
|
||||||
<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>
|
<a href="{{ route "editFeed" "feedID" .ID }}">{{ icon "edit" }}<span class="icon-label">{{ t "menu.edit_feed" }}</span></a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li class="item-meta-icons-remove">
|
||||||
<a href="#"
|
<a href="#"
|
||||||
data-confirm="true"
|
data-confirm="true"
|
||||||
data-label-question="{{ t "confirm.question" }}"
|
data-label-question="{{ t "confirm.question" }}"
|
||||||
|
@ -43,7 +43,7 @@
|
||||||
data-url="{{ route "removeFeed" "feedID" .ID }}">{{ icon "delete" }}<span class="icon-label">{{ t "action.remove" }}</span></a>
|
data-url="{{ route "removeFeed" "feedID" .ID }}">{{ icon "delete" }}<span class="icon-label">{{ t "action.remove" }}</span></a>
|
||||||
</li>
|
</li>
|
||||||
{{ if .UnreadCount }}
|
{{ if .UnreadCount }}
|
||||||
<li>
|
<li class="item-meta-icons-mark-as-read">
|
||||||
<a href="#"
|
<a href="#"
|
||||||
data-confirm="true"
|
data-confirm="true"
|
||||||
data-label-question="{{ t "confirm.question" }}"
|
data-label-question="{{ t "confirm.question" }}"
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
{{ 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>
|
<li class="item-meta-info-title">
|
||||||
<a href="{{ route "feedEntries" "feedID" .entry.Feed.ID }}" title="{{ .entry.Feed.SiteURL }}" data-feed-link="true">{{ truncate .entry.Feed.Title 35 }}</a>
|
<a href="{{ route "feedEntries" "feedID" .entry.Feed.ID }}" title="{{ .entry.Feed.SiteURL }}" data-feed-link="true">{{ truncate .entry.Feed.Title 35 }}</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<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) }}
|
||||||
|
@ -16,7 +16,7 @@
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</ul>
|
</ul>
|
||||||
<ul class="item-meta-icons">
|
<ul class="item-meta-icons">
|
||||||
<li>
|
<li class="item-meta-icons-read">
|
||||||
<a href="#"
|
<a href="#"
|
||||||
title="{{ t "entry.status.title" }}"
|
title="{{ t "entry.status.title" }}"
|
||||||
data-toggle-status="true"
|
data-toggle-status="true"
|
||||||
|
@ -26,7 +26,7 @@
|
||||||
data-value="{{ if eq .entry.Status "read" }}read{{ else }}unread{{ end }}"
|
data-value="{{ if eq .entry.Status "read" }}read{{ else }}unread{{ end }}"
|
||||||
>{{ if eq .entry.Status "read" }}{{ icon "unread" }}{{ else }}{{ icon "read" }}{{ end }}<span class="icon-label">{{ if eq .entry.Status "read" }}{{ t "entry.status.unread" }}{{ else }}{{ t "entry.status.read" }}{{ end }}</span></a>
|
>{{ if eq .entry.Status "read" }}{{ icon "unread" }}{{ else }}{{ 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>
|
||||||
<li>
|
<li class="item-meta-icons-star">
|
||||||
<a href="#"
|
<a href="#"
|
||||||
data-toggle-bookmark="true"
|
data-toggle-bookmark="true"
|
||||||
data-bookmark-url="{{ route "toggleBookmark" "entryID" .entry.ID }}"
|
data-bookmark-url="{{ route "toggleBookmark" "entryID" .entry.ID }}"
|
||||||
|
@ -37,12 +37,12 @@
|
||||||
>{{ if .entry.Starred }}{{ icon "unstar" }}{{ else }}{{ icon "star" }}{{ end }}<span class="icon-label">{{ if .entry.Starred }}{{ t "entry.bookmark.toggle.off" }}{{ else }}{{ t "entry.bookmark.toggle.on" }}{{ end }}</span></a>
|
>{{ if .entry.Starred }}{{ icon "unstar" }}{{ else }}{{ 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>
|
</li>
|
||||||
{{ if .entry.ShareCode }}
|
{{ if .entry.ShareCode }}
|
||||||
<li>
|
<li class="item-meta-icons-share">
|
||||||
<a href="{{ route "sharedEntry" "shareCode" .entry.ShareCode }}"
|
<a href="{{ route "sharedEntry" "shareCode" .entry.ShareCode }}"
|
||||||
title="{{ t "entry.shared_entry.title" }}"
|
title="{{ t "entry.shared_entry.title" }}"
|
||||||
target="_blank">{{ icon "share" }}<span class="icon-label">{{ t "entry.shared_entry.label" }}</span></a>
|
target="_blank">{{ icon "share" }}<span class="icon-label">{{ t "entry.shared_entry.label" }}</span></a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li class="item-meta-icons-delete">
|
||||||
<a href="#"
|
<a href="#"
|
||||||
data-confirm="true"
|
data-confirm="true"
|
||||||
data-url="{{ route "unshareEntry" "entryID" .entry.ID }}"
|
data-url="{{ route "unshareEntry" "entryID" .entry.ID }}"
|
||||||
|
@ -63,7 +63,7 @@
|
||||||
>{{ icon "save" }}<span class="icon-label">{{ t "entry.save.label" }}</span></a>
|
>{{ icon "save" }}<span class="icon-label">{{ t "entry.save.label" }}</span></a>
|
||||||
</li>
|
</li>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
<li>
|
<li class="item-meta-icons-external-url">
|
||||||
<a href="{{ .entry.URL | safeURL }}"
|
<a href="{{ .entry.URL | safeURL }}"
|
||||||
target="_blank"
|
target="_blank"
|
||||||
rel="noopener noreferrer"
|
rel="noopener noreferrer"
|
||||||
|
@ -71,7 +71,7 @@
|
||||||
data-original-link="true">{{ icon "external-link" }}<span class="icon-label">{{ t "entry.external_link.label" }}</span></a>
|
data-original-link="true">{{ icon "external-link" }}<span class="icon-label">{{ t "entry.external_link.label" }}</span></a>
|
||||||
</li>
|
</li>
|
||||||
{{ if .entry.CommentsURL }}
|
{{ if .entry.CommentsURL }}
|
||||||
<li>
|
<li class="item-meta-icons-comments">
|
||||||
<a href="{{ .entry.CommentsURL | safeURL }}"
|
<a href="{{ .entry.CommentsURL | safeURL }}"
|
||||||
title="{{ t "entry.comments.title" }}"
|
title="{{ t "entry.comments.title" }}"
|
||||||
target="_blank"
|
target="_blank"
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="items">
|
<div class="items">
|
||||||
{{ range .entries }}
|
{{ range .entries }}
|
||||||
<article role="article" class="item {{ if $.user.EntrySwipe }}entry-swipe{{ end }} item-status-{{ .Status }}" data-id="{{ .ID }}">
|
<article role="article" class="item entry-item {{ if $.user.EntrySwipe }}entry-swipe{{ end }} item-status-{{ .Status }}" data-id="{{ .ID }}">
|
||||||
<div class="item-header" dir="auto">
|
<div class="item-header" dir="auto">
|
||||||
<span class="item-title">
|
<span class="item-title">
|
||||||
{{ if ne .Feed.Icon.IconID 0 }}
|
{{ if ne .Feed.Icon.IconID 0 }}
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
{{ else }}
|
{{ else }}
|
||||||
<div class="items">
|
<div class="items">
|
||||||
{{ range .categories }}
|
{{ range .categories }}
|
||||||
<article role="article" class="item{{if gt .TotalUnread 0 }} category-has-unread{{end}}">
|
<article role="article" class="item category-item {{if gt .TotalUnread 0 }} category-has-unread{{end}}">
|
||||||
<div class="item-header" dir="auto">
|
<div class="item-header" dir="auto">
|
||||||
<span class="item-title">
|
<span class="item-title">
|
||||||
<a href="{{ route "categoryEntries" "categoryID" .ID }}">{{ .Title }}</a>
|
<a href="{{ route "categoryEntries" "categoryID" .ID }}">{{ .Title }}</a>
|
||||||
|
@ -24,22 +24,22 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="item-meta">
|
<div class="item-meta">
|
||||||
<ul class="item-meta-info">
|
<ul class="item-meta-info">
|
||||||
<li>
|
<li class="item-meta-info-feed-count">
|
||||||
{{ if eq .FeedCount 0 }}{{ t "page.categories.no_feed" }}{{ else }}{{ plural "page.categories.feed_count" .FeedCount .FeedCount }}{{ end }}
|
{{ if eq .FeedCount 0 }}{{ t "page.categories.no_feed" }}{{ else }}{{ plural "page.categories.feed_count" .FeedCount .FeedCount }}{{ end }}
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<ul class="item-meta-icons">
|
<ul class="item-meta-icons">
|
||||||
<li>
|
<li class="item-meta-icons-entries">
|
||||||
<a href="{{ route "categoryEntries" "categoryID" .ID }}">{{ icon "entries" }}<span class="icon-label">{{ t "page.categories.entries" }}</span></a>
|
<a href="{{ route "categoryEntries" "categoryID" .ID }}">{{ icon "entries" }}<span class="icon-label">{{ t "page.categories.entries" }}</span></a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li class="item-meta-icons-feeds">
|
||||||
<a href="{{ route "categoryFeeds" "categoryID" .ID }}">{{ icon "feeds" }}<span class="icon-label">{{ t "page.categories.feeds" }}</span></a>
|
<a href="{{ route "categoryFeeds" "categoryID" .ID }}">{{ icon "feeds" }}<span class="icon-label">{{ t "page.categories.feeds" }}</span></a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li class="item-meta-icons-edit">
|
||||||
<a href="{{ route "editCategory" "categoryID" .ID }}">{{ icon "edit" }}<span class="icon-label">{{ t "menu.edit_category" }}</span></a>
|
<a href="{{ route "editCategory" "categoryID" .ID }}">{{ icon "edit" }}<span class="icon-label">{{ t "menu.edit_category" }}</span></a>
|
||||||
</li>
|
</li>
|
||||||
{{ if eq .FeedCount 0 }}
|
{{ if eq .FeedCount 0 }}
|
||||||
<li>
|
<li class="item-meta-icons-delete">
|
||||||
<a href="#"
|
<a href="#"
|
||||||
data-confirm="true"
|
data-confirm="true"
|
||||||
data-label-question="{{ t "confirm.question" }}"
|
data-label-question="{{ t "confirm.question" }}"
|
||||||
|
@ -50,7 +50,7 @@
|
||||||
</li>
|
</li>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ if gt .TotalUnread 0 }}
|
{{ if gt .TotalUnread 0 }}
|
||||||
<li>
|
<li class="item-meta-icons-mark-as-read">
|
||||||
<a href="#"
|
<a href="#"
|
||||||
data-confirm="true"
|
data-confirm="true"
|
||||||
data-label-question="{{ t "confirm.question" }}"
|
data-label-question="{{ t "confirm.question" }}"
|
||||||
|
|
|
@ -50,7 +50,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="items">
|
<div class="items">
|
||||||
{{ range .entries }}
|
{{ range .entries }}
|
||||||
<article role="article" class="item {{ if $.user.EntrySwipe }}entry-swipe{{ end }} item-status-{{ .Status }}" data-id="{{ .ID }}">
|
<article role="article" class="item entry-item {{ if $.user.EntrySwipe }}entry-swipe{{ end }} item-status-{{ .Status }}" data-id="{{ .ID }}">
|
||||||
<div class="item-header" dir="auto">
|
<div class="item-header" dir="auto">
|
||||||
<span class="item-title">
|
<span class="item-title">
|
||||||
{{ if ne .Feed.Icon.IconID 0 }}
|
{{ if ne .Feed.Icon.IconID 0 }}
|
||||||
|
|
|
@ -75,7 +75,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="items">
|
<div class="items">
|
||||||
{{ range .entries }}
|
{{ range .entries }}
|
||||||
<article role="article" class="item {{ if $.user.EntrySwipe }}entry-swipe{{ end }} item-status-{{ .Status }}" data-id="{{ .ID }}">
|
<article role="article" class="item entry-item {{ if $.user.EntrySwipe }}entry-swipe{{ end }} item-status-{{ .Status }}" data-id="{{ .ID }}">
|
||||||
<div class="item-header" dir="auto">
|
<div class="item-header" dir="auto">
|
||||||
<span class="item-title">
|
<span class="item-title">
|
||||||
{{ if ne .Feed.Icon.IconID 0 }}
|
{{ if ne .Feed.Icon.IconID 0 }}
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="items">
|
<div class="items">
|
||||||
{{ range .entries }}
|
{{ range .entries }}
|
||||||
<article class="item {{ if $.user.EntrySwipe }}entry-swipe{{ end }} item-status-{{ .Status }}" data-id="{{ .ID }}">
|
<article class="item entry-item {{ if $.user.EntrySwipe }}entry-swipe{{ end }} item-status-{{ .Status }}" data-id="{{ .ID }}">
|
||||||
<div class="item-header" dir="auto">
|
<div class="item-header" dir="auto">
|
||||||
<span class="item-title">
|
<span class="item-title">
|
||||||
{{ if ne .Feed.Icon.IconID 0 }}
|
{{ if ne .Feed.Icon.IconID 0 }}
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="items">
|
<div class="items">
|
||||||
{{ range .entries }}
|
{{ range .entries }}
|
||||||
<article role="article" class="item {{ if $.user.EntrySwipe }}entry-swipe{{ end }} item-status-{{ .Status }}" data-id="{{ .ID }}">
|
<article role="article" class="item entry-item {{ if $.user.EntrySwipe }}entry-swipe{{ end }} item-status-{{ .Status }}" data-id="{{ .ID }}">
|
||||||
<div class="item-header" dir="auto">
|
<div class="item-header" dir="auto">
|
||||||
<span class="item-title">
|
<span class="item-title">
|
||||||
{{ if ne .Feed.Icon.IconID 0 }}
|
{{ if ne .Feed.Icon.IconID 0 }}
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
{{ else }}
|
{{ else }}
|
||||||
<div class="items">
|
<div class="items">
|
||||||
{{ range .entries }}
|
{{ range .entries }}
|
||||||
<article role="article" class="item {{ if $.user.EntrySwipe }}entry-swipe{{ end }} item-status-{{ .Status }}" data-id="{{ .ID }}">
|
<article role="article" class="item entry-item {{ if $.user.EntrySwipe }}entry-swipe{{ end }} item-status-{{ .Status }}" data-id="{{ .ID }}">
|
||||||
<div class="item-header" dir="auto">
|
<div class="item-header" dir="auto">
|
||||||
<span class="item-title">
|
<span class="item-title">
|
||||||
{{ if ne .Feed.Icon.IconID 0 }}
|
{{ if ne .Feed.Icon.IconID 0 }}
|
||||||
|
@ -43,15 +43,15 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="item-meta">
|
<div class="item-meta">
|
||||||
<ul class="item-meta-info">
|
<ul class="item-meta-info">
|
||||||
<li>
|
<li class="item-meta-info-site-url">
|
||||||
<a href="{{ route "feedEntries" "feedID" .Feed.ID }}" title="{{ .Feed.SiteURL }}">{{ truncate .Feed.Title 35 }}</a>
|
<a href="{{ route "feedEntries" "feedID" .Feed.ID }}" title="{{ .Feed.SiteURL }}">{{ truncate .Feed.Title 35 }}</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li class="item-meta-info-timestamp">
|
||||||
<time datetime="{{ isodate .Date }}" title="{{ isodate .Date }}">{{ elapsed $.user.Timezone .Date }}</time>
|
<time datetime="{{ isodate .Date }}" title="{{ isodate .Date }}">{{ elapsed $.user.Timezone .Date }}</time>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<ul class="item-meta-icons">
|
<ul class="item-meta-icons">
|
||||||
<li>
|
<li class="item-meta-icons-delete">
|
||||||
{{ icon "delete" }}
|
{{ icon "delete" }}
|
||||||
<a href="#"
|
<a href="#"
|
||||||
data-confirm="true"
|
data-confirm="true"
|
||||||
|
|
|
@ -36,7 +36,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="items hide-read-items">
|
<div class="items hide-read-items">
|
||||||
{{ range .entries }}
|
{{ range .entries }}
|
||||||
<article role="article" class="item {{ if $.user.EntrySwipe }}entry-swipe{{ end }} item-status-{{ .Status }}" data-id="{{ .ID }}">
|
<article role="article" class="item entry-item {{ if $.user.EntrySwipe }}entry-swipe{{ end }} item-status-{{ .Status }}" data-id="{{ .ID }}">
|
||||||
<div class="item-header" dir="auto">
|
<div class="item-header" dir="auto">
|
||||||
<span class="item-title">
|
<span class="item-title">
|
||||||
{{ if ne .Feed.Icon.IconID 0 }}
|
{{ if ne .Feed.Icon.IconID 0 }}
|
||||||
|
|
Loading…
Reference in a new issue