Skip to content

Commit c215ad3

Browse files
committed
added module support; removed jQuery support; updated configarations and many more
1 parent 14123fc commit c215ad3

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+1327
-15487
lines changed

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License (MIT)
22

3-
Copyright (c) 2019 - Present, Statichunt
3+
Copyright (c) 2023 - Present, Statichunt
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy of
66
this software and associated documentation files (the "Software"), to deal in

assets/js/bootstrap.js

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
// bootstrap js components
2+
// import Alert from "js/bootstrap/src/alert";
3+
// import Button from "js/bootstrap/src/button";
4+
// import Carousel from "js/bootstrap/src/carousel";
5+
import Collapse from "js/bootstrap/src/collapse";
6+
import Dropdown from "js/bootstrap/src/dropdown";
7+
import Modal from "js/bootstrap/src/modal";
8+
import Offcanvas from "js/bootstrap/src/offcanvas";
9+
// import Popover from "js/bootstrap/src/popover";
10+
// import ScrollSpy from "js/bootstrap/src/scrollspy";
11+
import Tab from "js/bootstrap/src/tab";
12+
// import Toast from "js/bootstrap/src/toast";
13+
// import Tooltip from "js/bootstrap/src/tooltip";
14+
15+
// bootstrap popover and toats
16+
// (function () {
17+
// "use strict";
18+
// let toastElList = [].slice.call(document.querySelectorAll(".toast"));
19+
// let toastList = toastElList.map(function (toastEl) {
20+
// return new Toast(toastEl);
21+
// });
22+
23+
// toastList.forEach(function (toast) {
24+
// toast.show();
25+
// });
26+
27+
// let popoverTriggerList = [].slice.call(
28+
// document.querySelectorAll('[data-bs-toggle="popover"]')
29+
// );
30+
// popoverTriggerList.map(function (popoverTriggerEl) {
31+
// return new Popover(popoverTriggerEl);
32+
// });
33+
// })();

assets/js/script.js

Lines changed: 4 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -1,73 +1,4 @@
1-
// Passive event listeners
2-
jQuery.event.special.touchstart = {
3-
setup: function (_, ns, handle) {
4-
'use strict';
5-
this.addEventListener('touchstart', handle, {
6-
passive: !ns.includes('noPreventDefault')
7-
});
8-
}
9-
};
10-
jQuery.event.special.touchmove = {
11-
setup: function (_, ns, handle) {
12-
'use strict';
13-
this.addEventListener('touchmove', handle, {
14-
passive: !ns.includes('noPreventDefault')
15-
});
16-
}
17-
};
18-
19-
// Preloader js
20-
$(window).on('load', function () {
21-
'use strict';
22-
$('.preloader').fadeOut(0);
23-
});
24-
25-
// on ready state
26-
$(document).ready(function () {
27-
'use strict';
28-
29-
// search-toggle
30-
$('.toggle-search').on('click', function () {
31-
var targetId = $(this).data('target');
32-
var $searchBar;
33-
if (targetId) {
34-
$searchBar = $(targetId);
35-
$searchBar.toggleClass('open');
36-
}
37-
});
38-
39-
// tab
40-
$('.tab-content').find('.tab-pane').each(function (idx, item) {
41-
var navTabs = $(this).closest('.code-tabs').find('.nav-tabs'),
42-
title = $(this).attr('title');
43-
navTabs.append('<li class="nav-item"><a class="nav-link" href="#">' + title + '</a></li>');
44-
});
45-
46-
$('.code-tabs ul.nav-tabs').each(function () {
47-
$(this).find("li:first").addClass('active');
48-
})
49-
50-
$('.code-tabs .tab-content').each(function () {
51-
$(this).find("div:first").addClass('active');
52-
});
53-
54-
$('.nav-tabs a').click(function (e) {
55-
e.preventDefault();
56-
var tab = $(this).parent(),
57-
tabIndex = tab.index(),
58-
tabPanel = $(this).closest('.code-tabs'),
59-
tabPane = tabPanel.find('.tab-pane').eq(tabIndex);
60-
tabPanel.find('.active').removeClass('active');
61-
tab.addClass('active');
62-
tabPane.addClass('active');
63-
});
64-
65-
// Accordions
66-
$('.collapse').on('shown.bs.collapse', function () {
67-
$(this).parent().find('.fas fa-plus').removeClass('fas fa-plus').addClass('fas fa-minus');
68-
}).on('hidden.bs.collapse', function () {
69-
$(this).parent().find('.fas fa-minus').removeClass('fas fa-minus').addClass('fas fa-plus');
70-
});
71-
72-
73-
});
1+
// main script
2+
(function () {
3+
"use strict";
4+
})();

0 commit comments

Comments
 (0)