diff --git a/.docs/overrides/main.html b/.docs/overrides/main.html index 033bce3aa3fb40911f955cfd35f949e27b24b6b2..9f9a6daf6fa57add34aa8e9170bc55315f5ed3b1 100644 --- a/.docs/overrides/main.html +++ b/.docs/overrides/main.html @@ -2,21 +2,6 @@ {% block announce %} <label for="version">Version</label> -<script type="javascript"> - function getVersion() { - const segments = location.pathname.split('/'); - if (segments.length >= 4) { - return segments[3]; - } else { - return '__APPVERSION__'; - } - } - function switchVersion(value) { - if (!value) { return } - this.location.href = location.protocol + '//' + location.host + '/infrastructures/dbrepo/' + value + '/'; - } - document.getElementById("version").value = getVersion(); -</script> <select style="margin-left:8px;" id="version" name="version" onchange="switchVersion(this.options[this.selectedIndex].value)"> <option value="latest">latest</option> <option value="1.4.1">1.4.1</option> diff --git a/.docs/scripts/extra.js b/.docs/scripts/extra.js new file mode 100644 index 0000000000000000000000000000000000000000..4768615e22f22fc7f895cfee742ed9c848347b89 --- /dev/null +++ b/.docs/scripts/extra.js @@ -0,0 +1,13 @@ +function getVersion() { + const segments = location.pathname.split('/'); + if (segments.length >= 4) { + return segments[3]; + } else { + return '__APPVERSION__'; + } +} +function switchVersion(value) { + if (!value) { return } + this.location.href = location.protocol + '//' + location.host + '/infrastructures/dbrepo/' + value + '/'; +} +document.getElementById("version").value = getVersion(); \ No newline at end of file diff --git a/mkdocs.yml b/mkdocs.yml index 14affa17a9a3a1ebb0687936f79c7895f73c3b19..60f1c85e8897ec1936c405ab6d72fe7fa855b456 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -43,6 +43,8 @@ nav: - contact.md extra_css: - stylesheets/extra.css +extra_javascript: + - scripts/extra.js theme: favicon: images/signet_white.png custom_dir: .docs/overrides