Build Js and CSS
This commit is contained in:
52
js/script.js
52
js/script.js
@@ -1,3 +1,7 @@
|
||||
// var $ = require('jquery');
|
||||
// window.$ = $;
|
||||
// require('bootstrap');
|
||||
|
||||
// Blocks
|
||||
docReady(function() {
|
||||
var boxesNames = {
|
||||
@@ -59,9 +63,37 @@ docReady(function() {
|
||||
}
|
||||
});
|
||||
|
||||
// var $ = require('jquery');
|
||||
// Equivalent of Jquery $.ready
|
||||
function docReady(fn) {
|
||||
// see if DOM is already available
|
||||
if (document.readyState === "complete" || document.readyState === "interactive") {
|
||||
// call on next available tick
|
||||
setTimeout(fn, 1);
|
||||
} else {
|
||||
document.addEventListener("DOMContentLoaded", fn);
|
||||
}
|
||||
}
|
||||
|
||||
// function collapse_toc_elements_on_click (nav_li_a){
|
||||
// /*
|
||||
// When an `a' element in the TOC is clicked, its parent
|
||||
// `li' element's active attribute is toggled. This causes
|
||||
// the element to toggle between minimized and maximized
|
||||
// states. The active attribute is documented in bootstrap.
|
||||
// https://getbootstrap.com/docs/4.0/components/navbar/#nav
|
||||
// */
|
||||
// $(nav_li_a).parent().toggleClass("active");
|
||||
// }
|
||||
|
||||
// $( document ).ready(function() {
|
||||
// // When the document is loaded and ready, bind the
|
||||
// // function `collapse_toc_elements_on_click' to the
|
||||
// // `a' elements in the table of contents.
|
||||
// $("#text-table-of-contents a").click(function() {
|
||||
// collapse_toc_elements_on_click(this);
|
||||
// });
|
||||
// });
|
||||
|
||||
// // Table of Contents
|
||||
// $( document ).ready(function() {
|
||||
|
||||
// // Shift nav in mobile when clicking the menu.
|
||||
@@ -81,14 +113,13 @@ docReady(function() {
|
||||
// $("table.docutils:not(.field-list)").wrap("<div class='wy-table-responsive'></div>");
|
||||
// });
|
||||
|
||||
|
||||
// $( document ).ready(function() {
|
||||
// $('#text-table-of-contents ul').first().addClass('nav');
|
||||
// // ScrollSpy also requires that we use
|
||||
// // a Bootstrap nav component.
|
||||
// $('body').scrollspy({target: '#text-table-of-contents'});
|
||||
|
||||
// // add sticky table headers
|
||||
// // DON'T add sticky table headers (Fix issue #69?)
|
||||
// // $('table').stickyTableHeaders();
|
||||
|
||||
// // set the height of tableOfContents
|
||||
@@ -106,7 +137,6 @@ docReady(function() {
|
||||
// tocTitle.append(closeBtn);
|
||||
// });
|
||||
|
||||
|
||||
// window.SphinxRtdTheme = (function (jquery) {
|
||||
// var stickyNav = (function () {
|
||||
// var navBar,
|
||||
@@ -136,15 +166,3 @@ docReady(function() {
|
||||
// StickyNav : stickyNav
|
||||
// };
|
||||
// }($));
|
||||
|
||||
|
||||
// Equivalent of Jquery $.ready
|
||||
function docReady(fn) {
|
||||
// see if DOM is already available
|
||||
if (document.readyState === "complete" || document.readyState === "interactive") {
|
||||
// call on next available tick
|
||||
setTimeout(fn, 1);
|
||||
} else {
|
||||
document.addEventListener("DOMContentLoaded", fn);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user