Make clickable icons

This commit is contained in:
denfil 2016-02-28 22:35:25 +03:00
parent 07bd5191e5
commit 4c0d975532
4 changed files with 45 additions and 34 deletions

View File

@ -365,17 +365,30 @@ a.btn-red:hover,
}
/* icons */
article[data-item-status="read"] .read-icon:before {
article .read-icon,
article .bookmark-icon {
display: inline-block;
color: #ccc;
font-size: 20px;
width: 20px;
height: 20px;
line-height: 20px;
text-align: center;
margin: 0 1px;
cursor: pointer;
}
article .read-icon:before {
content: "✔";
}
article[data-item-bookmark="1"] .bookmark-icon:before {
article .bookmark-icon:before {
content: "★";
}
/* not bookmarked icon only in article view */
article[data-item-bookmark="0"] .item-infos .bookmark-icon:before {
content: "☆";
article[data-item-status="read"] .read-icon,
article[data-item-bookmark="1"] .bookmark-icon {
color: #444;
}
/* counter brackets */

View File

@ -1,17 +1,17 @@
<li class="hide-mobile">
<?php if ($item['bookmark']): ?>
<a
class="bookmark"
<span
class="bookmark-icon"
href="?action=bookmark&amp;value=0&amp;id=<?= $item['id'] ?>&amp;menu=<?= $menu ?>&amp;offset=<?= $offset ?>&amp;source=<?= $source ?>"
data-action="bookmark"
data-reverse-label="<?= t('bookmark') ?>"
><?= t('remove bookmark') ?></a>
title="<?= t('remove bookmark') ?>"
></span>
<?php else: ?>
<a
class="bookmark"
<span
class="bookmark-icon"
href="?action=bookmark&amp;value=1&amp;id=<?= $item['id'] ?>&amp;menu=<?= $menu ?>&amp;offset=<?= $offset ?>&amp;source=<?= $source ?>"
data-action="bookmark"
data-reverse-label="<?= t('remove bookmark') ?>"
><?= t('bookmark') ?></a>
<?php endif ?>
</li>
title="<?= t('bookmark') ?>"
></span>
<?php endif ?>

View File

@ -7,8 +7,8 @@
<?= $hide ? 'data-hide="true"' : '' ?>
>
<h2 <?= Helper\is_rtl($item) ? 'dir="rtl"' : 'dir="ltr"' ?>>
<span class="bookmark-icon"></span>
<span class="read-icon"></span>
<?= \Template\load('bookmark_links', array('item' => $item, 'menu' => $menu, 'offset' => $offset, 'source' => '')) ?>
<?= \Template\load('status_links', array('item' => $item, 'redirect' => $menu, 'offset' => $offset)) ?>
<?= Helper\favicon($favicons, $item['feed_id']) ?>
<?php if ($display_mode === 'full' || $item_title_link == 'original'): ?>
<a class="original" rel="noreferrer" target="_blank"
@ -67,8 +67,13 @@
<?php endif ?>
</li>
<?php endif ?>
<?= \Template\load('bookmark_links', array('item' => $item, 'menu' => $menu, 'offset' => $offset, 'source' => '')) ?>
<?= \Template\load('status_links', array('item' => $item, 'redirect' => $menu, 'offset' => $offset)) ?>
<li class="hide-mobile">
<a
href="?action=mark-item-removed&amp;id=<?= $item['id'] ?>&amp;offset=<?= $offset ?>&amp;redirect=<?= $redirect ?>&amp;feed_id=<?= $item['feed_id'] ?>"
data-action="mark-removed"
class="delete"
><?= t('remove') ?></a>
</li>
</ul>
<?php if ($display_mode === 'full'): ?>
<div class="preview-full-content" <?= Helper\is_rtl($item) ? 'dir="rtl"' : 'dir="ltr"' ?>><?= $item['content'] ?></div>

View File

@ -1,24 +1,17 @@
<li class="hide-mobile">
<a
href="?action=mark-item-removed&amp;id=<?= $item['id'] ?>&amp;offset=<?= $offset ?>&amp;redirect=<?= $redirect ?>&amp;feed_id=<?= $item['feed_id'] ?>"
data-action="mark-removed"
class="delete"
><?= t('remove') ?></a>
</li>
<li>
<?php if ($item['status'] == 'unread'): ?>
<a
class="mark"
<span
class="read-icon"
href="?action=mark-item-read&amp;id=<?= $item['id'] ?>&amp;offset=<?= $offset ?>&amp;redirect=<?= $redirect ?>&amp;feed_id=<?= $item['feed_id'] ?>"
data-action="mark-read"
data-reverse-label="<?= t('mark as unread') ?>"
><?= t('mark as read') ?></a>
title="<?= t('mark as read') ?>"
></span>
<?php else: ?>
<a
class="mark"
<span
class="read-icon"
href="?action=mark-item-unread&amp;id=<?= $item['id'] ?>&amp;offset=<?= $offset ?>&amp;redirect=<?= $redirect ?>&amp;feed_id=<?= $item['feed_id'] ?>"
data-action="mark-unread"
data-reverse-label="<?= t('mark as read') ?>"
><?= t('mark as unread') ?></a>
<?php endif ?>
</li>
title="<?= t('mark as unread') ?>"
></span>
<?php endif ?>