From 2a9bab35294407c9c44e9daeb9d1b0384b87d845 Mon Sep 17 00:00:00 2001 From: Martin Weise <martin.weise@tuwien.ac.at> Date: Thu, 7 Mar 2024 07:55:41 +0000 Subject: [PATCH] Updated switcher --- .docs/overrides/main.html | 20 +++----------------- .gitignore | 1 + mkdocs.yml | 2 ++ 3 files changed, 6 insertions(+), 17 deletions(-) diff --git a/.docs/overrides/main.html b/.docs/overrides/main.html index 58f3797f38..9f9a6daf6f 100644 --- a/.docs/overrides/main.html +++ b/.docs/overrides/main.html @@ -4,22 +4,8 @@ <label for="version">Version</label> <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.4</option> - <option value="1.3">1.3</option> + <option value="1.4.1">1.4.1</option> + <option value="1.4.0">1.4.0</option> + <option value="1.3.0">1.3.0</option> </select> -<script> - function getVersion() { - const segments = location.pathname.split('/') - if (segments.length >= 4) { - return segments[3] - } else { - return '1.4' - } - } - function switchVersion(value) { - if (!value) { return } - this.location.href = location.protocol + '//' + location.host + '/infrastructures/dbrepo/' + value + '/' - } - document.getElementById("version").value = getVersion() -</script> {% endblock %} diff --git a/.gitignore b/.gitignore index 4785a0ee84..0f101110ab 100644 --- a/.gitignore +++ b/.gitignore @@ -7,6 +7,7 @@ target/ # generated ready schema.xsd +swagger/ # docs .docs/.swagger/dist/ diff --git a/mkdocs.yml b/mkdocs.yml index b4dfba732c..d969b25f30 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -42,6 +42,8 @@ nav: - contact.md extra_css: - stylesheets/extra.css +extra_javascript: + - scripts/extra.js theme: favicon: images/signet_white.png custom_dir: .docs/overrides -- GitLab