Change count_bookmarks() to include only read/unread items and remove opacity
This commit is contained in:
parent
667f3f0773
commit
3af0f43207
@ -501,10 +501,6 @@ nav .active a {
|
|||||||
color: #ddd;
|
color: #ddd;
|
||||||
}
|
}
|
||||||
|
|
||||||
.item-status-read {
|
|
||||||
opacity: 0.4;
|
|
||||||
}
|
|
||||||
|
|
||||||
#items-paging {
|
#items-paging {
|
||||||
margin-top: 50px;
|
margin-top: 50px;
|
||||||
font-size: 75%;
|
font-size: 75%;
|
||||||
|
@ -291,6 +291,7 @@ function count_bookmarks()
|
|||||||
return \PicoTools\singleton('db')
|
return \PicoTools\singleton('db')
|
||||||
->table('items')
|
->table('items')
|
||||||
->eq('bookmark', 1)
|
->eq('bookmark', 1)
|
||||||
|
->in('status', array('read', 'unread'))
|
||||||
->count();
|
->count();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
<section class="items">
|
<section class="items">
|
||||||
<?php foreach ($items as $item): ?>
|
<?php foreach ($items as $item): ?>
|
||||||
<?php $item_id = Model\encode_item_id($item['id']) ?>
|
<?php $item_id = Model\encode_item_id($item['id']) ?>
|
||||||
<article id="item-<?= $item_id ?>" data-item-id="<?= $item_id ?>" class="<?= $item['status'] == 'read' ? 'item-status-read' : '' ?>">
|
<article id="item-<?= $item_id ?>" data-item-id="<?= $item_id ?>">
|
||||||
<h2>
|
<h2>
|
||||||
<a
|
<a
|
||||||
href="?action=show&id=<?= $item_id ?>"
|
href="?action=show&id=<?= $item_id ?>"
|
||||||
|
Loading…
Reference in New Issue
Block a user