Skip to content

Commit 6594e18

Browse files
authored
Fix detail page layout (#162)
* fix detail view page layout * fix styling
1 parent 66ad1e6 commit 6594e18

File tree

3 files changed

+20
-29
lines changed

3 files changed

+20
-29
lines changed

src/widget/css/general.css

Lines changed: 11 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@
4848
-webkit-overflow-scrolling: touch;
4949
}
5050

51+
#carouselView { height: 56.25vw !important; }
52+
5153
#carouselView img {
5254
width: 100%;
5355
}
@@ -283,7 +285,6 @@ a[href^="https://maps.google.com/maps"]{display:none !important}
283285

284286
.detail-info {
285287
width: 65%;
286-
padding-left: 3%;
287288
}
288289

289290
.map-holder {
@@ -330,7 +331,7 @@ a[href^="https://maps.google.com/maps"]{display:none !important}
330331

331332
.map-details .address {
332333
font-weight: 300;
333-
font-size: 11px;
334+
font-size: 12px;
334335
line-height: 1.3;
335336
color: #121212 !important;
336337
}
@@ -512,15 +513,13 @@ a[href^="https://maps.google.com/maps"]{display:none !important}
512513
border: none;
513514
color: #fff;
514515
font-size: 15px;
515-
border-radius: 100px;
516+
border-radius: 4px;
516517
padding: 10px 0;
517518
float: left;
518519
cursor: pointer;
519520
}
520521
#bookmarkBtn {
521-
font-size: 7vw;
522-
margin: auto;
523-
left: 2%;
522+
font-size: 24px;
524523
}
525524
#distance-holder {
526525
min-width: 14%;
@@ -533,7 +532,7 @@ a[href^="https://maps.google.com/maps"]{display:none !important}
533532
border: none;
534533
color: #fff;
535534
font-size: 15px;
536-
border-radius: 100px;
535+
border-radius: 4px;
537536
padding: 10px 0;
538537
float: left;
539538
cursor: pointer;
@@ -573,10 +572,12 @@ a[href^="https://maps.google.com/maps"]{display:none !important}
573572
margin-bottom: 15px;
574573
}
575574

575+
@media only screen and (min-width : 768px){
576+
#bookmarkBtn { font-size: 32px; }
577+
}
578+
576579
@media only screen and (min-width : 768px) and (max-width : 1024px)
577-
{
578-
#bookmarkBtn { font-size: 3.5vw; }
579-
580+
{
580581
.col-image { height: 160px; width: 160px }
581582
.detail-image { width: 140px; height: 140px; }
582583

@@ -588,17 +589,12 @@ a[href^="https://maps.google.com/maps"]{display:none !important}
588589
.slideInDown { height: 155px; }
589590
.map-holder { height: 400px; }
590591

591-
#carouselView { height: 400px !important; }
592-
#carouselView img { height: 100%; }
593-
594592
.distance-indicator .distance { font-size: 16px; color: black; }
595593
.distance-indicator .arrow { height: 30px; }
596594
}
597595

598596
@media only screen and (min-width: 1024px) and (max-width: 1366px) and (-webkit-min-pixel-ratio: 2) {
599597

600-
#bookmarkBtn { font-size: 3.5vw; }
601-
602598
.col-image { height: 180px; width: 180px }
603599
.detail-image { width: 160px; height: 160px; }
604600

@@ -609,9 +605,6 @@ a[href^="https://maps.google.com/maps"]{display:none !important}
609605
.sidenav { height: 30vh; }
610606
.map-holder { height: 400px; }
611607

612-
#carouselView { height: 400px !important; }
613-
#carouselView img { height: 100%; }
614-
615608
.slideInDown { height: 175px; }
616609
.loryFrame { height: inherit; }
617610

src/widget/js/detail.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -229,8 +229,6 @@ window.detailView = {
229229
*/
230230
if (place.carousel && place.carousel.length) {
231231
let targetNode = document.getElementById('carouselView');
232-
// Set carousel's height to a 16:9 aspect ratio
233-
targetNode.style.height = `${window.innerWidth / 16 * 9}px`;
234232
new components.carousel.view({
235233
selector: targetNode,
236234
items: place.carousel

src/widget/templates/detail.hbs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@
66
<div class="detail-info">
77
<div class="title">{{title}}</div>
88
<div class="address">{{address}}</div>
9-
</div>
10-
<div id="distance-holder">
11-
{{#if distance }}<img class="arrow" src="./images/arrow.png"> <span
12-
class="distance">{{distance}}</span>{{/if}}
9+
<div id="distance-holder">
10+
{{#if distance }}<img class="arrow" src="./images/arrow.png"> <span
11+
class="distance">{{distance}}</span>{{/if}}
12+
</div>
1313
</div>
1414
{{#if isBookmarkingAllowed}}
1515
<div id="bookmarkBtn" class="glyphicon glyphicon-star"></div>
16-
{{/if}}
16+
{{/if}}
1717
</div>
1818
</div>
1919
</div>
@@ -59,10 +59,10 @@
5959
<div class="detail-info">
6060
<div class="title">{{title}}</div>
6161
<div class="address">{{address}}</div>
62-
</div>
63-
<div id="distance-holder">
64-
{{#if distance }}<img class="arrow" src="./images/arrow.png"> <span
65-
class="distance">{{distance}}</span>{{/if}}
62+
<div id="distance-holder">
63+
{{#if distance }}<img class="arrow" src="./images/arrow.png"> <span
64+
class="distance">{{distance}}</span>{{/if}}
65+
</div>
6666
</div>
6767
{{#if isBookmarkingAllowed}}
6868
<div id="bookmarkBtn" class="glyphicon glyphicon-star"></div>

0 commit comments

Comments
 (0)