theme dependences
This commit is contained in:
0
resources/themes/custom/js/bootstrap.min.js
vendored
Normal file
0
resources/themes/custom/js/bootstrap.min.js
vendored
Normal file
0
resources/themes/custom/js/jquery.min.js
vendored
Normal file
0
resources/themes/custom/js/jquery.min.js
vendored
Normal file
30
resources/themes/custom/js/main.js
Normal file
30
resources/themes/custom/js/main.js
Normal file
@ -0,0 +1,30 @@
|
||||
(function ($) {
|
||||
|
||||
"use strict";
|
||||
|
||||
var fullHeight = function () {
|
||||
|
||||
$('.js-fullheight').css('height', $(window).height());
|
||||
$(window).resize(function () {
|
||||
$('.js-fullheight').css('height', $(window).height());
|
||||
});
|
||||
|
||||
};
|
||||
fullHeight();
|
||||
|
||||
$('#sidebarCollapse').on('click', function () {
|
||||
$('#sidebar').toggleClass('active');
|
||||
});
|
||||
|
||||
})(jQuery);
|
||||
|
||||
window.addEventListener("load", function () {
|
||||
let closeBtn = document.querySelectorAll(".closeAlertBtn");
|
||||
closeBtn.forEach((item) => {
|
||||
item.addEventListener("click", closeAlert);
|
||||
});
|
||||
});
|
||||
|
||||
function closeAlert() {
|
||||
this.parentNode.setAttribute("style", "display: none;")
|
||||
}
|
5
resources/themes/custom/js/popper.js
Normal file
5
resources/themes/custom/js/popper.js
Normal file
File diff suppressed because one or more lines are too long
29
resources/themes/custom/js/scripts.js
Normal file
29
resources/themes/custom/js/scripts.js
Normal file
@ -0,0 +1,29 @@
|
||||
/*!
|
||||
* Start Bootstrap - Clean Blog v6.0.9 (https://startbootstrap.com/theme/clean-blog)
|
||||
* Copyright 2013-2023 Start Bootstrap
|
||||
* Licensed under MIT (https://github.com/StartBootstrap/startbootstrap-clean-blog/blob/master/LICENSE)
|
||||
*/
|
||||
window.addEventListener('DOMContentLoaded', () => {
|
||||
let scrollPos = 0;
|
||||
const mainNav = document.getElementById('mainNav');
|
||||
const headerHeight = mainNav.clientHeight;
|
||||
window.addEventListener('scroll', function() {
|
||||
const currentTop = document.body.getBoundingClientRect().top * -1;
|
||||
if ( currentTop < scrollPos) {
|
||||
// Scrolling Up
|
||||
if (currentTop > 0 && mainNav.classList.contains('is-fixed')) {
|
||||
mainNav.classList.add('is-visible');
|
||||
} else {
|
||||
console.log(123);
|
||||
mainNav.classList.remove('is-visible', 'is-fixed');
|
||||
}
|
||||
} else {
|
||||
// Scrolling Down
|
||||
mainNav.classList.remove(['is-visible']);
|
||||
if (currentTop > headerHeight && !mainNav.classList.contains('is-fixed')) {
|
||||
mainNav.classList.add('is-fixed');
|
||||
}
|
||||
}
|
||||
scrollPos = currentTop;
|
||||
});
|
||||
})
|
Reference in New Issue
Block a user