2013-02-17 21:48:21 -05:00
|
|
|
<?php if (empty($item)): ?>
|
|
|
|
|
|
|
|
<p class="alert alert-info">Article not found.</p>
|
|
|
|
|
|
|
|
<?php else: ?>
|
|
|
|
|
2013-04-02 22:49:14 -04:00
|
|
|
<article class="item" id="current-item" data-item-id="<?= urlencode($item['id']) ?>">
|
2013-02-17 21:48:21 -05:00
|
|
|
<h1>
|
2013-04-02 22:49:14 -04:00
|
|
|
<a href="<?= $item['url'] ?>" rel="noreferrer" target="_blank" id="original-item"><?= Helper\escape($item['title']) ?></a>
|
2013-02-17 21:48:21 -05:00
|
|
|
</h1>
|
|
|
|
|
|
|
|
<p class="infos">
|
2013-02-24 14:04:56 -05:00
|
|
|
<?= Helper\get_host_from_url($item['url']) ?> |
|
|
|
|
<?= date('l, j F Y H:i', $item['updated']) ?>
|
2013-02-17 21:48:21 -05:00
|
|
|
</p>
|
|
|
|
|
|
|
|
<?= $item['content'] ?>
|
2013-03-26 21:57:12 -04:00
|
|
|
|
|
|
|
<?php if (isset($item_nav)): ?>
|
|
|
|
<nav>
|
|
|
|
<span class="nav-left">
|
|
|
|
<?php if ($item_nav['previous']): ?>
|
2013-04-02 22:49:14 -04:00
|
|
|
<a href="?action=read&id=<?= urlencode($item_nav['previous']['id']) ?>" id="previous-item">« Previous</a>
|
2013-03-26 21:57:12 -04:00
|
|
|
<?php else: ?>
|
|
|
|
« Previous
|
|
|
|
<?php endif ?>
|
|
|
|
</span>
|
|
|
|
|
|
|
|
<span class="nav-middle">
|
|
|
|
<?php if ($item_nav['previous'] && $item_nav['next']): ?>
|
2013-04-01 21:31:24 -04:00
|
|
|
<a href="?action=default#item-<?= urlencode($item_nav['next']['id']) ?>">Unread items</a>
|
2013-03-26 21:57:12 -04:00
|
|
|
<?php elseif ($item_nav['previous'] && ! $item_nav['next']): ?>
|
2013-04-01 21:31:24 -04:00
|
|
|
<a href="?action=default#item-<?= urlencode($item_nav['previous']['id']) ?>">Unread items</a>
|
2013-03-26 21:57:12 -04:00
|
|
|
<?php elseif (! $item_nav['previous'] && $item_nav['next']): ?>
|
2013-04-01 21:31:24 -04:00
|
|
|
<a href="?action=default#item-<?= urlencode($item_nav['next']['id']) ?>">Unread items</a>
|
2013-03-26 21:57:12 -04:00
|
|
|
<?php elseif (! $item_nav['previous'] && ! $item_nav['next']): ?>
|
|
|
|
<a href="?action=default">Unread items</a>
|
|
|
|
<?php endif ?>
|
|
|
|
</span>
|
|
|
|
|
|
|
|
<span class="nav-right">
|
|
|
|
<?php if ($item_nav['next']): ?>
|
2013-04-02 22:49:14 -04:00
|
|
|
<a href="?action=read&id=<?= urlencode($item_nav['next']['id']) ?>" id="next-item">Next »</a>
|
2013-03-26 21:57:12 -04:00
|
|
|
<?php else: ?>
|
|
|
|
Next »
|
|
|
|
<?php endif ?>
|
|
|
|
</span>
|
|
|
|
</nav>
|
|
|
|
<?php endif ?>
|
2013-02-17 21:48:21 -05:00
|
|
|
</article>
|
|
|
|
|
|
|
|
<?php endif ?>
|