make tools submenu visible only on click/tap
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Aadil Ayub 2022-03-19 14:52:05 +05:00
parent d2b4b57d28
commit bff30aeed6
2 changed files with 14 additions and 1 deletions

View File

@ -38,7 +38,7 @@
<ul> <ul>
<li><a href="/">home</a></li> <li><a href="/">home</a></li>
<li><a href="/about/">about</a></li> <li><a href="/about/">about</a></li>
<li class="has-submenu">tools <li class="has-submenu" onclick="this.classList.toggle('opened')">tools
<ul class="submenu"> <ul class="submenu">
<li><a href="/calendar/">calendar</a></li> <li><a href="/calendar/">calendar</a></li>
<li><a href="/tv/">tv</a></li> <li><a href="/tv/">tv</a></li>

View File

@ -269,6 +269,19 @@ body {
display: flex; display: flex;
} }
#top-menu .drawer .submenu {
visibility: hidden;
}
#top-menu .drawer .submenu li {
padding: 0;
padding-top: 1em;
}
#top-menu .drawer .opened .submenu {
visibility: visible;
}
.drawer .has-submenu { .drawer .has-submenu {
padding-left: 2em; padding-left: 2em;
} }