Skip to content

Commit 5b60881

Browse files
committed
hidden open hours when empty
1 parent b7227ae commit 5b60881

File tree

3 files changed

+15
-8
lines changed

3 files changed

+15
-8
lines changed

css/facility.css

+5-3
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,8 @@ body {
1212
vertical-align: bottom;
1313
}
1414
.card {
15-
width: 100%;
16-
max-width: 700px;
17-
margin-top: 60px;
15+
width: 100%;
16+
margin-top: 60px;
1817
border-radius: 4px;
1918
background-color: #ffffff;
2019
box-shadow: 0 6px 8px 0 rgba(0, 0, 0, 0.1);
@@ -60,6 +59,9 @@ span {
6059
text-align: left;
6160
color: #000000;
6261
}
62+
#facility_openHours_div {
63+
visibility: hidden;
64+
}
6365
.facility-name {
6466
font-family: 'Signika', sans-serif;
6567
font-size: 25px;

facility.html

+4-4
Original file line numberDiff line numberDiff line change
@@ -81,14 +81,14 @@
8181
</div>
8282
</div>
8383
<div class="row mt-3">
84-
<div class="col-sm">
85-
<span>Horários</span>
86-
<p class="numbers" id="facility_openHours" style="white-space: pre"></p>
87-
</div>
8884
<div class="col-sm">
8985
<span>Contato</span>
9086
<p class="numbers" id="facility_telephone"></p>
9187
</div>
88+
<div class="col-sm" id="facility_openHours_div">
89+
<span>Horários</span>
90+
<p class="numbers" id="facility_openHours" style="white-space: pre"></p>
91+
</div>
9292
</div>
9393
</div>
9494
</div>

js/facility.js

+6-1
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,12 @@ document.addEventListener('DOMContentLoaded', function() {
104104
types.appendChild(img);
105105
}
106106

107-
document.getElementById("facility_openHours").textContent = openHours;
107+
if (openHours) {
108+
document.getElementById("facility_openHours").textContent = openHours;
109+
document.getElementById("facility_openHours_div").style.visibility = "block"
110+
} else {
111+
document.getElementById("facility_openHours_div").style.visibility = "hidden"
112+
}
108113
document.getElementById("facility_telephone").textContent = data.telephone;
109114

110115
var uluru = { lat: data.location.coordinates.latitude, lng: data.location.coordinates.longitude };

0 commit comments

Comments
 (0)