Skip to content

Commit f7c46fd

Browse files
author
Svetlana Karslioglu
authored
Merge pull request #171 from pytorch/standardize-top-nav
Align the theme top navigation with the rest of the site
2 parents cece053 + 3c850d1 commit f7c46fd

File tree

3 files changed

+56
-15
lines changed

3 files changed

+56
-15
lines changed

pytorch_sphinx_theme/layout.html

Lines changed: 49 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -146,14 +146,18 @@
146146
<span class="dropdown-title">torchvision</span>
147147
<p></p>
148148
</a>
149-
<a class="doc-dropdown-option nav-dropdown-item" href="{{ theme_variables.external_urls['torchrec'] }}">
150-
<span class="dropdown-title">TorchRec</span>
149+
<a class="doc-dropdown-option nav-dropdown-item" href="{{ theme_variables.external_urls['torcharrow'] }}">
150+
<span class="dropdown-title">torcharrow</span>
151151
<p></p>
152152
</a>
153153
<a class="doc-dropdown-option nav-dropdown-item" href="{{ theme_variables.external_urls['data'] }}">
154154
<span class="dropdown-title">TorchData</span>
155155
<p></p>
156156
</a>
157+
<a class="doc-dropdown-option nav-dropdown-item" href="{{ theme_variables.external_urls['torchrec'] }}">
158+
<span class="dropdown-title">TorchRec</span>
159+
<p></p>
160+
</a>
157161
<a class="doc-dropdown-option nav-dropdown-item" href="{{ theme_variables.external_urls['serve'] }}">
158162
<span class="dropdown-title">TorchServe</span>
159163
<p></p>
@@ -179,14 +183,26 @@
179183
<span class="dropdown-title">About</span>
180184
<p>Learn about PyTorch’s features and capabilities</p>
181185
</a>
186+
<a class="nav-dropdown-item" href="{{ theme_variables.external_urls['foundation'] }}">
187+
<span class="dropdown-title">PyTorch Foundation</span>
188+
<p>Learn about the PyTorch foundation</p>
189+
</a>
182190
<a class="nav-dropdown-item" href="{{ theme_variables.external_urls['community'] }}">
183191
<span class="dropdown-title">Community</span>
184192
<p>Join the PyTorch developer community to contribute, learn, and get your questions answered.</p>
185193
</a>
194+
<a class="nav-dropdown-item" href="{{ theme_variables.external_urls['community-stories'] }}">
195+
<span class="dropdown-title">Community Stories</span>
196+
<p>Learn how our community solves real, everyday machine learning problems with PyTorch.</p>
197+
</a>
186198
<a class="nav-dropdown-item" href="{{ theme_variables.external_urls['resources'] }}">
187199
<span class="dropdown-title">Developer Resources</span>
188200
<p>Find resources and get questions answered</p>
189201
</a>
202+
<a class="nav-dropdown-item" href="{{ theme_variables.external_urls['events'] }}">
203+
<span class="dropdown-title">Events</span>
204+
<p>Find events, webinars, and podcasts</p>
205+
</a>
190206
<a class="nav-dropdown-item" href="{{ theme_variables.external_urls['forums'] }}" target="_blank">
191207
<span class="dropdown-title">Forums</span>
192208
<p>A place to discuss PyTorch code, issues, install, research</p>
@@ -498,15 +514,11 @@ <h2>Resources</h2>
498514
<li>
499515
<a href="{{ theme_variables.external_urls['ecosystem'] }}">Ecosystem</a>
500516
</li>
501-
517+
502518
<li>
503519
<a href="{{ theme_variables.external_urls['mobile'] }}">Mobile</a>
504520
</li>
505521

506-
<li>
507-
<a href="{{ theme_variables.external_urls['hub'] }}">PyTorch Hub</a>
508-
</li>
509-
510522
<li>
511523
<a href="{{ theme_variables.external_urls['blog'] }}">Blog</a>
512524
</li>
@@ -536,6 +548,18 @@ <h2>Resources</h2>
536548
<a href="{{ theme_variables.external_urls['vision'] }}">torchvision</a>
537549
</li>
538550

551+
<li>
552+
<a href="{{ theme_variables.external_urls['torcharrow'] }}">torcharrow</a>
553+
</li>
554+
555+
<li>
556+
<a href="{{ theme_variables.external_urls['data'] }}">TorchData</a>
557+
</li>
558+
559+
<li>
560+
<a href="{{ theme_variables.external_urls['torchrec'] }}">TorchRec</a>
561+
</li>
562+
539563
<li>
540564
<a href="{{ theme_variables.external_urls['serve'] }}">TorchServe</a>
541565
</li>
@@ -552,27 +576,40 @@ <h2>Resources</h2>
552576
<li class="resources-mobile-menu-title">
553577
Resources
554578
</li>
579+
580+
<ul class="resources-mobile-menu-items">
555581

556-
<ul class="resources-mobile-menu-items">
557582
<li>
558-
<a href="{{ theme_variables.external_urls['resources'] }}">Developer Resources</a>
583+
<a href="{{ theme_variables.external_urls['features'] }}">About</a>
559584
</li>
560585

561586
<li>
562-
<a href="{{ theme_variables.external_urls['features'] }}">About</a>
587+
<a href="{{ theme_variables.external_urls['foundation'] }}">PyTorch Foundation</a>
563588
</li>
564589

565590
<li>
566-
<a href="{{ theme_variables.external_urls['hub'] }}">Models (Beta)</a>
591+
<a href="{{ theme_variables.external_urls['community'] }}">Community</a>
567592
</li>
568593

569594
<li>
570-
<a href="{{ theme_variables.external_urls['community'] }}">Community</a>
595+
<a href="{{ theme_variables.external_urls['community-stories'] }}">Community Stories</a>
596+
</li>
597+
598+
<li>
599+
<a href="{{ theme_variables.external_urls['resources'] }}">Developer Resources</a>
600+
</li>
601+
602+
<li>
603+
<a href="{{ theme_variables.external_urls['events'] }}">Events</a>
571604
</li>
572605

573606
<li>
574607
<a href="{{ theme_variables.external_urls['forums'] }}">Forums</a>
575608
</li>
609+
610+
<li>
611+
<a href="{{ theme_variables.external_urls['hub'] }}">Models (Beta)</a>
612+
</li>
576613
</ul>
577614

578615
<li>

pytorch_sphinx_theme/static/js/vendor/bootstrap.min.js

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pytorch_sphinx_theme/theme_variables.jinja

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@
1515
'tutorials': 'https://pytorch.org/tutorials',
1616
'previous_pytorch_versions': 'https://pytorch.org/previous-versions/',
1717
'home': 'https://pytorch.org/',
18+
'events': 'https://pytorch.org/events',
19+
'foundation': 'https://pytorch.org/foundation',
20+
'community-stories': 'https://pytorch.org/community-stories',
1821
'get_started': 'https://pytorch.org/get-started',
1922
'features': 'https://pytorch.org/features',
2023
'ecosystem': 'https://pytorch.org/ecosystem',
@@ -35,6 +38,7 @@
3538
'serve': 'https://pytorch.org/serve/',
3639
'xla': 'https://pytorch.org/xla',
3740
'data': 'https://pytorch.org/data',
41+
'torcharrow': 'https://pytorch.org/torcharrow',
3842
'torchrec': 'https://pytorch.org/torchrec'
3943
}
4044
-%}

0 commit comments

Comments
 (0)