forked from Simounet/LeedVibes
-
Notifications
You must be signed in to change notification settings - Fork 0
/
article.html
54 lines (54 loc) · 3.28 KB
/
article.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
{$last_event=count($events)-1}
{loop="$events"}
{function="Plugin::callHook("event_pre_section", array(&$value))"}
{* [fix] - undefined $value->view if LeedRSSOrSiteView plugin is not installed *}
<article
class="event js-event{if="$value->getUnread() == 0"} event--read js-event--read{/if}{if="$key == $last_event"} event--new-last{/if}"
data-id="{$value->getId()}"
data-feed-id="{$value->getFeed()}"
data-favorite="{$value->getFavorite()}"
>
{function="Plugin::callHook("event_pre_title", array(&$value))"}
<header class="article__header js-article__header">
{if="isset($value->favicon)"}{$value->favicon}{/if}
<span class="article__feed-title">{$value->feedName}</span>
<h1 class="article__title js-article__title" tabindex="0"><a href="{$value->getLink()}" target="_blank">{function="strip_tags($value->getTitle())"}</a></h1>
{if="$value->getDescription()"}
<span class="article__description">{function="Functions::truncate(strip_tags($value->getDescription()),300)"}</span>
{/if}
{if="$articleDisplayDate"}
<time class="article__date" title="{$value->datetime}" datetime="{$value->datetime}"{if="$value->dateLessThanOneHour"} data-timestamp="{$value->getPubdate()}"{/if}>{$value->dateValue}</time>
{/if}
<button
class="article-favorite js-favorite{if="$value->getFavorite()==1"} article-favorite--favorited js-favorite--favorited{/if}"
title="{if="$value->getFavorite()==0"}{function="_t('FAVORIZE')"}{else}{function="_t('UNFAVORIZE')"}{/if}"
>
<svg
width="15"
height="15"
role="img"
>
<title>{function="_t('LEEDVIBES_ADD_TO_FAVORITES')"}</title>
<use xlink:href="#svg-favorite" />
</svg>
</button>
<button class="article__read-unread js-read-unread{if="$value->getUnread() == 0"} article__read-read{/if}">
<svg
width="15"
height="15"
role="img"
>
<title>{if="$value->getUnread() == 0"}{function="_t('LEEDVIBES_MARK_AS_UNREAD')"}{else}{function="_t('LEEDVIBES_MARK_AS_READ')"}{/if}</title>
<use xlink:href="#svg-check" />
</svg>
</button>
</header>
{if="isset($value->view)"}
<button class="leedvibes-article-content__switch-view js-switch-view" data-view="{$value->view}">{if="$value->view == 0"}{function="_t('SITE_VIEW')"}{else}{function="_t('RSS_VIEW')"}{/if}</button>
{/if}
{function="Plugin::callHook("event_post_title", array(&$value))"}
{* [todo] - Find a better way to display content than an empty div *}
<div class="leedvibes-article-content js-leedvibes-article-content" data-article-url="{$value->getLink()}"></div>
</article>
{function="Plugin::callHook("event_post_section", array(&$value))"}
{/loop}