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

151 lines
3.1 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 div */
.hours-div {
background-color: #bbb;
height: 150px;
text-align: center;
padding-top: 35px;
}
/* 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++) {
var targetDate = new Date(h[i]["Date"] + "T00:00:00.000-05:00");
var today = new Date();
if (targetDate.getFullYear() === today.getFullYear() &&
targetDate.getMonth() === today.getMonth() &&
targetDate.getDate() === today.getDate()) {
document.getElementById('hours0').innerHTML = targetDate.toLocaleDateString("en-US", options) + " - " + h[i]["Hours"]
start = true;
count = 1;
};
if (start === true && count < 4) {
document.getElementById('hours' + count).innerHTML = targetDate.toLocaleDateString("en-US", options) + " - " + h[i]["Hours"]
count++
}
};
};
</script>