4ca21c3e
Alexey Boroda
first commit
|
1
|
<?php
|
dec8b5ed
Alexey Boroda
Changes:
|
2
3
|
use common\components\artboximage\ArtboxImageHelper;
use common\models\Blog;
|
391c98b4
Alexey Boroda
-Added social but...
|
4
|
use yii\helpers\Html;
|
dec8b5ed
Alexey Boroda
Changes:
|
5
6
7
8
9
10
11
12
13
|
use yii\helpers\Url;
use yii\widgets\ListView;
/**
* @var Blog $model
* @var mixed $key
* @var integer $index
* @var ListView $widget
*/
|
4ca21c3e
Alexey Boroda
first commit
|
14
15
16
17
18
|
?>
<div class="blog1">
<div class="picture" style="background-image:url('<?php
|
dec8b5ed
Alexey Boroda
Changes:
|
19
|
echo ArtboxImageHelper::getImageSrc($model->getImageUrl(), 'blog_thumb');
|
4ca21c3e
Alexey Boroda
first commit
|
20
21
22
|
?>');"></div>
<div class="text">
<div class="title"><?php echo $model->title; ?></div>
|
dec8b5ed
Alexey Boroda
Changes:
|
23
24
|
<div class="tags">
<?php foreach($model->categories as $category) { ?>
|
391c98b4
Alexey Boroda
-Added social but...
|
25
|
<span class="blog_tag">
|
dec8b5ed
Alexey Boroda
Changes:
|
26
|
<a href="<?php
|
391c98b4
Alexey Boroda
-Added social but...
|
27
28
29
30
|
echo Url::to([
'blog/category',
'id' => $category->id,
]);
|
dec8b5ed
Alexey Boroda
Changes:
|
31
32
33
34
35
|
?>"><?php echo $category->name; ?></a>
</span>
<?php } ?>
<span class="date"><?php
echo \Yii::t('app', date('F', $model->date)), ' ', date('d, Y', $model->date);
|
4ca21c3e
Alexey Boroda
first commit
|
36
37
38
|
?></span>
</div>
<div class="picture" style="background-image:url('<?php
|
dec8b5ed
Alexey Boroda
Changes:
|
39
|
echo ArtboxImageHelper::getImageSrc($model->getImageUrl(), 'blog_thumb');
|
4ca21c3e
Alexey Boroda
first commit
|
40
41
|
?>');">
<ul class="shares">
|
391c98b4
Alexey Boroda
-Added social but...
|
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
|
<li><a target="_blank" href="http://www.facebook.com/sharer/sharer.php?u=<?php
echo Url::to([
'blog/view',
'id' => $model->id,
], true);
?>" class="fb"></a></li>
<li><a target="_blank" href="http://pinterest.com/pin/create/button/?url=<?php
echo Url::to([
'blog/view',
'id' => $model->id,
], true);
?>" class="ptst"></a></li>
<li><a target="_blank" href="https://plus.google.com/share?url=<?php
echo Url::to([
'blog/view',
'id' => $model->id,
], true);
?>" class="gpl"></a></li>
<li><a target="_blank" href="http://vk.com/share.php?url=<?php
echo Url::to([
'blog/view',
'id' => $model->id,
], true);
?>" class="vk"></a></li>
|
4ca21c3e
Alexey Boroda
first commit
|
66
67
68
69
|
</ul>
</div>
<p><?php echo $model->body_preview; ?></p>
<div class="link_to_post">
|
dec8b5ed
Alexey Boroda
Changes:
|
70
71
72
73
|
<a href="<?php echo Url::to([
'blog/view',
'id' => $model->id,
]) ?>" class="big">Узнать больше</a>
|
4ca21c3e
Alexey Boroda
first commit
|
74
75
76
|
</div>
</div>
</div>
|