Skip to content

Commit

Permalink
style: remove dropdown from navbar links
Browse files Browse the repository at this point in the history
Signed-off-by: Akshay Mestry <[email protected]>
  • Loading branch information
xames3 committed Dec 8, 2024
1 parent 35098d7 commit 3362b37
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 27 deletions.
19 changes: 6 additions & 13 deletions coeus_sphinx_theme/navbar.html.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Coeus Sphinx Theme Main Navigation Bar Template
Author: Akshay Mestry <[email protected]>
Created on: Sunday, October 06 2024
Last updated on: Sunday, November 24 2024
Last updated on: Saturday, December 07 2024
-->
<header class="header-pill glass-bevel">
{%- block header_left %}
Expand Down Expand Up @@ -45,18 +45,11 @@ Last updated on: Sunday, November 24 2024
{%- if navbar_links|tobool -%}
<nav>
{%- for caption, pages in navbar_links.items() %}
<div class="header-dropdown">
<button>{{ caption }}</button>
<div class="header-dropdown-content glass-bevel">
{%- for title, url in pages.items() %}
{%- if url.startswith("http") %}
<a href="{{ url }}" rel="nofollow noopener">{{ title }}</a>
{%- else %}
<a href="{{ pathto(url) }}">{{ title }}</a>
{%- endif %}
{%- endfor %}
</div>
</div>
{%- if pages.startswith("http") %}
<a href="{{ pages }}" rel="nofollow noopener">{{ caption }}</a>
{%- else %}
<a href="{{ pathto(pages) }}">{{ caption }}</a>
{%- endif %}
{%- endfor %}
</nav>
{%- endif %}
Expand Down
21 changes: 7 additions & 14 deletions coeus_sphinx_theme/navbar_links.html.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,17 @@ Coeus Sphinx Theme Navigation Bar Template
Author: Akshay Mestry <[email protected]>
Created on: Monday, August 26 2024
Last updated on: Monday, August 26 2024
Last updated on: Saturday, December 07 2024
-->
{% block navigation_bar_links %}
{%- if navbar_links|tobool -%}
<nav class="flex md:hidden flex-col font-medium mt-4">
{%- for caption, pages in navbar_links.items() %}
<div class="dropdown">
<button class="dropbtn">{{ caption }}</button>
<div class="dropdown-content">
{%- for title, url in pages.items() %}
{%- if url.startswith("http") %}
<a href="{{ url }}" rel="nofollow noopener">{{ title }}</a>
{%- else %}
<a href="{{ pathto(url) }}">{{ title }}</a>
{%- endif %}
{%- endfor %}
</div>
</div>
{%- for caption, pages in navbar_links.items()%}
{%- if pages.startswith("http") %}
<a href="{{ pages }}" rel="nofollow noopener">{{ caption }}</a>
{%- else %}
<a href="{{ pathto(pages) }}">{{ caption }}</a>
{%- endif %}
{%- endfor %}
</nav>
{%- endif %}
Expand Down

0 comments on commit 3362b37

Please sign in to comment.