Пооправил вёрстку карточки точки. На маленьком разрешении фотка центруется. На любом разрешении кнопки по центру

This commit is contained in:
Krivchikov Dmitry 2016-03-21 01:04:07 +03:00
parent d61aa7897c
commit 0842727dd5
2 changed files with 4 additions and 3 deletions

View File

@ -14,7 +14,7 @@ html body h3 {font-family: Ubuntu, sans-serif;}
div#map {width: 100%; position: absolute; top: 0; bottom: 0px;} div#map {width: 100%; position: absolute; top: 0; bottom: 0px;}
body.openBox div#map {right: 250px;} body.openBox div#map {right: 250px;}
div.clear {clear: both;} div.clear {clear: both;}
div.infoCard {text-align: justify;} div.infoCard {text-align: justify; height: 258px; overflow-y: auto; padding-right: 4px;}
div.infoCard h3 {text-align: center; margin-top: 0;} div.infoCard h3 {text-align: center; margin-top: 0;}
div.infoCard div.photoContainer {position: relative; width: 200px;height: 150px;float: left;margin-right: 10px;margin-bottom: 10px; background-color: #fdfdfd; } div.infoCard div.photoContainer {position: relative; width: 200px;height: 150px;float: left;margin-right: 10px;margin-bottom: 10px; background-color: #fdfdfd; }
div.infoCard img {width: 200px; margin: 0; cursor: pointer;} div.infoCard img {width: 200px; margin: 0; cursor: pointer;}
@ -167,4 +167,5 @@ 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;}
} }

View File

@ -322,7 +322,7 @@ function drawInfoPopup(id, showPopup, doNotPushToHistory) {
description = '<div class="infoCard">' + '<h3>' + onModerate + data.name + '</h3>' + photos; description = '<div class="infoCard">' + '<h3>' + onModerate + data.name + '</h3>' + photos;
description += data.descriptionHtml; description += data.descriptionHtml;
description += '</div><div class="clear"></div>'; description += '</div><div class="clear"></div>';
description += '<div class="btn-group control">'; description += '<div class="btn-wrapper text-center"><div class="btn-group control">';
description += '<a type="button" class="btn btn-default" href="/point/' + id + '"><span class="glyphicon glyphicon-eye-open"></span> <span class="label">Подробнее</span></a>'; description += '<a type="button" class="btn btn-default" href="/point/' + id + '"><span class="glyphicon glyphicon-eye-open"></span> <span class="label">Подробнее</span></a>';
description += '<button type="button" class="btn btn-default" onclick="addToRoute(' + id + ')"><span class="glyphicon glyphicon-map-marker"></span> <span class="label">В маршрут</span></button>'; description += '<button type="button" class="btn btn-default" onclick="addToRoute(' + id + ')"><span class="glyphicon glyphicon-map-marker"></span> <span class="label">В маршрут</span></button>';
description += '<button type="button" class="btn btn-default" onclick="addRemoveLike(' + id + ')"><span id="myLikesButton" class="glyphicon glyphicon-' + (data.iLike ? 'ok' : 'thumbs-up') + '"></span> <span class="label">Нравится</span></button>'; description += '<button type="button" class="btn btn-default" onclick="addRemoveLike(' + id + ')"><span id="myLikesButton" class="glyphicon glyphicon-' + (data.iLike ? 'ok' : 'thumbs-up') + '"></span> <span class="label">Нравится</span></button>';
@ -336,7 +336,7 @@ function drawInfoPopup(id, showPopup, doNotPushToHistory) {
editPoint(id); editPoint(id);
} }
} }
description += '</div>'; description += '</div></div>';
maxWidth = $(window).width() < 500 ? ($(window).width() - 48) : 500; maxWidth = $(window).width() < 500 ? ($(window).width() - 48) : 500;
maxHeight = $(window).height() < 300 ? $(window).height() : 300; maxHeight = $(window).height() < 300 ? $(window).height() : 300;