Skip to content
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

Add version warning banners and (more) colors to the docs #314

Merged
merged 5 commits into from
Sep 18, 2023
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
22 changes: 22 additions & 0 deletions docs/source/_static/cashocs.css
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,28 @@ h3 {
opacity: 0.1;
}

/* Background of others should be red */
.version-switcher__container a:not([data-version-name*="dev"], [data-version-name*="stable"]) {
position: relative;
}

.version-switcher__container a:not([data-version-name*="dev"], [data-version-name*="stable"]) span {
color: var(--pst-color-danger);
}

.version-switcher__container a:not([data-version-name*="dev"], [data-version-name*="stable"]) span:before {
content: "";
width: 100%;
height: 100%;
position: absolute;
left: 0;
top: 0;
background-color: var(--pst-color-danger);
opacity: 0.1;
}

}


/* Main page overview cards */

Expand Down
3 changes: 2 additions & 1 deletion docs/source/_static/version_switcher.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
{
"name": "2.0 (stable)",
"version": "2.0.11",
"url": "https://cashocs.readthedocs.io/en/v2.0.11/"
"url": "https://cashocs.readthedocs.io/en/v2.0.11/",
"preferred": true,
},
{
"name": "1.8",
Expand Down
1 change: 1 addition & 0 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@
],
"logo": {"text": "cashocs", "alt_text": "cashocs"},
"navbar_align": "content",
"show_version_warning_banner": True,
}

html_sidebars = {"**": ["search-field.html", "sidebar-nav-bs", "sidebar-ethical-ads"]}
Expand Down