Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"More >>" Dropdown in navbar #72

Draft
wants to merge 1 commit into
base: v2
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions static/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,14 @@ html {
transform: none;
}

.dropdown:hover .dropdown-menu {
display: block;
}

.dropdown-menu {
background-color: white;
}

.swiper-container {
z-index: 0;
}
Expand Down
21 changes: 21 additions & 0 deletions templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
<body class="antialiased bg-white md:max-w-[1092px] mx-auto w-full" style="font-family: museo-sans, sans-serif;">
<main>
<header class="py-12 pl-6 pr-8 mg:py-16 lg:py-16 md:px-12 bg-white">
<!-- Mobile navbar -->
<div class="md:hidden">
<nav class="w-full items-center flex justify-between">
<a href="/">
Expand Down Expand Up @@ -61,6 +62,7 @@
</nav>
</div>

<!-- Desktop Navbar -->
<nav>
<div class="hidden md:flex items-center justify-between">
<a href="/">
Expand All @@ -83,6 +85,25 @@
</li>
{% endif %}
{% endfor %}
<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 ">
<span> more » </span>
<ul class="dropdown-menu absolute hidden h-auto flex pt-1 ">
{% for tab in config.extra.tabs %}
{% if not tab.nav %}
<li class="pt-3">
<a href="{{ tab.path }}"
class="font-normal text-base leading-tight tracking-wider md:pr-4 lg:pr-8 xl:pr-8 text-black hover:text-pink-500 ">
{% if current_path == tab.path %}
{{ tab.name | replace(from="o", to="<span class='font-bold text-pink-500'>o</span>") | safe }}
{% else %}
{{ tab.name }}
{% endif %}
</a>
</li>
{% endif %}
{% endfor %}
</div>
</div>
</ul>
</div>
</nav>
Expand Down