FIX адаптивный размер картинок
This commit is contained in:
parent
c1aab761d7
commit
3215525875
|
|
@ -53,4 +53,25 @@
|
|||
<?= self::renderPartial('metrika.php', array(), true) ?>
|
||||
<?= self::renderPartial('ganalytics.php', array(), true) ?>
|
||||
</body>
|
||||
<script lang="javascript">
|
||||
function setSizeForAdditional(){
|
||||
width = $('.col-md-12').width()/6-4;
|
||||
|
||||
if(width < 100)
|
||||
width = $('.col-md-12').width()/3-4;
|
||||
|
||||
height = width/4*3;
|
||||
|
||||
$('.pagePoinsNearCards').width(width);
|
||||
$('.pagePoinsNearCardsImg').width(width);
|
||||
$('.pagePoinsNearCards').height(height);
|
||||
$('.pagePoinsNearCardsImg').height(height);
|
||||
}
|
||||
|
||||
setSizeForAdditional();
|
||||
|
||||
$( window ).resize(function() {
|
||||
setSizeForAdditional();
|
||||
});
|
||||
</script>
|
||||
</html>
|
||||
|
|
@ -86,9 +86,7 @@
|
|||
<?php if (empty($closestPoints)): ?>
|
||||
нет известных нам точек.
|
||||
<?php else: ?>
|
||||
<?php foreach ($closestPoints as $cPoint): ?>
|
||||
<a href="/page/point/id/<?= $cPoint->id ?>" class="pagePoinsNearCards"><img src="<?= $cPoint->getImg() ?>" title="<?= $cPoint->name ?>" class="pagePoinsNearCardsImg"/></a>
|
||||
<?php endforeach; ?>
|
||||
<?php foreach ($closestPoints as $cPoint): ?><a href="/page/point/id/<?= $cPoint->id ?>" class="pagePoinsNearCards"><img src="<?= $cPoint->getImg() ?>" title="<?= $cPoint->name ?>" class="pagePoinsNearCardsImg"/></a><?php endforeach; ?>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -96,9 +94,7 @@
|
|||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<h3 style="margin-top: 0;">Похожие:</h3>
|
||||
<?php foreach ($similarPoints as $sPoint): ?>
|
||||
<a href="/page/point/id/<?= $sPoint->id ?>" class="pagePoinsNearCards"><img src="<?= $sPoint->getImg() ?>" title="<?= $sPoint->name ?>" class="pagePoinsNearCardsImg"/></a>
|
||||
<?php endforeach; ?>
|
||||
<?php foreach ($similarPoints as $sPoint): ?><a href="/page/point/id/<?= $sPoint->id ?>" class="pagePoinsNearCards"><img src="<?= $sPoint->getImg() ?>" title="<?= $sPoint->name ?>" class="pagePoinsNearCardsImg"/></a><?php endforeach; ?>
|
||||
</div>
|
||||
</div>
|
||||
<hr/>
|
||||
|
|
|
|||
|
|
@ -87,7 +87,7 @@ div#box {background-image: url('/img/back.png'); background-repeat: no-repeat; b
|
|||
/* ------------- PAGE --------------------*/
|
||||
.coords-container {text-align: right; margin-bottom: 20px; color: #777;font-size: 0.9em;}
|
||||
#pageSmoothBackground {z-index: -100; width: 106%; height: 106%; position: fixed; top: -3%; left: -3%; background-size: cover; -webkit-filter: blur(5px);}
|
||||
.pagePoinsNearCards {display: inline-block; width: 186px; height: 139px; overflow: hidden;}
|
||||
.pagePoinsNearCards {display: inline-block; overflow: hidden; padding: 0 2px 4px 2px;width: 186px; height: 139px;}
|
||||
.pagePoinsNearCardsImg {width: 186px; height: 139px;}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue