Skip to content

Backport PR #15489 on branch v3.1.x (DOC: adding main nav to site) #15508

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions doc/_static/mpl.css
Original file line number Diff line number Diff line change
Expand Up @@ -1118,3 +1118,34 @@ div.viewcode-block:target {
.sidebar-announcement p {
margin: 0.4em 0.4em 0.6em 0.4em;
}

/* new main nav */
nav.main-nav{
background-color: #002b47;
font-family: Calibri, 'Carlito', 'Gill Sans', 'Gill Sans MT', 'Trebuchet MS', sans-serif;
text-transform: uppercase;
letter-spacing: 2px;
font-size: 12px;
}

nav.main-nav ul{
margin: 0;
padding: 0;
display: flex;
flex-direction: row;
}

nav.main-nav li{
margin: 8px 15px;
list-style-type: none;
}

nav.main-nav a{
color: rgba(256, 256, 256, .8);
transform: color .2s ease-in-out;
}

nav.main-nav a:hover{
color: white;
text-decoration: underline;
}
13 changes: 10 additions & 3 deletions doc/_templates/layout.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,6 @@ <h3>{{ _('Navigation') }}</h3>
{%- endfor %}

<li><a href="{{ pathto('index') }}">home</a>|&nbsp;</li>
<li><a href="{{ pathto('gallery/index') }}">examples</a>|&nbsp;</li>
<li><a href="{{ pathto('tutorials/index') }}">tutorials</a>|&nbsp;</li>
<li><a href="{{ pathto('api/index') }}">API</a>|&nbsp;</li>
<li><a href="{{ pathto('contents') }}">contents</a> &raquo;</li>

{%- for parent in parents %}
Expand Down Expand Up @@ -231,6 +228,16 @@ <h3>{{ _('Navigation') }}</h3>

<div class="clearer"></div>
</div>

<nav class="main-nav">
<ul>
<li><a href="{{ pathto('users/installing') }}">Installation</a></li>
<li><a href="{{ pathto('contents') }}">Documentation</a></li>
<li><a href="{{ pathto('gallery/index') }}">Examples</a></li>
<li><a href="{{ pathto('tutorials/index') }}">Tutorials</a></li>
<li><a href="{{ pathto('devel/index') }}">Contributing</a></li>
</ul>
</nav>
{%- endblock %}

{%- block footer %}
Expand Down