create "tools" dropdown menu
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Aadil Ayub 2022-03-18 18:18:00 +05:00
parent 6bc0982187
commit 2257589b0c
2 changed files with 86 additions and 45 deletions

View File

@ -1,4 +1,4 @@
<header id="top-menu">
<header id="top-menu">
<div class="mobile-menu">
<button class="hamburger" onclick="this.classList.toggle('opened'); document.querySelector('.drawer').classList.toggle('opened');">
<svg width="30" fill="#3C3D3D" viewBox="0 0 50 40">
@ -21,10 +21,16 @@
<li><a href="/">home</a></li>
<li><a href="/about/">about</a></li>
<li><a href="/calendar/">calendar</a></li>
<li class="has-submenu">tools
<ul class="submenu">
<li><a href="/tv/">tv</a></li>
<li><a href="/social/">social</a></li>
<li><a href="/pen/">pen</a></li>
<li><a href="/shouts/">shouts</a></li>
<li><a href="/kios/">kios</a></li>
<li><a href="/gallery/">gallery</a></li>
</ul>
</li>
</ul>
</nav>
@ -47,4 +53,4 @@
</div>
<a href="https://members.lumbung.space" id="login">login</a>
</div>
</header>
</header>

View File

@ -130,10 +130,6 @@ body {
width: 100%;
}
.entries {
padding-top: 10%;
}
.p-name {
padding-right: 1em;
}
@ -141,11 +137,10 @@ body {
/* base header & menu */
#top-menu {
padding: 1rem;
padding: 1.5rem 1rem 0;
display: grid;
grid-template-columns: 300px 1fr auto;
align-items: flex-start;
padding-top: 1.5rem;
}
.home-link {
@ -234,6 +229,46 @@ body {
padding: 0.5em;
}
/* styles for "tools" dropdown menu */
#top-menu ul.submenu {
flex-direction: column;
margin-left: 0;
}
.menu .submenu {
visibility: hidden;
transition: all 0.5s ease-in-out;
}
.submenu li {
margin: 2px 0;
}
.has-submenu {
cursor: pointer;
}
.has-submenu:hover .submenu {
visibility: visible;
}
#top-menu ul.submenu {
margin-left: 11px;
margin-top: 10px;
border: 1px solid ;
gap: 0.25em;
padding: 0.5em;
}
#top-menu a {
padding: 0 5px;
}
#top-menu .submenu a {
margin: 0;
display: flex;
}
/*Article Summary Cards*/