Skip to content

Commit 4a0a2f7

Browse files
authored
Merge pull request #53 from pytorch/revert-52-update-nav-menu
Revert "Update nav menu"
2 parents d043338 + 1a74f48 commit 4a0a2f7

File tree

4 files changed

+8
-185
lines changed

4 files changed

+8
-185
lines changed

js/main-menu-dropdown.js

Lines changed: 0 additions & 25 deletions
This file was deleted.

pytorch_sphinx_theme/layout.html

Lines changed: 6 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -94,25 +94,11 @@
9494
</li>
9595

9696
<li>
97-
<div class="ecosystem-dropdown">
98-
<a id="dropdownMenuButton" data-toggle="ecosystem-dropdown">
99-
Ecosystem
100-
</a>
101-
<div class="ecosystem-dropdown-menu">
102-
<a class="nav-dropdown-item" href="{{ theme_variables.external_urls['hub'] }}"">
103-
<span class=dropdown-title>Models (Beta)</span>
104-
<p>Discover, publish, and reuse pre-trained models</p>
105-
</a>
106-
<a class="nav-dropdown-item" href="{{ theme_variables.external_urls['ecosystem'] }}">
107-
<span class=dropdown-title>Tools & Libraries</span>
108-
<p>Explore the ecosystem of tools and libraries</p>
109-
</a>
110-
</div>
111-
</div>
97+
<a href="{{ theme_variables.external_urls['features'] }}">Features</a>
11298
</li>
11399

114100
<li>
115-
<a href="{{ theme_variables.external_urls['mobile'] }}">Mobile</a>
101+
<a href="{{ theme_variables.external_urls['ecosystem'] }}">Ecosystem</a>
116102
</li>
117103

118104
<li>
@@ -128,21 +114,7 @@
128114
</li>
129115

130116
<li>
131-
<div class="resources-dropdown">
132-
<a id="resourcesDropdownButton" data-toggle="resources-dropdown">
133-
Resources
134-
</a>
135-
<div class="resources-dropdown-menu">
136-
<a class="nav-dropdown-item" href="{{ theme_variables.external_urls['resources'] }}"">
137-
<span class=dropdown-title>Developer Resources</span>
138-
<p>Find resources and get questions answered</p>
139-
</a>
140-
<a class="nav-dropdown-item" href="{{ theme_variables.external_urls['features'] }}">
141-
<span class=dropdown-title>About</span>
142-
<p>Learn about PyTorch’s features and capabilities</p>
143-
</a>
144-
</div>
145-
</div>
117+
<a href="{{ theme_variables.external_urls['resources'] }}">Resources</a>
146118
</li>
147119

148120
<li>
@@ -446,23 +418,15 @@ <h2>Resources</h2>
446418
<div class="main-menu">
447419
<ul>
448420
<li>
449-
<a href="{{ theme_variables.external_urls['get_started'] }}">Get Started</a>
450-
</li>
451-
452-
<li>
453-
<a href="{{ theme_variables.external_urls['features'] }}">Features</a>
454-
</li>
455-
456-
<li>
457-
<a href="{{ theme_variables.external_urls['ecosystem'] }}">Ecosystem</a>
421+
<a href="#">Get Started</a>
458422
</li>
459423

460424
<li>
461-
<a href="{{ theme_variables.external_urls['mobile'] }}">Mobile</a>
425+
<a href="#">Features</a>
462426
</li>
463427

464428
<li>
465-
<a href="{{ theme_variables.external_urls['hub'] }}">PyTorch Hub</a>
429+
<a href="#">Ecosystem</a>
466430
</li>
467431

468432
<li>
@@ -501,7 +465,6 @@ <h2>Resources</h2>
501465
sideMenus.bind();
502466
scrollToAnchor.bind();
503467
highlightNavigation.bind();
504-
mainMenuDropdown.bind();
505468

