Skip to content

Commit

Permalink
Add example navigation menu for dropdown product menu
Browse files Browse the repository at this point in the history
This is for:

- #176

But this is still just proof of concept level so far, the mobile menu is
a bit broken by this and the actual structure needs shaping up still.
  • Loading branch information
agjohnson committed Aug 10, 2023
1 parent 05d6091 commit 69e8441
Showing 1 changed file with 43 additions and 2 deletions.
45 changes: 43 additions & 2 deletions readthedocs_theme/templates/includes/topnav.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,47 @@
{% macro menu_main() %}
<a class="item{% if page and page.slug == 'features' %} active" aria-current="page{% endif %}" href="{{ SITEURL }}/features/">Features</a>
<a class="item{% if page and page.slug == 'pricing' %} active" aria-current="page{% endif %}" href="{{ SITEURL }}/pricing/">Pricing</a>
<div
class="ui wide dropdown item{% if page and page.slug == 'features' %} active"
aria-current="page{% endif %}"
href="{{ SITEURL }}/features/"
data-module="dropdown"
data-module-on="hover">
Product
<div class="menu">

<div class="header">About</div>
<a class="item" href="/features">How Read the Docs works</a>
<div class="item">
Features
<i class="dropdown fad fa-caret-right icon"></i>
<div class="menu">
<a class="item" href="#">Building</a>
<a class="item" href="#">Hosting</a>
<a class="item" href="#">Authentication</a>
<a class="item" href="#">Management</a>
</div>
</div>

<div class="item">
Authoring tools
<i class="dropdown fad fa-caret-right icon"></i>
<div class="menu">
<a class="item" href="#">Sphinx</a>
<a class="item" href="#">Mkdocs</a>
<a class="item" href="#">Custom tools</a>
</div>
</div>

<a class="item" href="/choosing-a-platform/">Choosing a platform</a>

<div class="divider"></div>
<div class="header">Solutions</div>
<a class="item" href="#">For enterprise</a>
<a class="item" href="#">For engineering teams</a>
</div>
</div>
<a class="item{% if page and page.slug == 'pricing' %} active" aria-current="page{% endif %}" href="{{ SITEURL }}/pricing/">
Pricing
</a>
{% endmacro %}

{% macro menu_help() %}
Expand Down

0 comments on commit 69e8441

Please sign in to comment.