Design
This commit is contained in:
parent
7eca6af0c2
commit
443a272a5e
2 changed files with 28 additions and 1 deletions
25
static/javascript/journuit.js
Normal file
25
static/javascript/journuit.js
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
// let toggle = document.querySelector('.toggle-darkmode');
|
||||||
|
let toggle = document.querySelector('#jour-nuit');
|
||||||
|
|
||||||
|
function lesgvGoDark(toggle) {
|
||||||
|
localStorage.removeItem('lightmode');
|
||||||
|
localStorage.setItem('darkmode', true);
|
||||||
|
toggle.innerText = 'Nuit';
|
||||||
|
document.body.classList.add('darkmode');
|
||||||
|
}
|
||||||
|
|
||||||
|
function lesgvGoLight(toggle) {
|
||||||
|
localStorage.removeItem('darkmode');
|
||||||
|
localStorage.setItem('lightmode', true);
|
||||||
|
toggle.innerText = 'Jour';
|
||||||
|
document.body.classList.remove('darkmode');
|
||||||
|
}
|
||||||
|
|
||||||
|
function toggleDarkmode() {
|
||||||
|
let toggle = document.querySelector('#jour-nuit');
|
||||||
|
if (document.body.classList.contains('darkmode')) {
|
||||||
|
lesgvGoLight(toggle);
|
||||||
|
} else {
|
||||||
|
lesgvGoDark(toggle);
|
||||||
|
}
|
||||||
|
}
|
|
@ -55,7 +55,7 @@
|
||||||
<li><a href="/invite/new_account">Créer un nouveau compte</a></li>
|
<li><a href="/invite/new_account">Créer un nouveau compte</a></li>
|
||||||
{{end}}
|
{{end}}
|
||||||
{{if .Login.CanAdmin}}
|
{{if .Login.CanAdmin}}
|
||||||
<li>Administration</li>
|
<li><a href="#">Administration</a></li>
|
||||||
<ul class="submenu">
|
<ul class="submenu">
|
||||||
<li><a href="/admin/activate">Activer des Utilisateur·ices</a></li>
|
<li><a href="/admin/activate">Activer des Utilisateur·ices</a></li>
|
||||||
<li><a href="/admin/users">Utilisateur·ices</a></li>
|
<li><a href="/admin/users">Utilisateur·ices</a></li>
|
||||||
|
@ -64,6 +64,7 @@
|
||||||
<li><a href="/admin/ldap/{{.BaseDN}}">Explorateur LDAP</a></li>
|
<li><a href="/admin/ldap/{{.BaseDN}}">Explorateur LDAP</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
|
<li> < <a href="#" class="jour-nuit" id="jour-nuit">Jour et nuit</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
{{end}}
|
{{end}}
|
||||||
|
@ -75,5 +76,6 @@
|
||||||
<script src="/static/javascript/jquery.slim.min.js"></script>
|
<script src="/static/javascript/jquery.slim.min.js"></script>
|
||||||
<script src="/static/javascript/bootstrap.bundle.min.js"></script>
|
<script src="/static/javascript/bootstrap.bundle.min.js"></script>
|
||||||
<script src="/static/javascript/lesgv.js"></script>
|
<script src="/static/javascript/lesgv.js"></script>
|
||||||
|
<script src="/static/javascript/journuit.js"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
Loading…
Reference in a new issue