Skip to content

Commit ebf0bce

Browse files
committed
use favicon as link to feed item
Signed-off-by: Paul Tirk <[email protected]>
1 parent b87386a commit ebf0bce

File tree

1 file changed

+13
-5
lines changed

1 file changed

+13
-5
lines changed

src/components/feed-display/FeedItemRow.vue

+13-5
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,13 @@
88
:href="item.url"
99
:title="t('news', 'Open website')"
1010
@click="markRead(item); $event.stopPropagation();">
11-
<EarthIcon />
11+
<span
12+
v-if="getFeed(item.feedId).faviconLink"
13+
class="favicon"
14+
:style="{ 'backgroundImage': 'url(' + getFeed(item.feedId).faviconLink + ')' }"
15+
/>
16+
<RssIcon v-else />
1217
</a>
13-
<RssIcon v-if="!getFeed(item.feedId).faviconLink" />
14-
<span v-if="getFeed(item.feedId).faviconLink" style="width: 24px; background-size: contain;" :style="{ 'backgroundImage': 'url(' + getFeed(item.feedId).faviconLink + ')' }" />
1518
</div>
1619
<div class="title-container" :class="{ 'unread': item.unread }">
1720
<span style="white-space: nowrap" :dir="item.rtl && 'rtl'">
@@ -45,7 +48,6 @@
4548
import Vue from 'vue'
4649
import { mapState } from 'vuex'
4750
48-
import EarthIcon from 'vue-material-design-icons/Earth.vue'
4951
import StarIcon from 'vue-material-design-icons/Star.vue'
5052
import EyeIcon from 'vue-material-design-icons/Eye.vue'
5153
import EyeCheckIcon from 'vue-material-design-icons/EyeCheck.vue'
@@ -65,7 +67,6 @@ import { ACTIONS, MUTATIONS } from '../../store'
6567
export default Vue.extend({
6668
name: 'FeedItemRow',
6769
components: {
68-
EarthIcon,
6970
StarIcon,
7071
EyeIcon,
7172
EyeCheckIcon,
@@ -171,6 +172,13 @@ export default Vue.extend({
171172
align-self: start;
172173
}
173174
175+
.favicon {
176+
height: 24px;
177+
width: 24px;
178+
display: inline-block;
179+
background-size: contain;
180+
}
181+
174182
.feed-item-row .title-container {
175183
color: var(--color-text-lighter);
176184

0 commit comments

Comments
 (0)