Changed feature image style
This commit is contained in:
parent
7faf46beb9
commit
6fadc612fd
2 changed files with 50 additions and 49 deletions
|
@ -28,26 +28,9 @@
|
|||
max-width: 500px;
|
||||
}
|
||||
|
||||
#content .header .tags:before {
|
||||
margin: 0 0.5em;
|
||||
content: '\2013';
|
||||
}
|
||||
#content .header ul {
|
||||
list-style-type: none;
|
||||
display: inline;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
#content .header li {
|
||||
display: inline;
|
||||
}
|
||||
#content .header li:not(:last-child) a:after {
|
||||
content: ', ';
|
||||
}
|
||||
|
||||
#content .body {
|
||||
background: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAYAAAAGCAYAAADgzO9IAAAAJElEQVQImWNgYGBgePfu3X8YZoABFA6SIqwS+HXgtANZF7IEAJnGPJE70lLLAAAAAElFTkSuQmCC');
|
||||
margin: 1em 0;
|
||||
margin-top: 1em;
|
||||
text-align: center;
|
||||
}
|
||||
#content .body img {
|
||||
|
@ -59,11 +42,26 @@
|
|||
display: block;
|
||||
}
|
||||
|
||||
#content .header .favs-comments {
|
||||
margin-left: 0.5em;
|
||||
#content .footer {
|
||||
font-size: small;
|
||||
color: dimgray;
|
||||
margin: 0.5em 0 3em 0;
|
||||
}
|
||||
#content .footer .left {
|
||||
float: left;
|
||||
}
|
||||
#content .footer .right {
|
||||
float: right;
|
||||
}
|
||||
|
||||
#content .footer {
|
||||
text-align: right;
|
||||
#content .footer ul {
|
||||
list-style-type: none;
|
||||
display: inline;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
#content .footer li {
|
||||
display: inline;
|
||||
}
|
||||
#content .footer li:not(:last-child) a:after {
|
||||
content: ', ';
|
||||
}
|
||||
|
|
|
@ -6,38 +6,41 @@
|
|||
</div>
|
||||
|
||||
<?php if (!empty($this->context->featuredPost)): ?>
|
||||
<div class="header">
|
||||
Featured image
|
||||
|
||||
<ul class="tags">
|
||||
<?php foreach ($this->context->featuredPost->sharedTag as $tag): ?>
|
||||
<li>
|
||||
<a href="<?php echo \Chibi\UrlHelper::route('post', 'list', ['query' => $tag->name]) ?>">
|
||||
<?php echo $tag->name ?>
|
||||
</a>
|
||||
</li>
|
||||
<?php endforeach ?>
|
||||
</ul>
|
||||
|
||||
<span class="favs-comments">
|
||||
<?php printf('%d fav%s', $x = $this->context->featuredPost->countOwn('favoritee'), $x == 1 ? '' : 's') ?>, 
|
||||
<?php printf('%d comment%s', $x = $this->context->featuredPost->countOwn('comment'), $x == 1 ? '' : 's') ?>
|
||||
</span>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
|
||||
<div class="body">
|
||||
<a href="<?php echo \Chibi\UrlHelper::route('post', 'view', ['id' => $this->context->featuredPost->id]) ?>">
|
||||
<img src="<?php echo \Chibi\UrlHelper::route('post', 'retrieve', ['name' => $this->context->featuredPost->name]) ?>" alt="<?php echo $this->context->featuredPost->name ?>"/>
|
||||
<img title="Featured image" src="<?php echo \Chibi\UrlHelper::route('post', 'retrieve', ['name' => $this->context->featuredPost->name]) ?>" alt="<?php echo $this->context->featuredPost->name ?>"/>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="footer">
|
||||
Featured 
|
||||
<?php if ($this->context->featuredPostUser): ?>
|
||||
by <a href="<?php echo \Chibi\UrlHelper::route('user', 'view', ['name' => $this->context->featuredPostUser->name]) ?>"><?php echo $this->context->featuredPostUser->name ?></a>, 
|
||||
<?php endif ?>
|
||||
<?php printf('%d day%s', $x = round((time() - $this->context->featuredPostDate) / (24 * 3600.)), $x == 1 ? '' : 's') ?> ago
|
||||
<span class="left">
|
||||
Tags:
|
||||
<ul class="tags">
|
||||
<?php foreach ($this->context->featuredPost->sharedTag as $tag): ?>
|
||||
<li>
|
||||
<a href="<?php echo \Chibi\UrlHelper::route('post', 'list', ['query' => $tag->name]) ?>">
|
||||
<?php echo $tag->name ?>
|
||||
</a>
|
||||
</li>
|
||||
<?php endforeach ?>
|
||||
</ul>
|
||||
</span>
|
||||
|
||||
<span class="right">
|
||||
Featured 
|
||||
<?php if ($this->context->featuredPostUser): ?>
|
||||
by <a href="<?php echo \Chibi\UrlHelper::route('user', 'view', ['name' => $this->context->featuredPostUser->name]) ?>"><?php echo $this->context->featuredPostUser->name ?></a>, 
|
||||
<?php endif ?>
|
||||
<?php $x = round((time() - $this->context->featuredPostDate) / (24 * 3600.)) ?>
|
||||
<?php if ($x == 0): ?>
|
||||
today
|
||||
<?php elseif ($x == 1):?>
|
||||
yesterday
|
||||
<?php else: ?>
|
||||
<?php printf('%d days ago', $x) ?>
|
||||
<?php endif ?>
|
||||
</span>
|
||||
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
|
||||
|
|
Loading…
Reference in a new issue