MAPG-137 place static maps into container to avoid large layout shifts
This commit is contained in:
parent
61ce915ec0
commit
86f05f7738
@ -26,8 +26,15 @@ div.mapItem>div.title>p.title {
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
div.mapItem>img {
|
||||
div.mapItem>div.imgContainer {
|
||||
width: 100%;
|
||||
padding-top: 50%;
|
||||
background: #cccccc;
|
||||
}
|
||||
|
||||
div.mapItem>div.imgContainer>img {
|
||||
width: 100%;
|
||||
margin-top: -50%
|
||||
}
|
||||
|
||||
div.mapItem>div.inner {
|
||||
|
@ -13,7 +13,9 @@ $cssFiles = [
|
||||
<div class="title">
|
||||
<p class="title"><?= $map['name'] ?></p>
|
||||
</div>
|
||||
<img src="https://maps.googleapis.com/maps/api/staticmap?size=350x175&visible=<?= $map['bound_south_lat'] . ',' . $map['bound_west_lng'] . '|' . $map['bound_north_lat'] . ',' . $map['bound_east_lng'] ?>&key=<?= $_ENV['GOOGLE_MAPS_JS_API_KEY'] ?>">
|
||||
<div class="imgContainer">
|
||||
<img src="https://maps.googleapis.com/maps/api/staticmap?size=350x175&visible=<?= $map['bound_south_lat'] . ',' . $map['bound_west_lng'] . '|' . $map['bound_north_lat'] . ',' . $map['bound_east_lng'] ?>&key=<?= $_ENV['GOOGLE_MAPS_JS_API_KEY'] ?>" alt="Map area">
|
||||
</div>
|
||||
<div class="inner">
|
||||
<div class="info">
|
||||
<p>
|
||||
|
Loading…
Reference in New Issue
Block a user