miniflux-legacy/templates/item.php

76 lines
3.8 KiB
PHP
Raw Normal View History

2013-10-15 04:38:07 +02:00
<article
id="item-<?= $item['id'] ?>"
class="feed-<?= $item['feed_id'] ?>"
2013-10-15 04:38:07 +02:00
data-item-id="<?= $item['id'] ?>"
data-item-status="<?= $item['status'] ?>"
data-item-bookmark="<?= $item['bookmark'] ?>"
<?= $hide ? 'data-hide="true"' : '' ?>
>
2015-04-11 02:57:44 +02:00
<h2 <?= Helper\is_rtl($item) ? 'dir="rtl"' : 'dir="ltr"' ?>>
<span class="bookmark-icon"></span>
<span class="read-icon"></span>
2014-12-24 23:54:27 +01:00
<?= Helper\favicon($favicons, $item['feed_id']) ?>
<?php if ($display_mode === 'full'): ?>
<a class="original" rel="noreferrer" target="_blank"
href="<?= $item['url'] ?>"
<?= ($original_marks_read) ? 'data-action="mark-read"' : '' ?>
><?= Helper\escape($item['title']) ?></a>
<?php else: ?>
<a
href="?action=show&amp;menu=<?= $menu ?><?= isset($group_id) ? '&amp;group_id='.$group_id : '' ?>&amp;id=<?= $item['id'] ?>"
class="show"
><?= Helper\escape($item['title']) ?></a>
<?php endif ?>
2013-10-15 04:38:07 +02:00
</h2>
2014-12-24 23:54:27 +01:00
<?php if ($display_mode === 'full'): ?>
2015-05-17 19:14:33 +02:00
<div class="preview-full-content" <?= Helper\is_rtl($item) ? 'dir="rtl"' : 'dir="ltr"' ?>>
<?= $item['content'] ?>
</div>
<?php else: ?>
2015-04-11 02:57:44 +02:00
<p class="preview" <?= Helper\is_rtl($item) ? 'dir="rtl"' : 'dir="ltr"' ?>>
<?= Helper\escape(Helper\summary(strip_tags($item['content']), 50, 300)) ?>
</p>
<?php endif ?>
2014-02-15 03:21:14 +01:00
<ul class="item-menu">
<?php if ($menu !== 'feed-items'): ?>
2014-02-15 03:21:14 +01:00
<li>
<?php if (! isset($item['feed_title'])): ?>
<?= Helper\get_host_from_url($item['url']) ?>
<?php else: ?>
<a href="?action=feed-items&amp;feed_id=<?= $item['feed_id'] ?>" title="<?= t('Show only this subscription') ?>"><?= Helper\escape($item['feed_title']) ?></a>
<?php endif ?>
</li>
<?php endif ?>
2014-02-15 03:21:14 +01:00
<li class="hide-mobile">
<span title="<?= dt('%e %B %Y %k:%M', $item['updated']) ?>"><?= Helper\relative_time($item['updated']) ?></span>
2014-02-15 03:21:14 +01:00
</li>
<?php if ($display_mode === 'full'): ?>
<li>
<a
href="?action=show&amp;menu=<?= $menu ?><?= isset($group_id) ? '&amp;group_id='.$group_id : '' ?>&amp;id=<?= $item['id'] ?>"
class="show"
><?= t('view') ?></a>
</li>
<?php else: ?>
<li class="hide-mobile">
<a href="<?= $item['url'] ?>" class="original" rel="noreferrer" target="_blank" <?= ($original_marks_read) ? 'data-action="mark-read"' : '' ?>><?= t('original link') ?></a>
</li>
<?php endif ?>
2014-02-18 04:04:49 +01:00
<?php if ($item['enclosure']): ?>
<li>
<?php if (strpos($item['enclosure_type'], 'video/') === 0): ?>
<a href="<?= $item['enclosure'] ?>" class="video-enclosure" rel="noreferrer" target="_blank"><?= t('attachment') ?></a>
<?php elseif(strpos($item['enclosure_type'], 'audio/') === 0): ?>
<a href="<?= $item['enclosure'] ?>" class="audio-enclosure" rel="noreferrer" target="_blank"><?= t('attachment') ?></a>
<?php elseif(strpos($item['enclosure_type'], 'image/') === 0): ?>
<a href="<?= $item['enclosure'] ?>" class="image-enclosure" rel="noreferrer" target="_blank"><?= t('attachment') ?></a>
<?php else: ?>
<a href="<?= $item['enclosure'] ?>" class="enclosure" rel="noreferrer" target="_blank"><?= t('attachment') ?></a>
<?php endif ?>
</li>
<?php endif ?>
2015-08-29 03:34:34 +02:00
<?= \Template\load('bookmark_links', array('item' => $item, 'menu' => $menu, 'offset' => $offset, 'source' => '')) ?>
<?= \Template\load('status_links', array('item' => $item, 'redirect' => $menu, 'offset' => $offset)) ?>
2014-02-15 03:21:14 +01:00
</ul>
</article>