diff --git a/assets/brain.js b/assets/brain.js index 90c88c3..8c892f7 100644 --- a/assets/brain.js +++ b/assets/brain.js @@ -119,6 +119,9 @@ const photosUploadInit = () => { }; } -init(); + +document.addEventListener('turbo:load', (event) => { + init(); +}); diff --git a/assets/landing.js b/assets/landing.js index ae1fb26..63635b5 100644 --- a/assets/landing.js +++ b/assets/landing.js @@ -57,6 +57,9 @@ const scrollTo = () => { }); } -mobileMenu(); -jobInfoToggle(); -scrollTo(); \ No newline at end of file + +document.addEventListener('turbo:load', (event) => { + mobileMenu(); + jobInfoToggle(); + scrollTo(); +}); \ No newline at end of file diff --git a/assets/main.js b/assets/main.js index 9f437fd..2b9ff28 100644 --- a/assets/main.js +++ b/assets/main.js @@ -47,6 +47,7 @@ const album = () => { } - -mobileMenu(); -album(); \ No newline at end of file +document.addEventListener('turbo:load', (event) => { + mobileMenu(); + album(); +}); \ No newline at end of file diff --git a/templates/brain/base.html.twig b/templates/brain/base.html.twig index 540684c..0051621 100644 --- a/templates/brain/base.html.twig +++ b/templates/brain/base.html.twig @@ -3,7 +3,7 @@ {% block title %}Welcome!{% endblock %} - + {% block stylesheets %} {% endblock %}