initial commit
This commit is contained in:
28
assets/app.js
Normal file
28
assets/app.js
Normal file
@@ -0,0 +1,28 @@
|
||||
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';
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user