diff --git a/themes/modern/assets/css/theme.css b/themes/modern/assets/css/theme.css index f8361c5..ccb57ab 100644 --- a/themes/modern/assets/css/theme.css +++ b/themes/modern/assets/css/theme.css @@ -171,7 +171,7 @@ body.modern-theme { flex-direction: column; padding: 0.5rem; } - + .menu-left, .menu-right { width: 100%; justify-content: space-between; diff --git a/themes/modern/assets/js/theme.js b/themes/modern/assets/js/theme.js index 56ce8f6..5862a82 100644 --- a/themes/modern/assets/js/theme.js +++ b/themes/modern/assets/js/theme.js @@ -7,15 +7,15 @@ document.addEventListener('DOMContentLoaded', function() { // Initialize tooltips $('[data-toggle="tooltip"]').tooltip(); - + // Initialize popovers $('[data-toggle="popover"]').popover(); - + // Add smooth scrolling to anchor links $('a[href^="#"]').on('click', function(e) { if (this.hash !== '') { e.preventDefault(); - + const hash = this.hash; $('html, body').animate( { scrollTop: $(hash).offset().top - 20 }, @@ -23,7 +23,7 @@ document.addEventListener('DOMContentLoaded', function() { ); } }); - + // Handle form validation feedback $('form.needs-validation').on('submit', function(event) { if (this.checkValidity() === false) { @@ -32,7 +32,7 @@ document.addEventListener('DOMContentLoaded', function() { } $(this).addClass('was-validated'); }); - + // Add active class to current nav item const currentPage = window.location.pathname.split('/').pop() || 'index.php'; $('.nav-link').each(function() { @@ -41,7 +41,7 @@ document.addEventListener('DOMContentLoaded', function() { $(this).closest('.nav-item').addClass('active'); } }); - + // Handle sidebar toggle const sidebarToggle = document.querySelector('.sidebar-toggle'); if (sidebarToggle) { @@ -51,7 +51,7 @@ document.addEventListener('DOMContentLoaded', function() { document.documentElement.classList.contains('sidebar-collapsed') ? 'collapsed' : 'expanded'); }); } - + // Handle dropdown menus $('.dropdown-menu a.dropdown-toggle').on('click', function(e) { if (!$(this).next().hasClass('show')) { @@ -59,11 +59,11 @@ document.addEventListener('DOMContentLoaded', function() { } const $subMenu = $(this).next('.dropdown-menu'); $subMenu.toggleClass('show'); - + $(this).parents('li.nav-item.dropdown.show').on('hidden.bs.dropdown', function() { $('.dropdown-submenu .show').removeClass('show'); }); - + return false; }); }); diff --git a/themes/retro/assets/js/theme.js b/themes/retro/assets/js/theme.js index 81f1064..0aae2c1 100644 --- a/themes/retro/assets/js/theme.js +++ b/themes/retro/assets/js/theme.js @@ -7,15 +7,15 @@ document.addEventListener('DOMContentLoaded', function() { // Initialize tooltips $('[data-toggle="tooltip"]').tooltip(); - + // Initialize popovers $('[data-toggle="popover"]').popover(); - + // Add smooth scrolling to anchor links $('a[href^="#"]').on('click', function(e) { if (this.hash !== '') { e.preventDefault(); - + const hash = this.hash; $('html, body').animate( { scrollTop: $(hash).offset().top - 20 }, @@ -23,7 +23,7 @@ document.addEventListener('DOMContentLoaded', function() { ); } }); - + // Handle form validation feedback $('form.needs-validation').on('submit', function(event) { if (this.checkValidity() === false) { @@ -32,7 +32,7 @@ document.addEventListener('DOMContentLoaded', function() { } $(this).addClass('was-validated'); }); - + // Add active class to current nav item const currentPage = window.location.pathname.split('/').pop() || 'index.php'; $('.nav-link').each(function() { @@ -41,7 +41,7 @@ document.addEventListener('DOMContentLoaded', function() { $(this).closest('.nav-item').addClass('active'); } }); - + // Handle sidebar toggle const sidebarToggle = document.querySelector('.sidebar-toggle'); if (sidebarToggle) { @@ -51,7 +51,7 @@ document.addEventListener('DOMContentLoaded', function() { document.documentElement.classList.contains('sidebar-collapsed') ? 'collapsed' : 'expanded'); }); } - + // Handle dropdown menus $('.dropdown-menu a.dropdown-toggle').on('click', function(e) { if (!$(this).next().hasClass('show')) { @@ -59,11 +59,11 @@ document.addEventListener('DOMContentLoaded', function() { } const $subMenu = $(this).next('.dropdown-menu'); $subMenu.toggleClass('show'); - + $(this).parents('li.nav-item.dropdown.show').on('hidden.bs.dropdown', function() { $('.dropdown-submenu .show').removeClass('show'); }); - + return false; }); });