chore: refactor navbar, remove trailing whitespace

main-old
Francesco Minnocci 3 years ago
parent 9890bd2c58
commit 7a7fef0580

@ -28,7 +28,6 @@
box-sizing: border-box;
}
html, body {
margin: 0;
}
@ -59,7 +58,7 @@ body {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
@ -215,7 +214,6 @@ nav .nav-main .nav-item.dropdown .nav-items {
display: none;
background: var(--bg-dark);
border-radius: 4px;
border: 1px solid var(--bg-darker-2);
@ -352,5 +350,5 @@ a:hover {
/* Responsiveness */
@media screen and (max-width: 950px) {
}
}

@ -32,11 +32,11 @@
document.addEventListener('DOMContentLoaded', () => {
const $toggle = document.querySelector('#toggle-dark-mode');
const $toggleIcon = document.querySelector('#toggle-dark-mode i');
const $toggleIcon = document.querySelector('#toggle-dark-mode i');
// Loads prefered dark from from localStorage or defaults to media query.
let prefersDarkMode = localStorage.getItem('theme') !== undefined ? localStorage.getItem('theme') === 'dark' : window.matchMedia('(prefers-color-scheme: dark)').matches;
function storePrefersDarkMode(mode) {
prefersDarkMode = mode;
localStorage.setItem('theme', mode ? 'dark' : 'light');
@ -73,9 +73,6 @@
<div class="nav-item">
<a class="nav-element" href="/utenti">Utenti</a>
</div>
<div class="nav-item">
<a class="nav-element" href="/news">News</a>
</div>
<div class="nav-item dropdown">
<div class="name">
<a class="nav-element" href="/progetti">
@ -94,11 +91,31 @@
<div class="nav-item">
<a class="nav-element" href="{{ .Config.ForumUrl }}">Zulip</a>
</div>
<div class="nav-item">
<a class="nav-element" href="/seminari">Seminari</a>
</div>
</div>
</div>
<div class="nav-item dropdown">
<div class="name">
<a class="nav-element" href="/risorse">
<div class="icon">
<i class="fas fa-chevron-down"></i>
</div>
<div class="label">
Risorse
</div>
</a>
</div>
<div class="nav-items">
<div class="nav-item">
<a class="nav-element" href="/news">News</a>
</div>
<div class="nav-item">
<a class="nav-element" href="/guide">Guide</a>
</div>
<div class="nav-item">
<a class="nav-element" href="/seminari">Seminari</a>
<a class="nav-element" href="/link">Link Utili</a>
</div>
</div>
</div>
@ -141,4 +158,4 @@
</body>
</html>
{{end}}
{{end}}

Loading…
Cancel
Save