From 811b224d6a8a644dffd6c34cb54acbbd1a0f4db0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Valentin=20Mogu=C3=A9rou?= Date: Wed, 8 May 2024 10:01:24 +0200 Subject: [PATCH] division en fichiers --- navigator.css | 4 ++-- script.js | 12 ++++++++++++ 2 files changed, 14 insertions(+), 2 deletions(-) create mode 100644 script.js diff --git a/navigator.css b/navigator.css index 7866186..63b25cb 100644 --- a/navigator.css +++ b/navigator.css @@ -31,7 +31,7 @@ body { cursor: pointer; } -.unified_navigator #dropdown-indicator { +.unified_navigator #navigator-dropdown-indicator { display: none; } @@ -60,7 +60,7 @@ body { transform: scale(1.1); } - .unified_navigator i, .unified_navigator #dropdown-indicator { + .unified_navigator i, .unified_navigator #navigator-dropdown-indicator { display: inline; margin: 0 5px; } diff --git a/script.js b/script.js new file mode 100644 index 0000000..568a977 --- /dev/null +++ b/script.js @@ -0,0 +1,12 @@ +function navigator_toggleMenu() { + if (document.body.clientWidth > 600) + return document.location = "https://mp2i-vms.fr" + + if (document.getElementById("menu-sec").classList.contains("hidden")) { + document.getElementById("menu-sec").classList.remove("hidden"); + document.getElementById("navigator-dropdown-indicator").className = "fa-solid fa-caret-up"; + } else { + document.getElementById("menu-sec").classList.add("hidden"); + document.getElementById("navigator-dropdown-indicator").className = "fa-solid fa-caret-down"; + } +} \ No newline at end of file