Commit ad3c7c74 authored by andre's avatar andre

#1094 отладка

parent 90d6256d
...@@ -20,32 +20,50 @@ $models = CaseContent::find() ...@@ -20,32 +20,50 @@ $models = CaseContent::find()
<?php foreach ($models as $model) : ?> <?php foreach ($models as $model) : ?>
<? if(!$model->previewType || $model->previewType->type == CasesPreviewType::PREVIEW_SQUARE): ?> <? if(!$model->previewType || $model->previewType->type == CasesPreviewType::PREVIEW_SQUARE): ?>
<div class="col-md-6 col-xs-6 col-sm-12"> <div class="col-md-6 col-xs-6 col-sm-12">
<div class="keys_block_small"> <!-- <div class="keys_block_small">-->
<a href="<?=Url::to(['/'.$model->url])?>"> <!-- <a href="--><?//=Url::to(['/'.$model->url])?><!--">-->
<img src="<?= $model->preview ?>" height="338" width="455" alt=""> <!-- <img src="--><?//= $model->preview ?><!--" height="338" width="455" alt="">-->
<div class="keys_small_title"<?if($model->custom==CoContent::CUSTOM_WHITE){?>style="color:#fff;"<?}?>><?=$model->lang->title?></div> <!-- <div class="keys_small_title"--><?//if($model->custom==CoContent::CUSTOM_WHITE){?><!--style="color:#fff;"--><?//}?><!-->--><?//=$model->lang->title?><!--</div>-->
</a> <!-- </a>-->
<!-- <div class="keys_small_foot">-->
<!-- <a href="--><?//= Url::to(['/'.$model->url]) ?><!--" class="keys_small_btn_more"><span>--><?//=Yii::t('case', 'Read more')?><!--</span></a>-->
<!-- <a class="keys_small_tags">--><?//= $model->previewType->tag ? "#{$model->previewType->tag}" : "" ?><!--</a>-->
<!-- </div>-->
<!-- </div>-->
<a href="<?=Url::to(['/'.$model->url])?>" class="keys_block_small">
<img src="<?=$model->preview?>" height="338" width="455">
<div class="keys_small_title" <?if($model->custom==CoContent::CUSTOM_WHITE){?>style="color:#fff;"<?}?>><?=$model->lang->title?></div>
<div class="keys_small_foot"> <div class="keys_small_foot">
<a href="<?= Url::to(['/'.$model->url]) ?>" class="keys_small_btn_more"><span><?=Yii::t('case', 'Read more')?></span></a> <div class="keys_small_btn_more">
<a class="keys_small_tags"><?= $model->previewType->tag ? "#{$model->previewType->tag}" : "" ?></a> <span><?=Yii::t('case', 'Read more')?></span>
</div> </div>
</div> </div>
</a>
</div> </div>
<? elseif($model->previewType->type == CasesPreviewType::PREVIEW_RECTANGLE): ?> <? elseif($model->previewType->type == CasesPreviewType::PREVIEW_RECTANGLE): ?>
<div class="col-md-12 col-xs-12 col-sm-12"> <div class="col-md-12 col-xs-12 col-sm-12">
<div class="keys_block_big"> <a href="<?=Url::to(['/'.$model->url])?>" class="keys_block_small big">
<a href="<?=Url::to(['/'.$model->url])?>"> <img src="<?=$model->preview?>" height="338" width="940">
<picture> <div class="keys_small_title" <?if($model->custom==CoContent::CUSTOM_WHITE){?>style="color:#fff;"<?}?>><?=$model->lang->title?></div>
<source srcset="images/keys_big338.jpg" media="(max-width: 768px)">
<img src="images/keys_big1.jpg" height="338" width="940" alt="">
</picture>
<div class="keys_small_title"<?if($model->custom==CoContent::CUSTOM_WHITE){?>style="color:#fff;"<?}?>><?=$model->lang->title?></div>
<div class="keys_small_foot"> <div class="keys_small_foot">
<a href="<?=Url::to(['/'.$model->url])?>" class="keys_small_btn_more"><span><?=Yii::t('case', 'Read more')?></span></a> <div class="keys_small_btn_more">
<a class="keys_small_tags"><?= $model->previewType->tag ? "#{$model->previewType->tag}" : "" ?></a> <span><?=Yii::t('case', 'Read more')?></span>
</div> </div>
</a>
</div> </div>
</a>
<!-- <div class="keys_block_big">-->
<!-- <a href="--><?//=Url::to(['/'.$model->url])?><!--">-->
<!-- <picture>-->
<!-- <source srcset="images/keys_big338.jpg" media="(max-width: 768px)">-->
<!-- <img src="images/keys_big1.jpg" height="338" width="940" alt="">-->
<!-- </picture>-->
<!-- <div class="keys_small_title"--><?//if($model->custom==CoContent::CUSTOM_WHITE){?><!--style="color:#fff;"--><?//}?><!-->--><?//=$model->lang->title?><!--</div>-->
<!-- <div class="keys_small_foot">-->
<!-- <a href="--><?//=Url::to(['/'.$model->url])?><!--" class="keys_small_btn_more"><span>--><?//=Yii::t('case', 'Read more')?><!--</span></a>-->
<!-- <a class="keys_small_tags">--><?//= $model->previewType->tag ? "#{$model->previewType->tag}" : "" ?><!--</a>-->
<!-- </div>-->
<!-- </a>-->
<!-- </div>-->
</div> </div>
<? endif ?> <? endif ?>
<?php endforeach; ?> <?php endforeach; ?>
......
...@@ -10957,6 +10957,9 @@ h6 { ...@@ -10957,6 +10957,9 @@ h6 {
-ms-transition: all 0.2s linear; -ms-transition: all 0.2s linear;
transition: all 0.2s linear; transition: all 0.2s linear;
} }
.keys_block_small.big{
width: 940px;
}
@media only screen and (min-width: 768px) and (max-width: 970px) { @media only screen and (min-width: 768px) and (max-width: 970px) {
.keys_block_small { .keys_block_small {
width: 100%; width: 100%;
...@@ -11105,36 +11108,36 @@ h6 { ...@@ -11105,36 +11108,36 @@ h6 {
transition: all 0.2s linear; transition: all 0.2s linear;
} }
@media only screen and (min-width: 768px) and (max-width: 970px) { @media only screen and (min-width: 768px) and (max-width: 970px) {
.keys_block_big { .keys_block_big, .keys_block_small.big {
width: 100%; width: 100%;
height: auto; height: auto;
} }
.keys_block_big img { .keys_block_big, .keys_block_small.big img {
max-width: 100%; max-width: 100%;
height: auto; height: auto;
} }
} }
@media only screen and (min-width: 480px) and (max-width: 767px) { @media only screen and (min-width: 480px) and (max-width: 767px) {
.keys_block_big { .keys_block_big, .keys_block_small.big {
width: 100%; width: 100%;
height: auto; height: auto;
} }
.keys_block_big img { .keys_block_big img, .keys_block_small.big img {
max-width: 100%; max-width: 100%;
height: auto; height: auto;
} }
} }
@media only screen and (min-width: 320px) and (max-width: 479px) { @media only screen and (min-width: 320px) and (max-width: 479px) {
.keys_block_big { .keys_block_big, .keys_block_small.big {
width: 100%; width: 100%;
height: auto; height: auto;
} }
.keys_block_big img { .keys_block_big img, .keys_block_small.big img {
max-width: 100%; max-width: 100%;
height: auto; height: auto;
} }
} }
.keys_block_big .keys_small_foot { .keys_block_big .keys_small_foot, .keys_block_small.big .keys_small_foot{
width: 100%; width: 100%;
height: 80px; height: 80px;
position: absolute; position: absolute;
...@@ -11147,7 +11150,8 @@ h6 { ...@@ -11147,7 +11150,8 @@ h6 {
-ms-transition: all 0.2s linear; -ms-transition: all 0.2s linear;
transition: all 0.2s linear; transition: all 0.2s linear;
} }
.keys_block_big .keys_small_foot a.keys_small_tags { .keys_block_big .keys_small_foot a.keys_small_tags,
.keys_block_small.big .keys_small_foot a.keys_small_tags{
display: inline-block; display: inline-block;
float: right; float: right;
line-height: 80px; line-height: 80px;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment