8000 Move version switcher next to the logo. · matplotlib/matplotlib@249cc32 · GitHub
[go: up one dir, main page]

Skip to content

Commit 249cc32

Browse files
committed
Move version switcher next to the logo.
This is in preparation for adding the search field to the navbar. IMHO placing the version next to the logo also rhymes better. Styling of the switcher is more muted (not the strong blue). It's colors are taken from the panels on the index page.
1 parent bcef5d6 commit 249cc32

File tree

2 files changed

+21
-1
lines changed

2 files changed

+21
-1
lines changed

doc/_static/mpl.css

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -277,3 +277,22 @@ div.twocol > div {
277277
display: inline-block;
278278
margin: 0 0.5em;
279279
}
280+
281+
282+
/* styling for version switcher */
283+
.navbar-brand {
284+
/* pydata-sphinx-theme sets this as flex for some reason
285+
but we cannot place the version switcher to its right then.
286+
*/
287+
display: inline-block;
288+
}
289+
290+
#version_switcher {
291+
display: inline-block;
292+
}
293+
294+
#version_switcher_button {
295+
color: rgba(var(--pst-color-text-base),1);
296+
background-color: rgba(0,0,0,.03);
297+
border: 1px solid rgba(0,0,0,.125);
298+
}

doc/conf.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,8 @@ def matplotlib_reduced_latex_scraper(block, block_vars, gallery_conf,
341341
"url_template": "https://matplotlib.org/{version}/",
342342
"version_match": version,
343343
},
344-
"navbar_end": ["version-switcher", "mpl_icon_links"]
344+
"navbar_start": ["mpl_navbar_logo", "version-switcher"],
345+
"navbar_end": ["mpl_icon_links"]
345346
}
346347
include_analytics = is_release_build
347348
if include_analytics:

0 commit comments

Comments
 (0)
0