Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

DOC: Restore banner indicating docs are unreleased#26219

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes fromall 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
23 changes: 23 additions & 0 deletionsdoc/_static/mpl.css
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -9,6 +9,29 @@
margin: 0;
}

/* Make announcement an error colour for unreleased documentation, and sticky. */
#unreleased-message.bd-header-announcement {
border-bottom: solid var(--pst-color-danger-highlight);
color: var(--pst-color-danger-text);
font-weight: var(--pst-admonition-font-weight-heading);
position: sticky;
top: 0;
z-index: 1050;
}

#unreleased-message.bd-header-announcement:after {
background-color: var(--pst-color-danger);
opacity: 1;
}

#unreleased-message.bd-header-announcement a {
color: var(--pst-color-danger-text);
}

#unreleased-message.bd-header-announcement + .bd-navbar {
top: 3rem; /* Minimum height of announcement header. */
}

/* multi column TOC */
.contents ul {
list-style-type: none;
Expand Down
13 changes: 13 additions & 0 deletionsdoc/_templates/sections/announcement.html
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
{%- if theme_announcement == "unreleased" -%}
{% set header_classes = ["bd-header-announcement", "container-fluid"] %}
<divclass="{{ header_classes | join(' ') }}"id="unreleased-message">
<divclass="bd-header-announcement__content">
You are reading documentation for the unreleased version of Matplotlib.
<ahref="https://matplotlib.org/search.html?q={{ title | striptags | urlencode }}&amp;check_keywords=yes&amp;area=default">
Try searching for the released version of this page instead?
</a>
</div>
</div>
{%- else -%}
{%- extends "!sections/announcement.html" -%}
{%- endif %}
6 changes: 5 additions & 1 deletiondoc/conf.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -462,7 +462,11 @@ def js_tag_with_cache_busting(js):
},
"navbar_end": ["theme-switcher", "version-switcher", "mpl_icon_links"],
"secondary_sidebar_items": "page-toc.html",
"footer_start": ["copyright", "sphinx-version", "doc_version"],
"footer_start": ["copyright", "sphinx-version", "doc_version"],
# We override the announcement template from pydata-sphinx-theme, where
# this special value indicates the use of the unreleased banner. If we need
# an actual announcement, then just place the text here as usual.
"announcement": "unreleased" if not is_release_build else "",
}
include_analytics = is_release_build
if include_analytics:
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp