the past is a foreign country
This commit is contained in:
parent
32cd536b69
commit
21d56c8b1a
1 changed files with 13 additions and 0 deletions
|
@ -370,6 +370,19 @@ function sortSitemapVersions(sitemap) {
|
|||
function addDropdowns(sitemap) {
|
||||
let [branches, versions] = sortSitemapVersions(sitemap);
|
||||
|
||||
// set the "old version" message if this page is a version number, but not the latest one
|
||||
// this isn't a dropdown, but it's here since we have the data anyway
|
||||
if (versions.slice(1).includes(VERSION)) {
|
||||
// thanks for the idea petra
|
||||
let oldVersionNotice = document.createElement("i");
|
||||
oldVersionNotice.textContent = "The past is a foreign country; they do things differently there.";
|
||||
|
||||
document.getElementById("old-version-notice").append(
|
||||
document.createElement("br"),
|
||||
oldVersionNotice,
|
||||
);
|
||||
}
|
||||
|
||||
// versions
|
||||
document.getElementById("version-dropdown").append(
|
||||
...versionDropdownItems(sitemap, branches),
|
||||
|
|
Loading…
Reference in a new issue