From 34ebb3dd7988ec5ca7e5136999cd8296c0b693aa Mon Sep 17 00:00:00 2001 From: Boris Date: Sun, 30 Oct 2022 19:19:38 +0100 Subject: [PATCH] Oui, la Bureautique peut casser des briques --- assets/js/places.js | 19 +++++++++++++++++++ footer.php | 19 ++++++++++++------- header.php | 15 +++++++++------ map.php | 2 +- themes/magie/{ => js}/deco.js | 0 themes/magie/js/layout.js | 1 + themes/magie/layout.js | 1 - 7 files changed, 42 insertions(+), 15 deletions(-) create mode 100644 assets/js/places.js rename themes/magie/{ => js}/deco.js (100%) create mode 120000 themes/magie/js/layout.js delete mode 120000 themes/magie/layout.js diff --git a/assets/js/places.js b/assets/js/places.js new file mode 100644 index 0000000..4ce3f89 --- /dev/null +++ b/assets/js/places.js @@ -0,0 +1,19 @@ +var places = document.querySelectorAll('.place a'); + +for (places in place) { + + place.addEventListener('click', function (e) { + + e.stopPropagation(); + + console.log(e.target); + + console.log("current Target : "); + + console.log(e.currentTarget); + + console.log(e.target.getAttribute('href')); + + e.target.preventDefault(); + }); +} diff --git a/footer.php b/footer.php index 8c4b186..ea9b2db 100644 --- a/footer.php +++ b/footer.php @@ -5,17 +5,22 @@ - '; + foreach ($files as $f) { + + echo ' + + '; + } } ?> + + diff --git a/header.php b/header.php index 87f9f39..1c1e3f6 100644 --- a/header.php +++ b/header.php @@ -8,14 +8,17 @@ $webpageTitle = isset($webpageTitle) ? $webpageTitle : DEFAULT_WEBPAGE_TITLE; <?php echo $webpageTitle; ?> '; + foreach ($files as $f) { + + echo ' + '; + } } ?> diff --git a/map.php b/map.php index 563cb02..916ba29 100644 --- a/map.php +++ b/map.php @@ -110,7 +110,7 @@ echo ' >'; echo ' - '; + '; if (isset($place->_source->avatar->_content) and !empty($place->_source->avatar->_content)) { diff --git a/themes/magie/deco.js b/themes/magie/js/deco.js similarity index 100% rename from themes/magie/deco.js rename to themes/magie/js/deco.js diff --git a/themes/magie/js/layout.js b/themes/magie/js/layout.js new file mode 120000 index 0000000..054e121 --- /dev/null +++ b/themes/magie/js/layout.js @@ -0,0 +1 @@ +../../spationaute/js/layout.js \ No newline at end of file diff --git a/themes/magie/layout.js b/themes/magie/layout.js deleted file mode 120000 index 4e58ba6..0000000 --- a/themes/magie/layout.js +++ /dev/null @@ -1 +0,0 @@ -../spationaute/layout.js \ No newline at end of file