navbar toggle fixes

This commit is contained in:
Lucy Cifferello
2021-04-14 14:59:19 -06:00
parent 1feae3ea4f
commit 784c82fc4b
3 changed files with 21 additions and 10 deletions

View File

@@ -1,6 +1,8 @@
body, h1, h2, h3, h4, nav, .topbar, .topbar-main, .tocsection, .form-control, .bd-toc {
body, p, h1, h2, h3, h4, nav, .topbar, .topbar-main, .tocsection, .form-control, .bd-toc, .bd-sidebar {
background-color: #2b2b2b!important;
color: #f8f8ff!important;
/* font-family: Lato,sans-serif!important; */
line-height: 1.65;
}
h1 {
@@ -190,4 +192,8 @@ nav.bd-links > ul.nav {
.navbar-brand-box {
text-align: center;
}
.above {
margin-top: -1000px!important;
}

View File

@@ -1,8 +1,7 @@
$(document).ready(function () {
$(document).ready(function (e) {
// open external links in separate tab
$('a[href^="http://"], a[href^="https://"]').not('a[class*=internal]').attr('target', '_blank');
$(".fa-arrow-left").attr("class", "fas fa-times");
$(".fa-arrow-up").attr("class", "fas fa-times");
// toggle hidable sections
$(".toggle > *").hide();
$(".toggle .admonition-title").show();
@@ -10,12 +9,16 @@ $(document).ready(function () {
$(this).parent().children().not(".admonition-title").toggle(400);
$(this).parent().children(".admonition-title").toggleClass("open");
})
// default menu to open on initial load
$('.site-navigation').removeClass('collapsing');
$('.site-navigation').removeClass('collapse');
$('.site-navigation').addClass('show');
// initially hide menu close button
$('.fa-times').addClass('hidden');
// change appearance of arrow to X for menu closing
$(".fa-arrow-left").attr("class", "fas fa-times");
$(".fa-arrow-up").attr("class", "fas fa-times");
// initially hide menu close button on small screen widths
if ($(window).width() < 768) {
$('.fa-times').addClass('hidden');
}
$('#navbar-toggler').click(function() {
// toggle menu open/close button depending on collapsed state
if ($('#navbar-toggler').hasClass("collapsed")) {