Skip to content

Commit c6cbdc6

Browse files
committed
docs: update warning message color
1 parent 442db02 commit c6cbdc6

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

docs/assets/versions.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ div[data-md-component=announce] {
4242
z-index: 2;
4343
}
4444
div[data-md-component=announce]>div#announce-msg{
45-
color: var(--md-code-hl-number-color);
45+
color:green;
4646
font-size: .8rem;
4747
text-align: center;
4848
margin: 15px;

docs/assets/versions.js

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -37,15 +37,15 @@ setTimeout(function() {
3737
var rtdData = window['READTHEDOCS_DATA'] || { version: 'latest' };
3838
var margin = 30;
3939
var headerHeight = document.getElementsByClassName("md-header")[0].offsetHeight;
40-
// if (rtdData.version === "latest") {
41-
// document.querySelector("div[data-md-component=announce]").innerHTML = "<div id='announce-msg'>You are viewing the docs for an unreleased version of DevStream, <a href='https://devstream.readthedocs.io/en/stable/'>click here to go to the latest stable version.</a></div>"
42-
// var bannerHeight = document.getElementById('announce-msg').offsetHeight + margin
43-
// document.querySelector("header.md-header").style.top = bannerHeight +"px";
44-
// document.querySelector('style').textContent +=
45-
// "@media screen and (min-width: 76.25em){ .md-sidebar { height: 0; top:"+ (bannerHeight+headerHeight)+"px !important; }}"
46-
// document.querySelector('style').textContent +=
47-
// "@media screen and (min-width: 60em){ .md-sidebar--secondary { height: 0; top:"+ (bannerHeight+headerHeight)+"px !important; }}"
48-
// }
40+
if (rtdData.version === "latest") {
41+
document.querySelector("div[data-md-component=announce]").innerHTML = "<div id='announce-msg'>You are viewing the latest of DevStream docs. Maybe you want to choose a specific version.</a></div>"
42+
var bannerHeight = document.getElementById('announce-msg').offsetHeight + margin
43+
document.querySelector("header.md-header").style.top = bannerHeight +"px";
44+
document.querySelector('style').textContent +=
45+
"@media screen and (min-width: 76.25em){ .md-sidebar { height: 0; top:"+ (bannerHeight+headerHeight)+"px !important; }}"
46+
document.querySelector('style').textContent +=
47+
"@media screen and (min-width: 60em){ .md-sidebar--secondary { height: 0; top:"+ (bannerHeight+headerHeight)+"px !important; }}"
48+
}
4949
// else if (rtdData.version !== "stable") {
5050
// document.querySelector("div[data-md-component=announce]").innerHTML = "<div id='announce-msg'>You are viewing the docs for a previous version of DevStream, <a href='https://devstream.readthedocs.io/en/stable/'>click here to go to the latest stable version.</a></div>"
5151
// var bannerHeight = document.getElementById('announce-msg').offsetHeight + margin

0 commit comments

Comments
 (0)