Nantes Université

Skip to content
Extraits de code Groupes Projets
Valider 6d3d702c rédigé par Corentin's avatar Corentin
Parcourir les fichiers

[FRONT] Ajout de listener pour la navbar

parent ad2b10ab
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>Connexion_PolyGestion</title>
<title>PolyGestion</title>
<!-- Mustache JS -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/mustache.js/3.0.1/mustache.min.js" async></script>
<!-- Main JS -->
......@@ -15,9 +14,7 @@
<!-- Style CSS -->
<link rel="stylesheet" href="./css/style.css">
</head>
<body>
</body>
</html>
\ No newline at end of file
......@@ -63,7 +63,7 @@
}
.card-body > div {
margin-bottom: 0em;
margin-bottom: 0;
}
.card-body label {
......@@ -133,4 +133,8 @@ footer {
border: 1px solid #ccc;
border-radius: 4px;
margin-bottom: 20px;
}
.navbar-collapse ul {
margin-left: 1em;
}
\ No newline at end of file
......@@ -15,8 +15,20 @@ async function render() {
const rendered = Mustache.render(template, context, partials);
let body = document.querySelector('body');
body.innerHTML = rendered;
navbarListener();
});
}
function navbarListener() {
document.querySelector('button').addEventListener('click', () => {
let nav = document.querySelector('#navbarSupportedContent');
if (nav.style.display === 'block')
nav.style.display = 'none';
else
nav.style.display = 'block';
});
}
window.onload = () => {
render().then(() => console.log('Rendered'));
};
\ No newline at end of file
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter