blog-medium-image-right-sidebar-first.php
1.83 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
47
48
49
50
51
52
53
54
55
56
57
<?php
use yii\helpers\Html;
use frontend\components\ImageResizer;
/**
*
* @author FilamentV <vortex.filament@gmail.com>
* @copyright (c), Thread
*
* @var $article \frontend\modules\news\models\Article
*/
$image = $article->getImageLink();
$image = ImageResizer::getThumb($article->getImagePath(), 730, 350);
$link = $article->getUrl();
if ($image === null) {
$image = '/images/blog-1.jpg';
}
?>
<article class="col-sm-12 col-md-12 col-xs-12" style="overflow: hidden; padding-bottom: 10px;">
<div class="row">
<div class="col-md-12">
<div class="overlay-container">
<?= Html::img($image, [
'alt' => $article['lang']['title'],
'style' => 'max-width: 100%; margin-bottom: 8px;'
]) ?>
</div>
</div>
<div class="col-md-12">
<header>
<div class="post-info" style="margin-bottom: 8px;">
<span class="post-date">
<i class="icon-calendar"></i>
<span class="day"><?= date('d', $article['published_time']) ?></span>
<span class="month"><?= date('m.Y', $article['published_time']) ?></span>
</span>
</div>
<div class="post-title">
<?= Html::a(Html::encode($article['lang']['title']), $link) ?>
</div>
</header>
<div class="blogpost-content">
<p><?= $article['lang']['description'] ?></p>
</div>
</div>
</div>
<footer class="clearfix">
<div class="link pull-left">
<?= Html::a(Yii::t('news', 'More'), $article->getUrl(), [
'class' => 'btn-new',
]) ?>
</div>
</footer>
<div class="clearfix"></div>
</article>