mirror of
https://github.com/Start9Labs/documentation.git
synced 2026-03-26 02:11:55 +00:00
navbar toggle fixes
This commit is contained in:
@@ -24,6 +24,8 @@ pip3 install sphinx-book-theme || pip install git+https://github.com/executableb
|
||||
|
||||
Run: `sphinx-autobuild source build/html` to activate a live-reload environment on `localhost:8000`.
|
||||
|
||||
To run in development mode when actively changing js/css files run: `sphinx-autobuild source build/html source/_static/js/main.js source/_static/default.css`. this will auto-load with changes to noted files.
|
||||
|
||||
The main configuration file for this project is located at `./source/conf.py`.
|
||||
|
||||
The navigation structure is aligned with the folder/file organization under `./source/`. This is where the individual page `.rst` files live and can be edited.
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
@@ -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")) {
|
||||
|
||||
Reference in New Issue
Block a user