Changes to infobar in post thumbnails
This commit is contained in:
parent
6582b395d2
commit
4e64431a96
3 changed files with 29 additions and 6 deletions
|
@ -84,7 +84,6 @@
|
||||||
|
|
||||||
.post .info-bar {
|
.post .info-bar {
|
||||||
display: none;
|
display: none;
|
||||||
height: 20px;
|
|
||||||
border-top: 1px solid firebrick;
|
border-top: 1px solid firebrick;
|
||||||
background: rgba(255, 128, 128, 0.75);
|
background: rgba(255, 128, 128, 0.75);
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
@ -92,14 +91,17 @@
|
||||||
left: 1px; /* border */
|
left: 1px; /* border */
|
||||||
right: 1px; /* border */
|
right: 1px; /* border */
|
||||||
bottom: 1px; /* border */
|
bottom: 1px; /* border */
|
||||||
|
text-align: center;
|
||||||
}
|
}
|
||||||
.post .link:focus .info-bar,
|
.post .link:focus .info-bar,
|
||||||
.post .link:hover .info-bar {
|
.post .link:hover .info-bar {
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.post .icon-score {
|
||||||
|
background-position: -85px -1px;
|
||||||
|
}
|
||||||
.post .icon-comments {
|
.post .icon-comments {
|
||||||
margin-left: 3px;
|
|
||||||
background-position: -64px -1px;
|
background-position: -64px -1px;
|
||||||
}
|
}
|
||||||
.post .icon-favs {
|
.post .icon-favs {
|
||||||
|
@ -120,3 +122,6 @@
|
||||||
margin-right: 0.5em;
|
margin-right: 0.5em;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
}
|
}
|
||||||
|
.post .link span.inactive {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 612 B After Width: | Height: | Size: 766 B |
|
@ -14,9 +14,27 @@
|
||||||
<?php endif ?>
|
<?php endif ?>
|
||||||
<a class="link" href="<?php echo \Chibi\UrlHelper::route('post', 'view', ['id' => $this->context->post->id]) ?>">
|
<a class="link" href="<?php echo \Chibi\UrlHelper::route('post', 'view', ['id' => $this->context->post->id]) ?>">
|
||||||
<img class="thumb" src="<?php echo \Chibi\UrlHelper::route('post', 'thumb', ['name' => $this->context->post->name]) ?>" alt="@<?php echo $this->context->post->id ?>"/>
|
<img class="thumb" src="<?php echo \Chibi\UrlHelper::route('post', 'thumb', ['name' => $this->context->post->name]) ?>" alt="@<?php echo $this->context->post->id ?>"/>
|
||||||
<div class="info-bar">
|
<?php
|
||||||
<i class="icon-comments"></i> <span><?php echo $this->context->post->countOwn('comment') ?></span>
|
$x =
|
||||||
<i class="icon-favs"></i> <span><?php echo $this->context->post->countOwn('favoritee') ?></span>
|
[
|
||||||
</div>
|
'score' => $this->context->post->score,
|
||||||
|
'comments' => $this->context->post->countOwn('comment'),
|
||||||
|
'favs' => $this->context->post->countOwn('favoritee'),
|
||||||
|
];
|
||||||
|
?>
|
||||||
|
<?php if (!empty($x)): ?>
|
||||||
|
<div class="info-bar">
|
||||||
|
<?php foreach ($x as $key => $val): ?>
|
||||||
|
<?php if ($val == 0): ?>
|
||||||
|
<span class="inactive">
|
||||||
|
<?php else: ?>
|
||||||
|
<span>
|
||||||
|
<?php endif ?>
|
||||||
|
<i class="icon-<?php echo $key ?>"></i>
|
||||||
|
<?php echo $val ?>
|
||||||
|
</span>
|
||||||
|
<?php endforeach ?>
|
||||||
|
</div>
|
||||||
|
<?php endif ?>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in a new issue