further progress toward new hours component
This commit is contained in:
@@ -65,7 +65,7 @@ body {
|
||||
#corona-alert {
|
||||
text-align: center;
|
||||
background-color: #faf870;
|
||||
padding: 5px 15px;
|
||||
padding: 5px 50px;
|
||||
cursor: pointer;
|
||||
}
|
||||
#corona-alert-text {
|
||||
@@ -74,7 +74,7 @@ body {
|
||||
}
|
||||
|
||||
/* style navbar */
|
||||
nav.navbar-default.yamm {
|
||||
nav.navbar-default.main-nav-container {
|
||||
background-color: white;
|
||||
border: none;
|
||||
font-size: 1.4em;
|
||||
@@ -94,14 +94,13 @@ nav.navbar-default.yamm {
|
||||
.ga-main-navbar {
|
||||
font-size: 1.3em;
|
||||
}
|
||||
.faux-card {
|
||||
margin-left: 16px;
|
||||
}
|
||||
#dropdownMenu1 { border-radius: 0; }
|
||||
a.searchmenu { color: var(--text); }
|
||||
.highlight-menu-item { padding: 2px; }
|
||||
a.searchmenu {
|
||||
color: var(--text);
|
||||
text-decoration: none;
|
||||
}
|
||||
.highlight-menu-item { padding: 5px; }
|
||||
.highlight-menu-item:hover {
|
||||
background-color: #eee;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
@@ -129,6 +128,27 @@ a.searchmenu { color: var(--text); }
|
||||
margin-right: -2px;
|
||||
}
|
||||
|
||||
.zero-margin { margin: -2px; }
|
||||
|
||||
/* add flex so that blue box-shadows line up */
|
||||
#flex-search-form {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
}
|
||||
.inherit-height-from-flex { height: inherit; }
|
||||
|
||||
/* shadow for the search bar */
|
||||
#blue-border1 {
|
||||
box-shadow: 0 5px 0 var(--kbccblue), 0 -5px 0 var(--kbccblue), -5px -5px 0 var(--kbccblue), -5px 5px 0 var(--kbccblue);
|
||||
}
|
||||
#blue-border2 {
|
||||
box-shadow: 0 -5px 0 var(--kbccblue), 0 5px 0 var(--kbccblue);
|
||||
}
|
||||
#blue-border3 {
|
||||
box-shadow: 0 5px 0 var(--kbccblue), 0 -5px 0 var(--kbccblue), 5px -5px 0 var(--kbccblue), 5px 5px 0 var(--kbccblue);
|
||||
}
|
||||
|
||||
/* style for nav by the jumbotron */
|
||||
.nav-divs-by-jumbotron {
|
||||
text-align: center;
|
||||
@@ -227,10 +247,6 @@ a.no-underline { text-decoration: none; }
|
||||
.open > a > .fancy-caret { margin-bottom: -4px; vertical-align: -4px; display: inline-block; }
|
||||
.open > a > .caret-text { vertical-align: -1px; }
|
||||
|
||||
/* additional styling for OneSearch dropdown */
|
||||
.yamm4 { max-width: 460px; }
|
||||
#yamm4-margins { margin: -15px 0; }
|
||||
|
||||
/* style footer */
|
||||
#orange-line {
|
||||
height:10px;
|
||||
@@ -259,9 +275,8 @@ a.no-underline { text-decoration: none; }
|
||||
max-width: 100%;
|
||||
max-height: 150px;
|
||||
}
|
||||
nav.navbar-default.yamm { margin-top: -20px; }
|
||||
nav.navbar-default.main-nav-container { margin-top: -20px; }
|
||||
.form-width { width: 210px; }
|
||||
.zero-margin { margin: 7px auto; }
|
||||
.nav-by-jumbotron { margin-top: 40px !important; }
|
||||
#main-blue-footer { min-height: 450px; }
|
||||
.library-address { float: left; }
|
||||
@@ -278,31 +293,10 @@ a.no-underline { text-decoration: none; }
|
||||
|
||||
@media only screen and (max-width: 768px) {
|
||||
#login-text { display: none; }
|
||||
#defineYourSearch { display: none; }
|
||||
}
|
||||
|
||||
@media only screen and (min-width: 768px) {
|
||||
.zero-margin { margin: -2px; }
|
||||
|
||||
/* add flex so that blue box-shadows line up */
|
||||
#flex-search-form {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
}
|
||||
.inherit-height-from-flex {
|
||||
height: inherit;
|
||||
}
|
||||
|
||||
/* shadow for the search bar */
|
||||
#blue-border1 {
|
||||
box-shadow: 0 5px 0 var(--kbccblue), 0 -5px 0 var(--kbccblue), -5px -5px 0 var(--kbccblue), -5px 5px 0 var(--kbccblue);
|
||||
}
|
||||
#blue-border2 {
|
||||
box-shadow: 0 -5px 0 var(--kbccblue), 0 5px 0 var(--kbccblue);
|
||||
}
|
||||
#blue-border3 {
|
||||
box-shadow: 0 5px 0 var(--kbccblue), 0 -5px 0 var(--kbccblue), 5px -5px 0 var(--kbccblue), 5px 5px 0 var(--kbccblue);
|
||||
}
|
||||
|
||||
.nav-by-jumbotron { margin-top: 0 !important; }
|
||||
#lighthouse-logo {
|
||||
@@ -328,7 +322,6 @@ a.no-underline { text-decoration: none; }
|
||||
|
||||
@media only screen and (min-width: 1px) and (max-width: 992px) {
|
||||
#hamburger-alternative { display: none; }
|
||||
#corona-alert { margin-top: 10px; }
|
||||
}
|
||||
|
||||
@media only screen and (min-width: 992px) {
|
||||
@@ -344,34 +337,6 @@ a.no-underline { text-decoration: none; }
|
||||
@media only screen and (min-width: 1200px) {
|
||||
#library-logo { margin-top: -3px; }
|
||||
}
|
||||
|
||||
/*!
|
||||
* 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>
|
||||
|
||||
<!-- trigger menu open when you hover over dropdowns
|
||||
@@ -403,42 +368,6 @@ jQuery(function(){
|
||||
});
|
||||
</script>
|
||||
|
||||
<!-- the configuration file for the hours widget -->
|
||||
<script type="text/javascript" src="//libapps.s3.amazonaws.com/sites/2365/include/hours-babel.js"></script>
|
||||
|
||||
<!-- the code for the hours widget -->
|
||||
<!-- please forgive the old-timey JS; it is there because we need to support IE10 & IE11 -->
|
||||
<script type="text/javascript">
|
||||
function hoursFunction() {
|
||||
const h = JSON.parse(hours);
|
||||
const options_weekday = { weekday: 'long' };
|
||||
const options_weekday_short = { weekday: 'short' };
|
||||
const options_date = { month: 'short', 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 (window.innerWidth < 500) {
|
||||
weekday = targetDate.toLocaleDateString("en-US", options_weekday_short)
|
||||
} else {
|
||||
weekday = targetDate.toLocaleDateString("en-US", options_weekday)
|
||||
}
|
||||
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) + "<br />" + h[i].Hours + "</p>";
|
||||
var start = true;
|
||||
var count = 1;
|
||||
} else if (start === true && count < 3 && h[i].Hours === "Closed" ) {
|
||||
document.getElementById('hours' + count).innerHTML = "<span style='color:#666;'><p>" + weekday + "<br />" + targetDate.toLocaleDateString("en-US", options_date) + "<br />" + h[i].Hours + "</p></span>";
|
||||
count++;
|
||||
} else if (start === true && count < 3 && h[i].Hours != "Closed") {
|
||||
document.getElementById('hours' + count).innerHTML = "<p>" + weekday + "<br />" + targetDate.toLocaleDateString("en-US", options_date) + "<br />" + h[i].Hours + "</p>";
|
||||
count++;
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<!-- polyfills to make .forEach and .includes work in IE10 and IE11 -->
|
||||
<script type="text/javascript">
|
||||
if (window.NodeList && !NodeList.prototype.forEach) {
|
||||
@@ -469,7 +398,7 @@ function customizeSearch(facet) {
|
||||
if (facet === "Books") {
|
||||
document.getElementById("formToAppendInputsTo").insertAdjacentHTML('afterbegin', '<input name="facet" value="rtype,include,books" type="hidden" class="deleteWithDropdownChange" />');
|
||||
} else if (facet === "Articles") {
|
||||
document.getElementById("formToAppendInputsTo").insertAdjacentHTML('afterbegin', '<input name="mfacet" value="rtype,include,articles,1" type="hidden" class="deleteWithDropdownChange"/><input name="mfacet" value="rtype,include,newspaper_articles,1" type="hidden" class="deleteWithDropdownChange" />');
|
||||
document.getElementById("formToAppendInputsTo").insertAdjacentHTML('afterbegin', '<input name="mfacet" value="rtype,include,articles,1" type="hidden" class="deleteWithDropdownChange"/><input name="facet" value="tlevel,include,peer_reviewed" type="hidden" class="deleteWithDropdownChange" />');
|
||||
} else if (facet === "Videos") {
|
||||
document.getElementById("formToAppendInputsTo").insertAdjacentHTML('afterbegin', '<input name="facet" value="rtype,include,videos" type="hidden" class="deleteWithDropdownChange" />');
|
||||
} else if (facet === "Journals") {
|
||||
@@ -525,10 +454,9 @@ function addPrimoQuery(e) {
|
||||
}
|
||||
</script>
|
||||
|
||||
<!-- run the hours widget and the sessionStorage stuff on load -->
|
||||
<!-- run the sessionStorage stuff on load -->
|
||||
<script>
|
||||
window.onload = function () {
|
||||
hoursFunction()
|
||||
sessionFunction()
|
||||
}
|
||||
</script>
|
||||
+27
-85
@@ -7,6 +7,7 @@
|
||||
<div id="s-lib-public-main" class="s-lib-main container s-lib-side-borders">
|
||||
<div id="s-lg-index-cols">
|
||||
<div class="row">
|
||||
<!--<div id="obsolete_browser_alert" class="alert alert-danger obsolete_browser_alert">It looks like you're using Internet Explorer 11 or older. This website works best with modern browsers such as the latest versions of Chrome, Firefox, Safari, and Edge. If you continue with this browser, you may see unexpected results.</div>-->
|
||||
<div class="col-xs-12" id="header-div">
|
||||
<div class="dropdown" id="hamburger-container">
|
||||
<button class="btn btn-default dropdown-toggle" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true" id="hamburger">
|
||||
@@ -78,7 +79,7 @@
|
||||
</div>
|
||||
<div class="row" id="hamburger-alternative">
|
||||
<div class="col-xs-12">
|
||||
<nav class="navbar navbar-default yamm">
|
||||
<nav class="navbar navbar-default main-nav-container">
|
||||
<div class="container-fluid">
|
||||
<ul class="nav navbar-nav" id="navbar-center">
|
||||
<li class="dropdown main-nav-dropdown">
|
||||
@@ -262,7 +263,7 @@
|
||||
<div class="container" style="margin-top:14px;">
|
||||
<div class="row kbcc-background-image">
|
||||
<div class="col-sm-8">
|
||||
<form class="form-inline yamm onesearch-jumbotron" name="searchPrimoForm1" role="search" method="get" action="https://cuny-kb.primo.exlibrisgroup.com/discovery/search" onsubmit="addPrimoQuery();" enctype="application/x-www-form-urlencoded; charset=utf-8" id="formToAppendInputsTo">
|
||||
<form class="form-inline onesearch-jumbotron" name="searchPrimoForm1" role="search" method="get" action="https://cuny-kb.primo.exlibrisgroup.com/discovery/search" onsubmit="addPrimoQuery();" enctype="application/x-www-form-urlencoded; charset=utf-8" id="formToAppendInputsTo">
|
||||
<!-- default is "everything" option suggested from OLS widget builder -->
|
||||
<input name="vid" value="01CUNY_KB:CUNY_KB" type="hidden" />
|
||||
<input name="tab" value="Everything" type="hidden" id="tabSetting" />
|
||||
@@ -283,68 +284,40 @@
|
||||
<div class="form-group" id="flex-search-form">
|
||||
<div class="dropdown input-group zero-margin" id="blue-border1">
|
||||
<button class="btn btn-default dropdown-toggle" type="button" id="dropdownMenu1" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
|
||||
Define Your Search <span class="caret"></span>
|
||||
<span id="defineYourSearch">Define Your Search </span><span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu fade" aria-labelledby="dropdownMenu1">
|
||||
<ul class="dropdown-menu fade dropdown-margin" aria-labelledby="dropdownMenu1">
|
||||
<li>
|
||||
<div class="yamm-content yamm4">
|
||||
<div class="row" id="yamm4-margins">
|
||||
<a class="searchmenu" onclick="customizeSearch('Books')">
|
||||
<div class="col-xs-12 highlight-menu-item">
|
||||
<div class="highlight-menu-item bigger-fancy-text">
|
||||
<strong>Books</strong>
|
||||
<p class="faux-card">Find print books and ebooks using OneSearch</p>
|
||||
</div>
|
||||
</a>
|
||||
<a class="searchmenu" onclick="customizeSearch('Articles')">
|
||||
<div class="col-xs-12 highlight-menu-item">
|
||||
<strong>Articles</strong>
|
||||
<p class="faux-card">Find articles in journals, newspapers and magazines using OneSearch</p>
|
||||
</div>
|
||||
</a>
|
||||
<a class="searchmenu" onclick="customizeSearch('Videos')">
|
||||
<div class="col-xs-12 highlight-menu-item">
|
||||
<strong>Videos</strong>
|
||||
<p class="faux-card">Find DVDs and streaming videos using OneSearch</p>
|
||||
</div>
|
||||
</a>
|
||||
<a class="searchmenu" onclick="customizeSearch('Books & more')">
|
||||
<div class="col-xs-12 highlight-menu-item">
|
||||
<strong>Books, articles and videos</strong>
|
||||
<p class="faux-card">Search for books, articles & videos using OneSearch</p>
|
||||
</div>
|
||||
</a>
|
||||
<a href="https://cuny-kb.primo.exlibrisgroup.com/discovery/search?vid=01CUNY_KB:CUNY_KB&lang=en&mode=advanced" class="searchmenu">
|
||||
<div class="col-xs-12 highlight-menu-item">
|
||||
<strong>Advanced Search</strong>
|
||||
<p class="faux-card">Use OneSearch's advanced interface</p>
|
||||
</div>
|
||||
</a>
|
||||
<a href="https://library.kbcc.cuny.edu/az.php" class="searchmenu">
|
||||
<div class="col-xs-12 highlight-menu-item">
|
||||
<strong>Databases</strong>
|
||||
<p class="faux-card">See our A to Z list and find databases by subject</p>
|
||||
</div>
|
||||
</a>
|
||||
<a class="searchmenu" onclick="customizeSearch('Journals')">
|
||||
<div class="col-xs-12 highlight-menu-item">
|
||||
<strong>Journals</strong>
|
||||
<p class="faux-card">Find specific scholarly journals (peer reviewed)</p>
|
||||
</div>
|
||||
</a>
|
||||
<a class="searchmenu" onclick="customizeSearch('Newspapers')">
|
||||
<div class="col-xs-12 highlight-menu-item">
|
||||
<strong>Newspapers and magazines</strong>
|
||||
<p class="faux-card">Find specific newspapers and magazines</p>
|
||||
<div class="highlight-menu-item bigger-fancy-text">
|
||||
<strong>Articles (Peer Reviewed)</strong>
|
||||
</div>
|
||||
</a>
|
||||
<a class="searchmenu" onclick="customizeSearch('Course Reserves')">
|
||||
<div class="col-xs-12 highlight-menu-item">
|
||||
<div class="highlight-menu-item bigger-fancy-text">
|
||||
<strong>Course reserves</strong>
|
||||
<p class="faux-card">Find reserve materials for your classes</p>
|
||||
</div>
|
||||
</a>
|
||||
<a class="searchmenu" onclick="customizeSearch('Newspapers')">
|
||||
<div class="highlight-menu-item bigger-fancy-text">
|
||||
<strong>Newspapers and magazines</strong>
|
||||
</div>
|
||||
</a>
|
||||
<a class="searchmenu" onclick="customizeSearch('Journals')">
|
||||
<div class="highlight-menu-item bigger-fancy-text">
|
||||
<strong>Journals</strong>
|
||||
</div>
|
||||
</a>
|
||||
<a href="https://cuny-kb.primo.exlibrisgroup.com/discovery/search?vid=01CUNY_KB:CUNY_KB&lang=en&mode=advanced" class="searchmenu">
|
||||
<div class="highlight-menu-item bigger-fancy-text">
|
||||
<strong>Advanced Search</strong>
|
||||
</div>
|
||||
</a>
|
||||
<li>
|
||||
</ul>
|
||||
</div>
|
||||
@@ -403,8 +376,7 @@
|
||||
<ul class="link-list">
|
||||
<li><a href="https://library.kbcc.cuny.edu/ENGLISH24" class="ga-library-links">How to Use the Library</a></li>
|
||||
<li><a href="https://library.kbcc.cuny.edu/ebooks" class="ga-library-links">Find eTextbooks and eBooks</a></li>
|
||||
<li><a href="https://library.kbcc.cuny.edu/social" class="ga-library-links">Social Media</a></li>
|
||||
<li><a href="https://library.kbcc.cuny.edu/faq" class="ga-library-links">FAQ</a></li>
|
||||
<li><a href="https://library.kbcc.cuny.edu/video" class="ga-library-links">Streaming Video</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
@@ -412,7 +384,6 @@
|
||||
<li><a href="http://kbcc.ezproxy.cuny.edu:2048/login?url=http://search.ebscohost.com/login.aspx?authtype=ip,uid&custid=s9000138&profile=ehost&defaultdb=a9h" target="_blank" class="ga-library-links">Academic Search Complete</a></li>
|
||||
<li><a href="http://kbcc.ezproxy.cuny.edu:2048/login?url=https://search.proquest.com/usmajordailies/advanced/news/fromDatabasesLayer?accountid=38336" target="_blank" class="ga-library-links">US Newspapers</a></li>
|
||||
<li><a href="http://www.nytimes.com/passes" target="_blank" class="ga-library-links">NY Times Free Pass</a></li>
|
||||
<li><a href="https://library.kbcc.cuny.edu/video" class="ga-library-links">Streaming Video</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
@@ -423,36 +394,7 @@
|
||||
<span class="panel-title content-panel-title"><h2>Upcoming Library Hours</h2></span>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div class="row equal">
|
||||
<div class="col-xs-2 padding-0">
|
||||
<div class="panel panel-default panel-outline-color">
|
||||
<div class="panel-body hours-panel-body vertical-align">
|
||||
<span id="hours0" class="hours"></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-2 padding-0">
|
||||
<div class="panel panel-default panel-outline-color">
|
||||
<div class="panel-body hours-panel-body vertical-align">
|
||||
<span id="hours1" class="hours"></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-2 padding-0">
|
||||
<div class="panel panel-default panel-outline-color">
|
||||
<div class="panel-body hours-panel-body vertical-align">
|
||||
<span id="hours2" class="hours"></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-2 padding-0">
|
||||
<div class="panel panel-default panel-outline-color">
|
||||
<div class="panel-body vertical-align">
|
||||
<div class="more-link"><a href="https://library.kbcc.cuny.edu/calendar">More Hours</a></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{content_box_29248590}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -477,14 +419,14 @@
|
||||
<a href="https://www.kbcc.cuny.edu"><img src="https://libapps.s3.amazonaws.com/accounts/16298/images/Orange_Vector_Mac_Building.png" alt="Kingsborough Lighthouse logo" /></a>
|
||||
</div>
|
||||
<div class="library-address">
|
||||
<div>
|
||||
<div class="whiteahrefs">
|
||||
<strong>Robert J. Kibbee Library</strong><br />
|
||||
2001 Oriental Blvd<br />
|
||||
Brooklyn, NY, 11209<br />
|
||||
718-368-5632
|
||||
<a href="tel:+1-718-368-5632">718-368-5632</a>
|
||||
</div>
|
||||
<div class="whiteahrefs">
|
||||
<a href="mailto:reference.desk@kbcc.cuny.edu">reference.desk@kbcc.cuny.edu</a>
|
||||
<a href="https://kbcc-cuny.libwizard.com/f/reference">reference.desk@kbcc.cuny.edu</a>
|
||||
<br />
|
||||
<a aria-label="Twitter" href="https://twitter.com/KBCCLibrary" target="_blank"><i aria-hidden="true" class="fab fa-twitter"></i></a>
|
||||
<a aria-label="Instagram" href="https://www.instagram.com/kbcclibrary/" target="_blank"><i aria-hidden="true" class="fab fa-instagram"></i></a>
|
||||
Reference in New Issue
Block a user