Skip to content

Commit 0b24e99

Browse files
Bgreen23Brandon Green
andauthored
Move Hub link (#66)
* wip move hub link to resources dropdown * remove css for active class * wip add resources option to array * Add resource dropdown options to array for readability * updates based on PR feedback Co-authored-by: Brandon Green <brandon@shiftlabny.com>
1 parent fea583d commit 0b24e99

File tree

2 files changed

+9
-18
lines changed

2 files changed

+9
-18
lines changed

_includes/main_menu.html

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,12 @@
44
<a href="{{ site.baseurl }}/get-started">Get Started</a>
55
</li>
66

7-
<li class="main-menu-item {% if current[1] == 'ecosystem' or current[1] == 'hub' %}active{% endif %}">
7+
<li class="main-menu-item {% if current[1] == 'ecosystem' %}active{% endif %}">
88

99
<div id="dropdownMenuButton" data-toggle="ecosystem-dropdown" class="ecosystem-dropdown">
10-
<a class="ecosystem-option with-right-white-arrow">
10+
<a class="ecosystem-option" href="{{ site.baseurl }}/ecosystem">
1111
Ecosystem
1212
</a>
13-
<div class="ecosystem-dropdown-menu">
14-
<a class="nav-dropdown-item" href="{{ site.baseurl }}/hub">
15-
<span class=dropdown-title>Models (Beta)</span>
16-
<p>Discover, publish, and reuse pre-trained models</p>
17-
</a>
18-
<a class="nav-dropdown-item" href="{{ site.baseurl }}/ecosystem">
19-
<span class=dropdown-title>Tools & Libraries</span>
20-
<p>Explore the ecosystem of tools and libraries</p>
21-
</a>
22-
</div>
2313
</div>
2414
</li>
2515

@@ -39,7 +29,9 @@
3929
<a href="{{ site.baseurl }}/docs">Docs</a>
4030
</li>
4131

42-
<li class="main-menu-item {% if current[1] == 'resources' or current[1] == 'features' %}active{% endif %}">
32+
{% assign resources = "resources, features, hub" | split: ", " %}
33+
34+
<li class="main-menu-item {% if resources contains current[1] %}active{% endif %}">
4335

4436
<div id="resourcesDropdownButton" data-toggle="resources-dropdown" class="resources-dropdown">
4537
<a class="resource-option with-right-white-arrow">
@@ -54,6 +46,10 @@
5446
<span class=dropdown-title>About</span>
5547
<p>Learn about PyTorch’s features and capabilities</p>
5648
</a>
49+
<a class="nav-dropdown-item" href="{{ site.baseurl }}/hub">
50+
<span class=dropdown-title>Models (Beta)</span>
51+
<p>Discover, publish, and reuse pre-trained models</p>
52+
</a>
5753
<a class="nav-dropdown-item" href="{{ site.baseurl }}/#community-module">
5854
<span class=dropdown-title>Community</span>
5955
<p>Join the PyTorch developer community to contribute, learn, and get your questions answered.</p>

assets/main-menu-dropdown.js

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,3 @@
1-
$("[data-toggle='ecosystem-dropdown']").hover(function() {
2-
toggleDropdown($(this).attr("data-toggle"));
3-
toggleArrowClass(".ecosystem-option");
4-
});
5-
61
$("[data-toggle='resources-dropdown']").hover(function() {
72
toggleDropdown($(this).attr("data-toggle"));
83
toggleArrowClass(".resource-option");

0 commit comments

Comments
 (0)