Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 5a24121

Browse filesBrowse files
QuLogictacaswell
authored andcommitted
DOC: Add a banner indicating docs are unreleased. (#9003)
Also, point to a search for the same page in the latest released version. Unfortunately, there's no easy way to point to the exact same page, especially with all the moved pages.
1 parent 1da7f4b commit 5a24121
Copy full SHA for 5a24121

File tree

Expand file treeCollapse file tree

2 files changed

+32
-0
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+32
-0
lines changed

‎doc/_static/mpl.css

Copy file name to clipboardExpand all lines: doc/_static/mpl.css
+24Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -710,6 +710,30 @@ figcaption {
710710
text-align: center;
711711
}
712712

713+
/* "Go to released version" message. */
714+
#unreleased-message {
715+
background: #d62728;
716+
box-sizing: border-box;
717+
color: #fff;
718+
font-weight: bold;
719+
left: 0;
720+
min-height: 3em;
721+
padding: 0.5em;
722+
position: fixed;
723+
top: 0;
724+
width: 100%;
725+
z-index: 10000;
726+
}
727+
728+
#unreleased-message + div {
729+
margin-top: 3em;
730+
}
731+
732+
#unreleased-message a {
733+
color: #fff;
734+
text-decoration:underline;
735+
}
736+
713737
/* Fork me on GitHub "button" */
714738
#forkongithub a{
715739
background:#FF7F0E;

‎doc/_templates/layout.html

Copy file name to clipboardExpand all lines: doc/_templates/layout.html
+8Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,14 @@ <h3>{{ _('Navigation') }}</h3>
162162

163163
{% block relbar1 %}
164164

165+
{%- if '+' in release %}
166+
<div id="unreleased-message">
167+
You are reading documentation for the unreleased version of Matplotlib.
168+
<a href="https://matplotlib.org/search.html?q={{ title | striptags | urlencode }}&amp;check_keywords=yes&amp;area=default">
169+
Try searching for the released version of this page instead?
170+
</a>
171+
</div>
172+
{%- endif %}
165173
<div style="background-color: white; text-align: left; padding: 10px 10px 15px 15px; position: relative;">
166174
{%- if builder in ('htmlhelp', 'devhelp', 'latex') %}
167175
<a href="{{ pathto('index') }}"><img src="{{pathto("_static/logo2.png", 1) }}" width="540px" border="0" alt="matplotlib"/></a>

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.