Skip to content
Snippets Groups Projects
Verified Commit 1550d522 authored by Martin Weise's avatar Martin Weise
Browse files

Added version picker

parent 26b91088
No related branches found
No related tags found
No related merge requests found
{% extends "base.html" %}
{% block announce %}
<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.3">1.3</option>
</select>
<script>
function getVersion() {
const segments = location.pathname.split('/')
if (segments.length === 5) {
return segments[3]
} else {
return 'latest'
}
}
function switchVersion(value) {
if (!value) { return }
this.location.href = location.protocol + '//' + location.host + '/infrastructures/dbrepo/' + value + '/'
}
document.getElementById("version").value = getVersion()
</script>
{% endblock %}
......@@ -16,3 +16,12 @@
color: var(--md-typeset-color);
border-bottom: 2px solid var(--md-primary-fg-color--dark);
}
.md-banner {
background-color: var(--md-primary-fg-color--dark);
}
[data-md-component=announce] .md-banner__inner {
margin-top: 0.2rem;
margin-bottom: 0.2rem;
}
......@@ -36,6 +36,7 @@ extra_css:
- stylesheets/extra.css
theme:
favicon: images/signet_white.png
custom_dir: docs/overrides
logo: images/signet_white.png
font:
text: IBM Plex Serif
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment