Skip to content

Commit

Permalink
Merge pull request #96 from Cadair/new_team
Browse files Browse the repository at this point in the history
Update navbar for new SunPy Project section
  • Loading branch information
Cadair authored Jan 11, 2020
2 parents 10023a2 + e4f4ab0 commit 87f6f34
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 43 deletions.
52 changes: 31 additions & 21 deletions sunpy_sphinx_theme/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,31 +29,41 @@ def page_url(page):

html_sidebars = {"**": ["docsidebar.html"]}
html_theme_options = {
"about_links": [
("Our Mission", page_url("about.html"), 1),
(
"Acknowledge SunPy",
page_url("about.html") + "#acknowledging-or-citing-sunpy",
1,
),
("Code of Conduct", "https://docs.sunpy.org/en/latest/code_of_conduct.html", 1),
],
"navbar_links": [
("About", [
("Our Mission", page_url("about.html"), 1),
(
"Acknowledge SunPy",
page_url("about.html") + "#acknowledging-or-citing-sunpy",
1,
),
("Code of Conduct", "https://docs.sunpy.org/en/latest/code_of_conduct.html", 1)],
1
),
("Documentation",
[
("SunPy", "https://docs.sunpy.org/en/stable/", 1),
("ndcube", "https://docs.sunpy.org/projects/ndcube", 1),
("drms", "https://docs.sunpy.org/projects/drms", 1),
(
"radiospectra",
"https://docs.sunpy.org/projects/radiospectra/en/latest/index.html",
1,
),
("IRISPy", "https://docs.sunpy.org/projects/irispy/en/latest/", 1),
],
1
),
("Blog", page_url("blog.html"), 1),
("Support Us", page_url("contribute.html"), 1),
("Get Help", page_url("help.html"), 1),
("SunPy Project", page_url("team.html"), 1),
],
"navbar_docs": [
("SunPy", "https://docs.sunpy.org/en/stable/", 1),
("ndcube", "https://docs.sunpy.org/projects/ndcube", 1),
("drms", "https://docs.sunpy.org/projects/drms", 1),
(
"radiospectra",
"https://docs.sunpy.org/projects/radiospectra/en/latest/index.html",
1,
),
("IRISPy", "https://docs.sunpy.org/projects/irispy/en/latest/", 1),
("SunPy Project", [
("SunPy Project", page_url("project/"), 1),
("Community Roles", page_url("project/roles.html"), 1),
("Affiliated Packages", page_url("project/affiliated.html"), 1)
],
1,
),
],
# Only really setup to look nice with 3 values.
"footer_links": [
Expand Down
34 changes: 12 additions & 22 deletions sunpy_sphinx_theme/sunpy/navbar.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,31 +19,21 @@

<div class="collapse navbar-collapse nav-collapse">
<ul class="nav navbar-nav navbar-left">
{% if theme_about_links %}
<li class="dropdown">
<a role="button" data-toggle="dropdown" data-target="#" href="#" }}>About<b class="caret"></b></a>
<ul class="dropdown-menu">
{%- for link in theme_about_links %}
<li class="dropdown-submenu">
<a href="{{ pathto(*link[1:]) }}">{{ link[0] }}</a></li>
{%- endfor %}
</ul>
</li>
{% endif %}
{% if theme_navbar_docs %}
{% if theme_navbar_links %}
{%- for navlink in theme_navbar_links %}
{% if navlink[1] is not string %}
<li class="dropdown">
<a role="button" data-toggle="dropdown" data-target="" href="">Documentation<b class="caret"></b></a>
<ul class="dropdown-menu">
{%- for link in theme_navbar_docs %}
<li class="dropdown-submenu">
<a href="{{ pathto(*link[1:]) }}">{{ link[0] }}</a></li>
{%- endfor %}
</ul>
<a role="button" data-toggle="dropdown" data-target="" href="">{{ navlink[0] }}<b class="caret"></b></a>
<ul class="dropdown-menu">
{%- for link in navlink[1] %}
<li class="dropdown-submenu">
<a href="{{ pathto(*link[1:]) }}">{{ link[0] }}</a></li>
{%- endfor %}
</ul>
</li>
{% else %}
<li><a href="{{ pathto(*navlink[1:]) }}">{{ navlink[0] }}</a></li>
{% endif %}
{% if theme_navbar_links %}
{%- for link in theme_navbar_links %}
<li><a href="{{ pathto(*link[1:]) }}">{{ link[0] }}</a></li>
{%- endfor %}
{% endif %}
</ul>
Expand Down

0 comments on commit 87f6f34

Please sign in to comment.