Added banner to warn users about the latest version of docs only referring to development branch
This commit is contained in:
parent
d05d1f5e37
commit
ffb539edeb
|
@ -244,3 +244,18 @@ table tbody td{
|
|||
top: 70px;
|
||||
left: 1100px;
|
||||
}
|
||||
|
||||
/************************* LATEST WARNING BANNER **************************/
|
||||
|
||||
.dev-version-warning {
|
||||
padding-top: 15px;
|
||||
padding-bottom: 15px;
|
||||
padding-left: 15px;
|
||||
padding-right: 15px;
|
||||
margin-bottom: 8px;
|
||||
color: #404040;
|
||||
font-weight: bold;
|
||||
background-color: #f55c47;
|
||||
text-align: center;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
$(document).ready(function () {
|
||||
if(window.location.href.indexOf("latest") != -1) {
|
||||
var banner = document.createElement("div");
|
||||
banner.className = "dev-version-warning";
|
||||
banner.innerHTML = "You are currently reading documentation for the \"dev\" branch of CARLA. This documentation refers to features currently in development and may result in unexpected behaviour. To read documentation for previous releases, select the desired version in the bottom, right-hand corner of the screen.";
|
||||
var x = document.getElementsByClassName("section");
|
||||
console.log(x)
|
||||
x[0].insertBefore(banner,x[0].childNodes[0]);
|
||||
}
|
||||
});
|
|
@ -4,6 +4,7 @@ docs_dir: Docs
|
|||
edit_uri: 'edit/master/Docs/'
|
||||
theme: readthedocs
|
||||
extra_css: [extra.css]
|
||||
extra_javascript: [extra.js]
|
||||
|
||||
nav:
|
||||
- Home: 'index.md'
|
||||
|
|
Loading…
Reference in New Issue