add Compiled Site

This commit is contained in:
Siwat Sirichai 2019-08-21 13:13:18 +07:00
parent be14b2900f
commit fc07914d7e
34 changed files with 11205 additions and 0 deletions

7
assets/js/bs-charts.js Normal file
View file

@ -0,0 +1,7 @@
$(document).ready(function(){
$('[data-bs-chart]').each(function(index, elem) {
var chart = new Chart($(elem), $(elem).data('bs-chart'));
});
});

7
assets/js/chart.min.js vendored Normal file

File diff suppressed because one or more lines are too long

2
assets/js/jquery.min.js vendored Normal file

File diff suppressed because one or more lines are too long

49
assets/js/theme.js Normal file
View file

@ -0,0 +1,49 @@
(function($) {
"use strict"; // Start of use strict
// Toggle the side navigation
$("#sidebarToggle, #sidebarToggleTop").on('click', function(e) {
$("body").toggleClass("sidebar-toggled");
$(".sidebar").toggleClass("toggled");
if ($(".sidebar").hasClass("toggled")) {
$('.sidebar .collapse').collapse('hide');
};
});
// Close any open menu accordions when window is resized below 768px
$(window).resize(function() {
if ($(window).width() < 768) {
$('.sidebar .collapse').collapse('hide');
};
});
// Prevent the content wrapper from scrolling when the fixed side navigation hovered over
$('body.fixed-nav .sidebar').on('mousewheel DOMMouseScroll wheel', function(e) {
if ($(window).width() > 768) {
var e0 = e.originalEvent,
delta = e0.wheelDelta || -e0.detail;
this.scrollTop += (delta < 0 ? 1 : -1) * 30;
e.preventDefault();
}
});
// Scroll to top button appear
$(document).on('scroll', function() {
var scrollDistance = $(this).scrollTop();
if (scrollDistance > 100) {
$('.scroll-to-top').fadeIn();
} else {
$('.scroll-to-top').fadeOut();
}
});
// Smooth scrolling using jQuery easing
$(document).on('click', 'a.scroll-to-top', function(e) {
var $anchor = $(this);
$('html, body').stop().animate({
scrollTop: ($($anchor.attr('href')).offset().top)
}, 1000, 'easeInOutExpo');
e.preventDefault();
});
})(jQuery); // End of use strict