-
Notifications
You must be signed in to change notification settings - Fork 85
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #93 from FS-Online/docs-versioning
Docs improvements running up to beta release
- Loading branch information
Showing
15 changed files
with
213 additions
and
82 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 was deleted.
Oops, something went wrong.
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,15 @@ | ||
# Formula Student Driverless Simulator | ||
|
||
Welcome to the FSDS documentation. | ||
|
||
This home page contains an index with a brief description of the different sections in the documentation. | ||
Feel free to read in whatever order preferred. | ||
In any case, here are a few suggestions for newcomers. | ||
|
||
* **Get familiar with the architecture.** The [system overview](system-overview.md) introduces you to the ideas and concepts of the system. | ||
* **Run the simulation.** Either follow the [simulation guide](how-to-simulate.md) or build from source by following the [development guide](how-to-develop.md) | ||
* **Integrate ROS.** [Build the ros bridge node](building-ros.md) and [launch the ros bridge](ros-bridge.md) | ||
|
||
## Participating in FS-Online 2020? | ||
Participants of the FS-Online 2020 virtual event should start by reading the [system overview](system-overview.md) and [integration handbook](integration-handbook.md). | ||
Next, follow the steps in [the simulation guide](how-to-simulate.md) to get your simulation up and running. |
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,5 @@ | ||
#version-selector { | ||
display: block; | ||
margin: -10px auto 0.809em; | ||
padding: 2px; | ||
} |
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
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,64 @@ | ||
window.addEventListener("DOMContentLoaded", function() { | ||
function normalizePath(path) { | ||
var normalized = []; | ||
path.split("/").forEach(function(bit, i) { | ||
if (bit === "." || (bit === "" && i !== 0)) { | ||
return; | ||
} else if (bit === "..") { | ||
if (normalized.length === 1 && normalized[0] === "") { | ||
// We must be trying to .. past the root! | ||
throw new Error("invalid path"); | ||
} else if (normalized.length === 0 || | ||
normalized[normalized.length - 1] === "..") { | ||
normalized.push(".."); | ||
} else { | ||
normalized.pop(); | ||
} | ||
} else { | ||
normalized.push(bit); | ||
} | ||
}); | ||
return normalized.join("/"); | ||
} | ||
|
||
// `base_url` comes from the base.html template for this theme. | ||
var REL_BASE_URL = base_url; | ||
var ABS_BASE_URL = normalizePath(window.location.pathname + "/" + | ||
REL_BASE_URL); | ||
var CURRENT_VERSION = ABS_BASE_URL.split("/").pop(); | ||
|
||
function makeSelect(options, selected) { | ||
var select = document.createElement("select"); | ||
|
||
options.forEach(function(i) { | ||
var option = new Option(i.text, i.value, undefined, | ||
i.value === selected); | ||
select.add(option); | ||
}); | ||
|
||
return select; | ||
} | ||
|
||
var xhr = new XMLHttpRequest(); | ||
xhr.open("GET", REL_BASE_URL + "/../versions.json"); | ||
xhr.onload = function() { | ||
var versions = JSON.parse(this.responseText); | ||
|
||
var realVersion = versions.find(function(i) { | ||
return i.version === CURRENT_VERSION || | ||
i.aliases.includes(CURRENT_VERSION); | ||
}).version; | ||
|
||
var select = makeSelect(versions.map(function(i) { | ||
return {text: i.title, value: i.version}; | ||
}), realVersion); | ||
select.id = "version-selector"; | ||
select.addEventListener("change", function(event) { | ||
window.location.href = REL_BASE_URL + "/../" + this.value; | ||
}); | ||
|
||
var title = document.querySelector("div.wy-side-nav-search"); | ||
title.insertBefore(select, title.querySelector(".icon-home").nextSibling); | ||
}; | ||
xhr.send(); | ||
}); |
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
Oops, something went wrong.