Files
ec-architektur/assets/app.js
Murat Özkorkmaz abb3cbc1bd initial commit
2025-10-08 15:57:29 +02:00

29 lines
685 B
JavaScript

import './bootstrap.js';
/*
* Welcome to your app's main JavaScript file!
*
* This file will be included onto the page via the importmap() Twig function,
* which should already be in your base.html.twig.
*/
import './styles/app.css';
console.log('This log comes from assets/app.js - welcome to AssetMapper! 🎉');
document.addEventListener('click', (e) => {
if (e.target.closest('#menu-btn')) {
const menu = document.getElementById('mobile-menu');
if (menu.style.maxHeight && menu.style.maxHeight !== '0px') {
menu.style.maxHeight = '0px';
} else {
menu.style.maxHeight = menu.scrollHeight + 'px';
}
}
});