blog-large-image-right-sidebar.php
1.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
<?php
use yii\helpers\Html;
/**
*
* @author FilamentV <vortex.filament@gmail.com>
* @copyright (c), Thread
*
* @var $article \frontend\modules\news\models\Article
*/
$image = $article->getImageLink();
$link = $article->getUrl();
if ($image === null) {
$image = '/images/blog-1.jpg';
}
?>
<article class="blogpost">
<header>
<div class="overlay-container">
<?= Html::img($image, [
'alt' => $article['lang']['title'],
]) ?>
<?= Html::a('<i class="fa fa-link"></i>', $link, [
'class' => 'overlay-link'
]) ?>
</div>
<h2><?= Html::a(Html::encode($article['lang']['title']), $link) ?></h2>
<div class="post-info">
<span class="post-date">
<i class="icon-calendar"></i>
<?= $article->getPublishedTime() ?>
</span>
</div>
</header>
<div class="blogpost-content">
<?= $article['lang']['description'] ?>
</div>
<footer class="clearfix">
<div class="link pull-right">
<i class="icon-link"></i>
<?= Html::a(Yii::t('news', 'More'), $article->getUrl()) ?>
</div>
</footer>
</article>