improve hours display

This commit is contained in:
Mark Eaton
2021-03-10 09:49:33 -05:00
parent f806752c2d
commit 04ee32f531
2 changed files with 13 additions and 25 deletions
+8 -6
View File
@@ -161,7 +161,7 @@ img {
}
.hours-panel-body {
padding: 10px 5px 10px 5px;
padding: 10px 5px 0px 5px;
}
.padding-0 {
@@ -185,6 +185,8 @@ img {
.panel-outline-color {
border: solid #555 1px;
font-size: 1.2em;
line-height: 1.4em;
}
.vertical-align {
@@ -294,14 +296,14 @@ window.onload = function () {
if (targetDate.getFullYear() === today.getFullYear() &&
targetDate.getMonth() === today.getMonth() &&
targetDate.getDate() === today.getDate()) {
document.getElementById('hours0').innerHTML = "<p><strong>Today</strong><br />" + targetDate.toLocaleDateString("en-US", options_date) + "</p><p>" + h[i].Hours + "</p>";
document.getElementById('hours0').innerHTML = "<p><strong>Today</strong><br />" + targetDate.toLocaleDateString("en-US", options_date) + "<br />" + h[i].Hours + "</p>";
var start = true;
var count = 1;
} else if (start === true && count < 5 && h[i].Hours === "Closed" ) {
document.getElementById('hours' + count).innerHTML = "<span style='color:#666;'><p>" + targetDate.toLocaleDateString("en-US", options_weekday) + "<br />" + targetDate.toLocaleDateString("en-US", options_date) + "</p><p>" + h[i].Hours + "</p></span>";
} else if (start === true && count < 3 && h[i].Hours === "Closed" ) {
document.getElementById('hours' + count).innerHTML = "<span style='color:#666;'><p>" + targetDate.toLocaleDateString("en-US", options_weekday) + "<br />" + targetDate.toLocaleDateString("en-US", options_date) + "<br />" + h[i].Hours + "</p></span>";
count++;
} else if (start === true && count < 5 && h[i].Hours != "Closed") {
document.getElementById('hours' + count).innerHTML = "<p>" + targetDate.toLocaleDateString("en-US", options_weekday) + "<br />" + targetDate.toLocaleDateString("en-US", options_date) + "</p><p>" + h[i].Hours + "</p>";
} else if (start === true && count < 3 && h[i].Hours != "Closed") {
document.getElementById('hours' + count).innerHTML = "<p>" + targetDate.toLocaleDateString("en-US", options_weekday) + "<br />" + targetDate.toLocaleDateString("en-US", options_date) + "<br />" + h[i].Hours + "</p>";
count++;
}
}