navigation prev next browser
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import { initVueContentModale } from './utils/vue-setup';
|
||||
import { processClickableElements } from './utils/process-clickable-elements';
|
||||
import { handleReactiveness, setMenuToggle, setHamburgerWhenLogged } from './utils/layout-setup';
|
||||
import { initFirstLoadRouting, handleClickableElements } from './utils/handle-navigation';
|
||||
import { initFirstLoadRouting, handleClickableElements, handleBrowserNavigation } from './utils/handle-navigation';
|
||||
import { setupMapStore } from './utils/map-setup';
|
||||
|
||||
import '../scss/main.scss'
|
||||
@@ -11,11 +11,11 @@ import '../scss/main.scss'
|
||||
(function ($, Drupal, drupalSettings) {
|
||||
const CaravaneTheme = function () {
|
||||
function init () {
|
||||
console.log('DrupalSettings', drupalSettings);
|
||||
console.log('DrupalSettings', drupalSettings);
|
||||
|
||||
const baseUrl = window.location.protocol + "//" + window.location.host;
|
||||
const siteName = document.querySelector('#site_name').innerText;
|
||||
const { store, mapStore, router, route } = initVueContentModale();
|
||||
const { store, mapStore, router, route } = initVueContentModale();
|
||||
|
||||
handleReactiveness();
|
||||
setMenuToggle();
|
||||
@@ -25,8 +25,8 @@ import '../scss/main.scss'
|
||||
|
||||
Drupal.behaviors.customLeafletInteraction = {
|
||||
attach: function(context, settings) {
|
||||
$(context).on('leafletMapInit', function (e, settings, map, mapid, markers) {
|
||||
const {
|
||||
$(context).on('leafletMapInit', function (e, settings, map, mapid, markers) {
|
||||
const {
|
||||
etapeListLinks,
|
||||
generalListLinks,
|
||||
logoLink,
|
||||
@@ -39,6 +39,10 @@ import '../scss/main.scss'
|
||||
initFirstLoadRouting(store, router, baseUrl, siteName);
|
||||
|
||||
handleClickableElements(clickableElements, store, router, baseUrl, siteName, mapStore);
|
||||
|
||||
window.addEventListener("popstate", () => {
|
||||
handleBrowserNavigation(store, baseUrl, siteName, mapStore);
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -47,4 +51,4 @@ import '../scss/main.scss'
|
||||
init()
|
||||
}
|
||||
CaravaneTheme()
|
||||
})(jQuery, Drupal, drupalSettings)
|
||||
})(jQuery, Drupal, drupalSettings)
|
||||
|
Reference in New Issue
Block a user