506469
// Add class to links that have code blocks, since we cannot create links in code blocks
507470
$("article.pytorch-article a span.pre").each(function(e) {

pytorch_sphinx_theme/theme_variables.jinja

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@
1515
'ecosystem': 'https://pytorch.org/ecosystem',
1616
'blog': 'https://pytorch.org/blog/',
1717
'resources': 'https://pytorch.org/resources',
18-
'support': 'https://pytorch.org/support',
19-
'mobile': 'https://pytorch.org/mobile',
20-
'hub': 'https://pytorch.org/hub',
18+
'support': 'https://pytorch.org/support'
2119
}
22-
-%}
20+
-%}

scss/_sphinx_layout.scss

Lines changed: 0 additions & 113 deletions
Original file line numberDiff line numberDiff line change
@@ -612,7 +612,6 @@
612612
padding-left: 0;
613613
width: 100%;
614614
position: absolute;
615-
z-index: 1;
616615

617616
&.left-menu-is-fixed {
618617
position: fixed;
@@ -628,7 +627,6 @@
628627
left: 0;
629628
right: 0;
630629
width: auto;
631-
z-index: 1;
632630

633631
&.left-menu-is-fixed {
634632
left: $desktop_menu_width;
@@ -715,114 +713,3 @@
715713
}
716714
}
717715
}
718-
719-
.main-menu ul li {
720-
.ecosystem-dropdown, .resources-dropdown a {
721-
cursor: pointer;
722-
}
723-
724-
.dropdown-menu {
725-
border-radius: 0;
726-
padding: 0;
727-
728-
.dropdown-item {
729-
color: $dark_grey;
730-
border-bottom: 1px solid #e2e2e2;
731-
&:last-of-type {
732-
border-bottom-color: transparent;
733-
}
734-
735-
&:hover {
736-
background-color: $orange;
737-
}
738-
739-
p {
740-
font-size: rem(16px);
741-
color: #979797;
742-
}
743-
}
744-
745-
a.dropdown-item {
746-
&:hover {
747-
color: $white;
748-
p {
749-
color: $white;
750-
}
751-
}
752-
}
753-
}
754-
}
755-
756-
.ecosystem-dropdown-menu, .resources-dropdown-menu {
757-
left: -75px;
758-
width: 226px;
759-
display: none;
760-
position: absolute;
761-
top: rem(50px);
762-
z-index: 1000;
763-
display: none;
764-
float: left;
765-
min-width: 10rem;
766-
padding: 0.5rem 0;
767-
margin: 0.125rem 0 0;
768-
font-size: 1rem;
769-
color: #212529;
770-
text-align: left;
771-
list-style: none;
772-
background-color: $white;
773-
background-clip: padding-box;
774-
border: 1px solid rgba(0, 0, 0, 0.15);
775-
border-radius: 0.25rem;
776-
}
777-
778-
.ecosystem-dropdown-menu.show-menu, .resources-dropdown-menu.show-menu {
779-
display: block;
780-
}
781-
782-
.main-menu ul li {
783-
.ecosystem-dropdown-menu, .resources-dropdown-menu {
784-
border-radius: 0;
785-
padding: 0;
786-
}
787-
}
788-
789-
.main-menu ul li {
790-
.ecosystem-dropdown-menu, .resources-dropdown-menu {
791-
.dropdown-item {
792-
color: #6c6c6d;
793-
border-bottom: 1px solid #e2e2e2;
794-
}
795-
}
796-
}
797-
798-
.header-holder .main-menu ul li a.nav-dropdown-item {
799-
display: block;
800-
font-size: rem(16px);
801-
line-height: rem(21px);
802-
width: 100%;
803-
padding: 0.25rem 1.5rem;
804-
clear: both;
805-
font-weight: 400;
806-
color: #979797;
807-
text-align: center;
808-
background-color: transparent;
809-
border-bottom: 1px solid #e2e2e2;
810-
&:last-of-type {
811-
border-bottom-color: transparent;
812-
}
813-
&:hover {
814-
background-color: $orange;
815-
color: white;
816-
}
817-
.dropdown-title {
818-
font-size: rem(18px);
819-
color: $dark_grey;
820-
letter-spacing: 0;
821-
line-height: 34px;
822-
}
823-
}
824-
825-
.header-holder .main-menu ul li a.nav-dropdown-item:hover .dropdown-title {
826-
background-color: $orange;
827-
color: white;
828-
}

0 commit comments

Comments
 (0)