Add 'mark read' shortcut.

This commit is contained in:
Dysosmus 2013-03-27 12:58:30 +01:00
parent b3ea83fe96
commit 3120ee83f0
2 changed files with 4 additions and 2 deletions

View File

@ -3,7 +3,7 @@
<p class="alert alert-info">Article not found.</p>
<?php else: ?>
<article class="item">
<h1>
<a href="<?= $item['url'] ?>" rel="noreferrer" target="_blank"><?= Helper\escape($item['title']) ?></a>

View File

@ -15,12 +15,14 @@
<?php foreach ($items as $item): ?>
<article id="item-<?= urlencode($item['id']) ?>">
<h2><a href="?action=read&amp;id=<?= urlencode($item['id']) ?>"><?= Helper\escape($item['title']) ?></a></h2>
<a href="?action" class="mark-read">mark read</a>
<p class="preview">
<?= Helper\escape(Helper\summary(strip_tags($item['content']), 50, 300)) ?>
</p>
<p>
<?= Helper\get_host_from_url($item['url']) ?> |
<a href="<?= $item['url'] ?>" rel="noreferrer" target="_blank" data-item-id="<?= urlencode($item['id']) ?>" data-action="mark-read">direct link</a>
<a href="<?= $item['url'] ?>" rel="noreferrer" target="_blank" data-item-id="<?= urlencode($item['id']) ?>" data-action="mark-read">direct link</a> |
<a href="#read" rel="noreferrer" data-item-id="<?= urlencode($item['id']) ?>" data-action="mark-read">mark read</a>
</p>
</article>
<?php endforeach ?>