This repository has been archived by the owner on Jan 8, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Loading branch information
1 parent
3d67a52
commit d6f571a
Showing
6 changed files
with
86 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
<head xmlns:t="http://twistedmatrix.com/ns/twisted.web.template/0.1"> | ||
<meta name="pydoctor-template-version" content="2" /> | ||
<script type="text/javascript" src="current_version.js"/> | ||
<script type="text/javascript" src="../versions.js"/> | ||
<script type="text/javascript"> | ||
window.addEventListener("load", function init() { | ||
// change the container style | ||
const container = document.getElementById("search-box-container").parentNode; | ||
// version text | ||
const textSpan = document.createElement("span"); | ||
textSpan.textContent = "Versions:"; | ||
textSpan.style.paddingRight = "12px"; | ||
|
||
// use div as a group for version dropdown | ||
const div = document.createElement("div"); | ||
div.style.alignSelf = "center"; | ||
div.style.paddingLeft = "12px"; | ||
div.classList.add("input-group"); | ||
// create the select dropdown | ||
const select = document.createElement("select"); | ||
select.classList.add("form-control"); | ||
select.araLabel= "version dropdown"; | ||
select.title = "version dropdown"; | ||
select.style.display = "inline-block"; | ||
select.style.width = "90px"; | ||
select.style.float = "none"; | ||
// dev is always there | ||
const devOption = document.createElement("option"); | ||
devOption.value = "dev"; | ||
devOption.textContent = "Dev" | ||
devOption.selected = window._CURRENT_VERSION === "dev"; | ||
select.appendChild(devOption); | ||
(window._VERSIONS || []).forEach(function(version) { | ||
const verOption = document.createElement("option"); | ||
verOption.value = version; | ||
verOption.textContent = version; | ||
verOption.selected = window._CURRENT_VERSION === version; | ||
select.appendChild(verOption); | ||
}); | ||
select.addEventListener("change", function handleChange(evt) { | ||
const version = evt.target.value; | ||
window.location = `../v${version}/`; | ||
}); | ||
// put all of them | ||
div.appendChild(textSpan); | ||
div.appendChild(select); | ||
container.insertBefore(div, document.getElementById("search-box-container")); | ||
}); | ||
</script> | ||
</head> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
window._VERSIONS = []; | ||
window._VERSIONS.push('1.0.0'); | ||
window._VERSIONS.push('1.1.0'); | ||
window._VERSIONS.push('1.2.0'); | ||
window._VERSIONS.push('1.3.0'); | ||
window._VERSIONS.push('1.4.0'); | ||
window._VERSIONS.push('1.5.0'); | ||
window._VERSIONS.push('1.6.0'); | ||
window._VERSIONS.push('1.7.0'); | ||
window._VERSIONS.push('1.8.0'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters