Add dropdown to change apis (and an un-used, but POC method to list apis on a page...)

This commit is contained in:
2023-04-27 11:05:02 -05:00
parent 8cc16d44e5
commit dab6a75340
2 changed files with 48 additions and 1 deletions

View File

@ -49,7 +49,12 @@
>
{navLogoImg}
<div slot="overview" id="otherVersions">
<label for="otherVersionsSelect">Other Versions:</label>
<label for="otherApisSelect">Other APIs:</label>
<select id="otherApisSelect" onchange=changeApi()>
<option value="/api/">--</option>
{otherApisOptions}
</select>
<label for="otherVersionsSelect">Other Versions of this API:</label>
<select id="otherVersionsSelect" onchange=changeVersion()>
<option value="/api/">--</option>
{otherVersionOptions}
@ -76,6 +81,11 @@
});
});
function changeApi()
{
document.location.href = document.getElementById("otherApisSelect").value;
}
function changeVersion()
{
document.location.href = document.getElementById("otherVersionsSelect").value;