Empty lines clean-up

main
Yasen Pramatarov 2025-11-11 17:55:47 +02:00
parent 2ed49eb12d
commit 34613d9748
3 changed files with 19 additions and 19 deletions

View File

@ -171,7 +171,7 @@ body.modern-theme {
flex-direction: column; flex-direction: column;
padding: 0.5rem; padding: 0.5rem;
} }
.menu-left, .menu-right { .menu-left, .menu-right {
width: 100%; width: 100%;
justify-content: space-between; justify-content: space-between;

View File

@ -7,15 +7,15 @@
document.addEventListener('DOMContentLoaded', function() { document.addEventListener('DOMContentLoaded', function() {
// Initialize tooltips // Initialize tooltips
$('[data-toggle="tooltip"]').tooltip(); $('[data-toggle="tooltip"]').tooltip();
// Initialize popovers // Initialize popovers
$('[data-toggle="popover"]').popover(); $('[data-toggle="popover"]').popover();
// Add smooth scrolling to anchor links // Add smooth scrolling to anchor links
$('a[href^="#"]').on('click', function(e) { $('a[href^="#"]').on('click', function(e) {
if (this.hash !== '') { if (this.hash !== '') {
e.preventDefault(); e.preventDefault();
const hash = this.hash; const hash = this.hash;
$('html, body').animate( $('html, body').animate(
{ scrollTop: $(hash).offset().top - 20 }, { scrollTop: $(hash).offset().top - 20 },
@ -23,7 +23,7 @@ document.addEventListener('DOMContentLoaded', function() {
); );
} }
}); });
// Handle form validation feedback // Handle form validation feedback
$('form.needs-validation').on('submit', function(event) { $('form.needs-validation').on('submit', function(event) {
if (this.checkValidity() === false) { if (this.checkValidity() === false) {
@ -32,7 +32,7 @@ document.addEventListener('DOMContentLoaded', function() {
} }
$(this).addClass('was-validated'); $(this).addClass('was-validated');
}); });
// Add active class to current nav item // Add active class to current nav item
const currentPage = window.location.pathname.split('/').pop() || 'index.php'; const currentPage = window.location.pathname.split('/').pop() || 'index.php';
$('.nav-link').each(function() { $('.nav-link').each(function() {
@ -41,7 +41,7 @@ document.addEventListener('DOMContentLoaded', function() {
$(this).closest('.nav-item').addClass('active'); $(this).closest('.nav-item').addClass('active');
} }
}); });
// Handle sidebar toggle // Handle sidebar toggle
const sidebarToggle = document.querySelector('.sidebar-toggle'); const sidebarToggle = document.querySelector('.sidebar-toggle');
if (sidebarToggle) { if (sidebarToggle) {
@ -51,7 +51,7 @@ document.addEventListener('DOMContentLoaded', function() {
document.documentElement.classList.contains('sidebar-collapsed') ? 'collapsed' : 'expanded'); document.documentElement.classList.contains('sidebar-collapsed') ? 'collapsed' : 'expanded');
}); });
} }
// Handle dropdown menus // Handle dropdown menus
$('.dropdown-menu a.dropdown-toggle').on('click', function(e) { $('.dropdown-menu a.dropdown-toggle').on('click', function(e) {
if (!$(this).next().hasClass('show')) { if (!$(this).next().hasClass('show')) {
@ -59,11 +59,11 @@ document.addEventListener('DOMContentLoaded', function() {
} }
const $subMenu = $(this).next('.dropdown-menu'); const $subMenu = $(this).next('.dropdown-menu');
$subMenu.toggleClass('show'); $subMenu.toggleClass('show');
$(this).parents('li.nav-item.dropdown.show').on('hidden.bs.dropdown', function() { $(this).parents('li.nav-item.dropdown.show').on('hidden.bs.dropdown', function() {
$('.dropdown-submenu .show').removeClass('show'); $('.dropdown-submenu .show').removeClass('show');
}); });
return false; return false;
}); });
}); });

View File

@ -7,15 +7,15 @@
document.addEventListener('DOMContentLoaded', function() { document.addEventListener('DOMContentLoaded', function() {
// Initialize tooltips // Initialize tooltips
$('[data-toggle="tooltip"]').tooltip(); $('[data-toggle="tooltip"]').tooltip();
// Initialize popovers // Initialize popovers
$('[data-toggle="popover"]').popover(); $('[data-toggle="popover"]').popover();
// Add smooth scrolling to anchor links // Add smooth scrolling to anchor links
$('a[href^="#"]').on('click', function(e) { $('a[href^="#"]').on('click', function(e) {
if (this.hash !== '') { if (this.hash !== '') {
e.preventDefault(); e.preventDefault();
const hash = this.hash; const hash = this.hash;
$('html, body').animate( $('html, body').animate(
{ scrollTop: $(hash).offset().top - 20 }, { scrollTop: $(hash).offset().top - 20 },
@ -23,7 +23,7 @@ document.addEventListener('DOMContentLoaded', function() {
); );
} }
}); });
// Handle form validation feedback // Handle form validation feedback
$('form.needs-validation').on('submit', function(event) { $('form.needs-validation').on('submit', function(event) {
if (this.checkValidity() === false) { if (this.checkValidity() === false) {
@ -32,7 +32,7 @@ document.addEventListener('DOMContentLoaded', function() {
} }
$(this).addClass('was-validated'); $(this).addClass('was-validated');
}); });
// Add active class to current nav item // Add active class to current nav item
const currentPage = window.location.pathname.split('/').pop() || 'index.php'; const currentPage = window.location.pathname.split('/').pop() || 'index.php';
$('.nav-link').each(function() { $('.nav-link').each(function() {
@ -41,7 +41,7 @@ document.addEventListener('DOMContentLoaded', function() {
$(this).closest('.nav-item').addClass('active'); $(this).closest('.nav-item').addClass('active');
} }
}); });
// Handle sidebar toggle // Handle sidebar toggle
const sidebarToggle = document.querySelector('.sidebar-toggle'); const sidebarToggle = document.querySelector('.sidebar-toggle');
if (sidebarToggle) { if (sidebarToggle) {
@ -51,7 +51,7 @@ document.addEventListener('DOMContentLoaded', function() {
document.documentElement.classList.contains('sidebar-collapsed') ? 'collapsed' : 'expanded'); document.documentElement.classList.contains('sidebar-collapsed') ? 'collapsed' : 'expanded');
}); });
} }
// Handle dropdown menus // Handle dropdown menus
$('.dropdown-menu a.dropdown-toggle').on('click', function(e) { $('.dropdown-menu a.dropdown-toggle').on('click', function(e) {
if (!$(this).next().hasClass('show')) { if (!$(this).next().hasClass('show')) {
@ -59,11 +59,11 @@ document.addEventListener('DOMContentLoaded', function() {
} }
const $subMenu = $(this).next('.dropdown-menu'); const $subMenu = $(this).next('.dropdown-menu');
$subMenu.toggleClass('show'); $subMenu.toggleClass('show');
$(this).parents('li.nav-item.dropdown.show').on('hidden.bs.dropdown', function() { $(this).parents('li.nav-item.dropdown.show').on('hidden.bs.dropdown', function() {
$('.dropdown-submenu .show').removeClass('show'); $('.dropdown-submenu .show').removeClass('show');
}); });
return false; return false;
}); });
}); });