FIX отобращение ленты на маленьком экране

This commit is contained in:
Krivchikov Dmitry 2016-04-06 22:57:41 +03:00
parent a1223ff6bf
commit be71388a3f
2 changed files with 11 additions and 5 deletions

View File

@ -171,4 +171,8 @@ img.imageInArticle {border: solid 3px white;max-width: 100%;}
@media screen and (max-width:400px) { @media screen and (max-width:400px) {
a.randomPointAImg {margin: 0 0 10px 0; display: block;width: 100%;text-align: center;} a.randomPointAImg {margin: 0 0 10px 0; display: block;width: 100%;text-align: center;}
div.infoCard div.photoContainer {float: none; margin: 0 auto 10px auto;} div.infoCard div.photoContainer {float: none; margin: 0 auto 10px auto;}
div.container.feed div.row.elements div.element {width: 100%;}
div.container.feed div.row.elements div.element a.imgContainer {margin: 0 0 10px 0; display: block; width: 100%;text-align: center;}
div.container.feed div.row.elements div.element a img.elementImg {margin: 0; display: inline;max-width: 100%; float: none;}
} }

View File

@ -1,5 +1,5 @@
<div id="pageSmoothBackground" style="background-image: url(<?= current($points)->getImg('middle') ?>);"></div> <div id="pageSmoothBackground" style="background-image: url(<?= current($points)->getImg('middle') ?>);"></div>
<div class="container"> <div class="container feed">
<div class="row elements"> <div class="row elements">
<div class="col-md-2"> <div class="col-md-2">
<h4 class="onlySmallScreen text-center">Новости</h4> <h4 class="onlySmallScreen text-center">Новости</h4>
@ -10,13 +10,14 @@
</div> </div>
<?php endforeach;?> <?php endforeach;?>
</div> </div>
<hr class="onlySmallScreen"/>
<div class="col-md-5"> <div class="col-md-5">
<h4 class="onlySmallScreen text-center">Точки</h4> <h4 class="onlySmallScreen text-center">Точки</h4>
<?php foreach ($points as $item) : ?> <?php foreach ($points as $item) : ?>
<div class="element points"> <div class="element points">
<h4><?= $item->name ?></h4> <h4><?= $item->name ?></h4>
<a href="/point/<?= $item->id ?>"> <a href="/point/<?= $item->id ?>" class="imgContainer">
<img src="<?= $item->getImg() ?>"/> <img src="<?= $item->getImg() ?>" class="elementImg"/>
</a> </a>
<?= mb_substr($item->description, 0, 400, 'UTF-8') ?> <?= mb_substr($item->description, 0, 400, 'UTF-8') ?>
<a href="/point/<?= $item->id ?>"><nobr>читать далее »</nobr></a> <a href="/point/<?= $item->id ?>"><nobr>читать далее »</nobr></a>
@ -25,14 +26,15 @@
<br/> <br/>
<a href="/page/points/"><h4 style="text-align: center;">У нас есть больше новых точек!</h4></a> <a href="/page/points/"><h4 style="text-align: center;">У нас есть больше новых точек!</h4></a>
</div> </div>
<hr class="onlySmallScreen"/>
<div class="col-md-5"> <div class="col-md-5">
<h4 class="onlySmallScreen text-center">Статьи</h4> <h4 class="onlySmallScreen text-center">Статьи</h4>
<?php foreach ($articles as $item) : ?> <?php foreach ($articles as $item) : ?>
<div class="element articles"> <div class="element articles">
<h4><?= $item->title ?></h4> <h4><?= $item->title ?></h4>
<?php if($item->hasImg()): ?> <?php if($item->hasImg()): ?>
<a href="/article/<?= $item->id ?>"> <a href="/article/<?= $item->id ?>" class="imgContainer">
<img src="<?= $item->getImg() ?>"/> <img src="<?= $item->getImg() ?>" class="elementImg"/>
</a> </a>
<?php endif; ?> <?php endif; ?>
<?= mb_substr(Markdown::getClear($item->text), 0, 400, 'UTF-8') ?> <?= mb_substr(Markdown::getClear($item->text), 0, 400, 'UTF-8') ?>