Skip to content

Commit dae405a

Browse files
author
Shivam
committed
WIP more dropdown
1 parent fd6f67e commit dae405a

2 files changed

Lines changed: 29 additions & 0 deletions

File tree

static/style.css

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,14 @@ html {
8585
transform: none;
8686
}
8787

88+
.dropdown:hover .dropdown-menu {
89+
display: block;
90+
}
91+
92+
.dropdown-menu {
93+
background-color: white;
94+
}
95+
8896
.swiper-container {
8997
z-index: 0;
9098
}

templates/base.html

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
<body class="antialiased bg-white md:max-w-[1092px] mx-auto w-full" style="font-family: museo-sans, sans-serif;">
2525
<main>
2626
<header class="py-12 pl-6 pr-8 mg:py-16 lg:py-16 md:px-12 bg-white">
27+
<!-- Mobile navbar -->
2728
<div class="md:hidden">
2829
<nav class="w-full items-center flex justify-between">
2930
<a href="/">
@@ -61,6 +62,7 @@
6162
</nav>
6263
</div>
6364

65+
<!-- Desktop Navbar -->
6466
<nav>
6567
<div class="hidden md:flex items-center justify-between">
6668
<a href="/">
@@ -83,6 +85,25 @@
8385
</li>
8486
{% endif %}
8587
{% endfor %}
88+
<div class="dropdown font-normal text-base leading-tight tracking-wider md:pr-4 lg:pr-8 xl:pr-8 text-black hover:text-pink-500 ">
89+
<span> more » </span>
90+
<ul class="dropdown-menu absolute hidden h-auto flex pt-1 ">
91+
{% for tab in config.extra.tabs %}
92+
{% if not tab.nav %}
93+
<li class="pt-3">
94+
<a href="{{ tab.path }}"
95+
class="font-normal text-base leading-tight tracking-wider md:pr-4 lg:pr-8 xl:pr-8 text-black hover:text-pink-500 ">
96+
{% if current_path == tab.path %}
97+
{{ tab.name | replace(from="o", to="<span class='font-bold text-pink-500'>o</span>") | safe }}
98+
{% else %}
99+
{{ tab.name }}
100+
{% endif %}
101+
</a>
102+
</li>
103+
{% endif %}
104+
{% endfor %}
105+
</div>
106+
</div>
86107
</ul>
87108
</div>
88109
</nav>

0 commit comments

Comments
 (0)