From 6ee8ad125692175ddfb705080a4bc54b76c5a4f6 Mon Sep 17 00:00:00 2001 From: Debulois Date: Wed, 6 Apr 2022 21:37:53 +0200 Subject: Finalisation, affinage du css et ajout d'un système de vérification pour les mdp pour qu'ils soient forts. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Static/Js/main.js | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) (limited to 'Static/Js/main.js') diff --git a/Static/Js/main.js b/Static/Js/main.js index 7f3935c..3a6c3e5 100644 --- a/Static/Js/main.js +++ b/Static/Js/main.js @@ -1,17 +1,25 @@ -// **************************************************************************** -// Main -// **************************************************************************** - + +// ############################################################################ +// # # +// # Description: JS utile un peu de partout # +// # # +// ############################################################################ // Site web utilisés pour JS: // https://www.w3schools.com/js/default.asp // https://stackoverflow.com/ -// Changement de langue + +// **************************************************************************** +// CHANGEMENT DE LANGUE +// **************************************************************************** document.getElementById("navSelLang").addEventListener("change", () => { document.getElementById("navFormLang").submit(); }); -// TODO: A commenter + +// **************************************************************************** +// TOGGLE UNE CLASSE SUR UN ELEMENT PARMIS PLUSIEURS IDENTIQUES +// **************************************************************************** function show(parentId, element, id, className) { let elements = document.getElementById(parentId).getElementsByTagName(element); elements[id].classList.add(className); @@ -22,8 +30,12 @@ function show(parentId, element, id, className) { } } + +// **************************************************************************** +// AFFICHER LA BAR DE NAVIGATION +// **************************************************************************** function showNavButtons() { document.getElementsByTagName("nav")[0].classList.toggle("showNav") // first-child à chaque fois document.getElementsByTagName("header")[0].getElementsByTagName("a")[0].getElementsByTagName("i")[0].classList.toggle("navLinkClicked") -} \ No newline at end of file +} -- cgit v1.2.3