base.html, style.css: Aggiunti drop down e relativi stili

main-old
Antonio De Lucreziis 4 years ago
parent 646a078131
commit eea1291887

@ -94,7 +94,66 @@ nav {
font-size: 130%; font-size: 130%;
font-weight: bold; font-weight: bold;
border: 2px solid; border: 2px solid black;
}
.nav-dropdown {
flex-grow: 1;
margin: -2px;
max-width: 100%;
display: flex;
flex-direction: column;
position: relative;
z-index: 1;
}
.nav-dropdown .label {
display: flex;
align-items: center;
justify-content: center;
width: 100%;
height: 2.5rem;
padding: 0 0.75rem;
font-size: 130%;
font-weight: bold;
border: 2px solid black;
}
.nav-dropdown .label .icons8 {
width: 16px;
height: 16px;
margin-left: 0.5rem;
transform: translate(0, 0.1rem);
}
.nav-dropdown .dropdown {
position: absolute;
top: 100%;
width: 100%;
/* margin-bottom: 0.5rem; */
display: flex;
flex-direction: column;
gap: 2px;
border: 2px solid black;
background: white;
}
.nav-dropdown:not(:hover) .dropdown {
display: none;
} }
nav a { nav a {
@ -177,7 +236,7 @@ header .title h1 {
padding: 0.125rem 0.25rem; padding: 0.125rem 0.25rem;
border: 2px solid; border: 2px solid black;
} }
.user h4 { .user h4 {
@ -216,6 +275,10 @@ footer {
border-bottom: none; border-bottom: none;
} }
footer a, footer a:visited {
color: white;
}
.footer-item { .footer-item {
padding: 0.5rem; padding: 0.5rem;
font-size: 90%; font-size: 90%;
@ -367,6 +430,7 @@ h2 .icons8 {
} }
.hfill { .hfill {
/* min-height: 0.5rem; */
flex-grow: 1000; flex-grow: 1000;
} }
@ -382,6 +446,40 @@ h2 .icons8 {
border-left: none; border-left: none;
border-right: none; border-right: none;
} }
}
/* Large screen */
@media screen and (min-width: 421px) {
.nav-dropdown .dropdown {
margin-top: -2px;
}
}
/* Mobile screen */
@media screen and (max-width: 420px) and (orientation: portrait) {
nav {
flex-direction: column;
}
.nav-dropdown:hover {
padding: 0 0.25rem 0.25rem;
}
.nav-dropdown, .nav-dropdown .nav-item {
margin: -2px 0;
}
.nav-item, .nav-dropdown .label {
max-width: 100%;
border-left: none;
border-right: none;
}
.nav-dropdown .dropdown {
position: relative;
border: 4px solid black;
border-top-width: 2px;
}
} }

@ -39,17 +39,41 @@
<div class="nav-item"> <div class="nav-item">
<a href="/">PHC</a> <a href="/">PHC</a>
</div> </div>
<div class="nav-dropdown">
<div class="label">
Risorse
<img class="icons8" src="https://img.icons8.com/ios-filled/100/000000/expand-arrow.png"/>
</div>
<div class="dropdown">
<div class="nav-item">
<a href="/blog/">Notizie</a>
</div>
<div class="nav-item">
<a href="/blog/categories/guide/">Guide</a>
</div>
</div>
</div>
<div class="nav-dropdown">
<div class="label">
Servizi
<img class="icons8" src="https://img.icons8.com/ios-filled/100/000000/expand-arrow.png"/>
</div>
<div class="dropdown">
<div class="nav-item"> <div class="nav-item">
<a href="/utenti">Utenti</a> <a href="/utenti">Utenti</a>
</div> </div>
<div class="nav-item"> <div class="nav-item">
<a href="/blog">Notizie</a> <a href="#">Git</a>
</div> </div>
<div class="nav-item"> <div class="nav-item">
<a href="https://git.phc.dm.xxxxx.xx">Git</a> <a href="#">Matrix</a>
</div> </div>
<div class="nav-item"> <div class="nav-item">
<a href="https://forum.phc.dm.xxxxx.xx">Forum</a> <a href="#">Forum</a>
</div>
</div>
</div> </div>
<!-- Spacing --> <!-- Spacing -->

Loading…
Cancel
Save