Files
Kingsborough-LibGuide/groups/new-homepage-3/homepage3-js-css.html
T
2021-02-04 16:06:14 -05:00

152 lines
3.3 KiB
HTML

<style>
/* style navbar */
.navbar-default {
background-color: #bbb;
border: none;
font-size: 1.4em;
color: black;
margin-top: -15px;
margin-bottom: 28px;
border-radius: 0px;
}
.navbar-default .navbar-nav>li>a {
color: black;
}
.faux-card {
margin-left: 16px;
}
/* style jumbotron */
.jumbotron {
color: white;
background-color: #003466;
border-radius: 0px !important;
}
.link-list {
font-size: 2em;
}
/* style for nav by the jumbotron */
.nav-by-jumbotron {
margin-top: -4px;
}
.nav-divs-by-jumbotron {
background-color: #bbb;
margin: 4px 0px;
padding: 8px;
font-size: 1.5em;
text-align: center;
}
/* style the panels with the text content */
.panel>.show-panel {
background-color: #003466;
text-align: center;
}
.hide-body-border {
border: none;
box-shadow: none;
}
.glyphicon-panel-title {
font-size: 2em;
}
.content-panel-title {
color: white;
font-size: 2em;
}
.panel-heading {
padding: 2px;
}
/* style the gallery */
img {
max-height: 350px !important;
object-fit: contain;
margin: 0px;
}
.s-lib-public-side-header {
display: none;
}
.slick-active {
outline: 0;
}
/* style the hours */
.hours {
text-align:right;
border-top: solid white 0px !important;
}
.date {
border-top: solid white 0px !important;
}
/* style the yamm menu */
.dropdown-margin {
margin-right: 50px;
}
/*!
* Yamm!3 - Yet another megamenu for Bootstrap 3
* http://geedmo.github.com/yamm3
*
* @geedmo - Licensed under the MIT license
*/
.yamm .nav,
.yamm .collapse,
.yamm .dropup,
.yamm .dropdown {
position: static;
}
.yamm .container {
position: relative;
}
.yamm .dropdown-menu {
left: auto;
}
.yamm .yamm-content {
padding: 20px 30px;
}
.yamm .dropdown.yamm-fw .dropdown-menu {
left: 0;
right: 0;
}
/* End of Yamm */
</style>
<script type="text/javascript" src="//libapps.s3.amazonaws.com/sites/2365/include/hours.js"></script>
<script type="text/javascript">
window.onload = function () {
const h = JSON.parse(hours)
const options = { weekday: 'long', year: 'numeric', month: 'long', day: 'numeric' };
for (var i = 0; i < h.length; i++) {
let targetDate = new Date(h[i]["Date"] + "T00:00:00.000-05:00");
let today = new Date();
if (targetDate.getFullYear() === today.getFullYear() &&
targetDate.getMonth() === today.getMonth() &&
targetDate.getDate() === today.getDate()) {
document.getElementById('hours0').innerHTML = "<td class='hours col-xs-7'>" + targetDate.toLocaleDateString("en-US", options) + "</td><td class='date col-xs-5'>" + h[i]["Hours"] + "</td>"
var start = true;
var count = 1
} else if (start === true && count < 7) {
document.getElementById('hours' + count).innerHTML = "<td class='hours col-xs-7'>" + targetDate.toLocaleDateString("en-US", options) + "</td><td class='date col-xs-5'>" + h[i]["Hours"] + "</td>"
count++
}
};
};
</script>