diff --git a/eng/docgeneration/templates/matthews/styles/main.css b/eng/docgeneration/templates/matthews/styles/main.css index 10df6c1a5d903..21eb0c3567f36 100644 --- a/eng/docgeneration/templates/matthews/styles/main.css +++ b/eng/docgeneration/templates/matthews/styles/main.css @@ -255,6 +255,35 @@ article h4 { .navbar-inverse .navbar-link:hover { color: #ecdbff; } +.versionarrow { + margin-left: 0.8em; + margin-top: -1.5em; + margin-bottom: -1em; + padding: 1em; +} + +.versionarrow::before { + position: absolute; + content: ''; + width: 0; + height: 0; + border: .5em solid transparent; + border-left-color: gray; + transform-origin: 0 50%; + transition: transform .1s; + margin-top: 0.2em; +} + + +.versionarrow.disable { + text-decoration: line-through; +} + +.versionarrow.down::before { + transform: rotate(90deg); + margin-top: 0em; + transition: transform .1s; +} @media (max-width: 767px) { .navbar-inverse .navbar-nav .open .dropdown-menu > li > a { diff --git a/eng/docgeneration/templates/matthews/styles/main.js b/eng/docgeneration/templates/matthews/styles/main.js index fbf97f0702987..449afbecc96be 100644 --- a/eng/docgeneration/templates/matthews/styles/main.js +++ b/eng/docgeneration/templates/matthews/styles/main.js @@ -68,6 +68,7 @@ $(function () { }) function httpGetAsync(targetUrl, callback) { + console.log(targetUrl); var xmlHttp = new XMLHttpRequest(); xmlHttp.onreadystatechange = function () { if (xmlHttp.readyState == 4 && xmlHttp.status == 200) @@ -77,25 +78,56 @@ function httpGetAsync(targetUrl, callback) { xmlHttp.send(null); } -function populateIndexList(selector, packageName) { - url = "https://azuresdkdocs.blob.core.windows.net/$web/" + SELECTED_LANGUAGE + "/" + packageName + "/versioning/versions" - - httpGetAsync(url, function (responseText) { - - var publishedversions = document.createElement("ul") +function httpGetLatestAsync(targetUrl, latestVersions, packageName) { + httpGetAsync(targetUrl, function (responseText) { if (responseText) { - options = responseText.match(/[^\r\n]+/g) + version = responseText.match(/[^\r\n]+/g) + $(latestVersions).append('