Skip to content

Commit

Permalink
Merge pull request #171 from pytorch/standardize-top-nav
Browse files Browse the repository at this point in the history
Align the theme top navigation with the rest of the site
  • Loading branch information
Svetlana Karslioglu authored Oct 12, 2022
2 parents cece053 + 3c850d1 commit f7c46fd
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 15 deletions.
61 changes: 49 additions & 12 deletions pytorch_sphinx_theme/layout.html
Original file line number Diff line number Diff line change
Expand Up @@ -146,14 +146,18 @@
<span class="dropdown-title">torchvision</span>
<p></p>
</a>
<a class="doc-dropdown-option nav-dropdown-item" href="{{ theme_variables.external_urls['torchrec'] }}">
<span class="dropdown-title">TorchRec</span>
<a class="doc-dropdown-option nav-dropdown-item" href="{{ theme_variables.external_urls['torcharrow'] }}">
<span class="dropdown-title">torcharrow</span>
<p></p>
</a>
<a class="doc-dropdown-option nav-dropdown-item" href="{{ theme_variables.external_urls['data'] }}">
<span class="dropdown-title">TorchData</span>
<p></p>
</a>
<a class="doc-dropdown-option nav-dropdown-item" href="{{ theme_variables.external_urls['torchrec'] }}">
<span class="dropdown-title">TorchRec</span>
<p></p>
</a>
<a class="doc-dropdown-option nav-dropdown-item" href="{{ theme_variables.external_urls['serve'] }}">
<span class="dropdown-title">TorchServe</span>
<p></p>
Expand All @@ -179,14 +183,26 @@
<span class="dropdown-title">About</span>
<p>Learn about PyTorch’s features and capabilities</p>
</a>
<a class="nav-dropdown-item" href="{{ theme_variables.external_urls['foundation'] }}">
<span class="dropdown-title">PyTorch Foundation</span>
<p>Learn about the PyTorch foundation</p>
</a>
<a class="nav-dropdown-item" href="{{ theme_variables.external_urls['community'] }}">
<span class="dropdown-title">Community</span>
<p>Join the PyTorch developer community to contribute, learn, and get your questions answered.</p>
</a>
<a class="nav-dropdown-item" href="{{ theme_variables.external_urls['community-stories'] }}">
<span class="dropdown-title">Community Stories</span>
<p>Learn how our community solves real, everyday machine learning problems with PyTorch.</p>
</a>
<a class="nav-dropdown-item" href="{{ theme_variables.external_urls['resources'] }}">
<span class="dropdown-title">Developer Resources</span>
<p>Find resources and get questions answered</p>
</a>
<a class="nav-dropdown-item" href="{{ theme_variables.external_urls['events'] }}">
<span class="dropdown-title">Events</span>
<p>Find events, webinars, and podcasts</p>
</a>
<a class="nav-dropdown-item" href="{{ theme_variables.external_urls['forums'] }}" target="_blank">
<span class="dropdown-title">Forums</span>
<p>A place to discuss PyTorch code, issues, install, research</p>
Expand Down Expand Up @@ -498,15 +514,11 @@ <h2>Resources</h2>
<li>
<a href="{{ theme_variables.external_urls['ecosystem'] }}">Ecosystem</a>
</li>

<li>
<a href="{{ theme_variables.external_urls['mobile'] }}">Mobile</a>
</li>

<li>
<a href="{{ theme_variables.external_urls['hub'] }}">PyTorch Hub</a>
</li>

<li>
<a href="{{ theme_variables.external_urls['blog'] }}">Blog</a>
</li>
Expand Down Expand Up @@ -536,6 +548,18 @@ <h2>Resources</h2>
<a href="{{ theme_variables.external_urls['vision'] }}">torchvision</a>
</li>

<li>
<a href="{{ theme_variables.external_urls['torcharrow'] }}">torcharrow</a>
</li>

<li>
<a href="{{ theme_variables.external_urls['data'] }}">TorchData</a>
</li>

<li>
<a href="{{ theme_variables.external_urls['torchrec'] }}">TorchRec</a>
</li>

<li>
<a href="{{ theme_variables.external_urls['serve'] }}">TorchServe</a>
</li>
Expand All @@ -552,27 +576,40 @@ <h2>Resources</h2>
<li class="resources-mobile-menu-title">
Resources
</li>

<ul class="resources-mobile-menu-items">

<ul class="resources-mobile-menu-items">
<li>
<a href="{{ theme_variables.external_urls['resources'] }}">Developer Resources</a>
<a href="{{ theme_variables.external_urls['features'] }}">About</a>
</li>

<li>
<a href="{{ theme_variables.external_urls['features'] }}">About</a>
<a href="{{ theme_variables.external_urls['foundation'] }}">PyTorch Foundation</a>
</li>

<li>
<a href="{{ theme_variables.external_urls['hub'] }}">Models (Beta)</a>
<a href="{{ theme_variables.external_urls['community'] }}">Community</a>
</li>

<li>
<a href="{{ theme_variables.external_urls['community'] }}">Community</a>
<a href="{{ theme_variables.external_urls['community-stories'] }}">Community Stories</a>
</li>

<li>
<a href="{{ theme_variables.external_urls['resources'] }}">Developer Resources</a>
</li>

<li>
<a href="{{ theme_variables.external_urls['events'] }}">Events</a>
</li>

<li>
<a href="{{ theme_variables.external_urls['forums'] }}">Forums</a>
</li>

<li>
<a href="{{ theme_variables.external_urls['hub'] }}">Models (Beta)</a>
</li>
</ul>

<li>
Expand Down
6 changes: 3 additions & 3 deletions pytorch_sphinx_theme/static/js/vendor/bootstrap.min.js

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions pytorch_sphinx_theme/theme_variables.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@
'tutorials': 'https://pytorch.org/tutorials',
'previous_pytorch_versions': 'https://pytorch.org/previous-versions/',
'home': 'https://pytorch.org/',
'events': 'https://pytorch.org/events',
'foundation': 'https://pytorch.org/foundation',
'community-stories': 'https://pytorch.org/community-stories',
'get_started': 'https://pytorch.org/get-started',
'features': 'https://pytorch.org/features',
'ecosystem': 'https://pytorch.org/ecosystem',
Expand All @@ -35,6 +38,7 @@
'serve': 'https://pytorch.org/serve/',
'xla': 'https://pytorch.org/xla',
'data': 'https://pytorch.org/data',
'torcharrow': 'https://pytorch.org/torcharrow',
'torchrec': 'https://pytorch.org/torchrec'
}
-%}

0 comments on commit f7c46fd

Please sign in to comment.