diff --git a/docs/input/_Navbar.cshtml b/docs/input/_Navbar.cshtml
index 3a1031af19..1e06dc1d96 100644
--- a/docs/input/_Navbar.cshtml
+++ b/docs/input/_Navbar.cshtml
@@ -3,11 +3,65 @@
{
Tuple.Create("Documentation", Context.GetLink("docs")),
Tuple.Create("API", Context.GetLink("api")),
- Tuple.Create(" 5.12.0", "/5.12.0/docs"),
};
+
+ // Define a list of versions with their respective links and status (e.g., latest, EOL).
+ var VersionList = new List<(string Name, string Link, string Status, bool IsReleased)>
+ {
+ ("5.12", "/5.12.0/docs", "(EOL)", true),
+ ("6.0", "/6.0.0/docs", "", true),
+ ("6.1-6.3", "/", "(latest)", true),
+ ("main branch", "/dev/docs", "(unstable)", false),
+ };
+
+ // determine currently viewed version
+ var CurrentlyViewedVersion = VersionList.Last().Name;
+ @foreach (var version in VersionList)
+ {
+ if (Context.GetLink(Document).StartsWith(version.Link))
+ {
+ CurrentlyViewedVersion = version.Name;
+ break;
+ }
+ }
+
foreach(Tuple p in pages)
{
string active = Context.GetLink(Document).StartsWith(p.Item2) ? "active" : null;
@Html.Raw(p.Item1)
}
-}
\ No newline at end of file
+
+
+
+ Other Versions - v: @Html.Raw(@CurrentlyViewedVersion)
+
+
+
+
+ - Releases
+ @foreach (var version in VersionList)
+ {
+ if (version.IsReleased)
+ {
+ -
+ @version.Name @version.Status
+
+ }
+ }
+
+
+ - In Development
+ @foreach (var version in VersionList)
+ {
+ if (!version.IsReleased)
+ {
+ -
+ @version.Name @version.Status
+
+ }
+ }
+
+
+
+
+}
diff --git a/docs/input/assets/css/override.less b/docs/input/assets/css/override.less
index b5b943276c..dbb1df9a5d 100644
--- a/docs/input/assets/css/override.less
+++ b/docs/input/assets/css/override.less
@@ -259,3 +259,44 @@ main .col-sm-6 {
flex-direction: column;
}
}
+
+.dropdown {
+ display: inline-block;
+ left: 550px;
+}
+
+/* Dropdown Button */
+.dropbtn {
+ padding: 16px;
+ border: none;
+ cursor: pointer;
+}
+
+/* Dropdown content (hidden by default) */
+.dropdown-content {
+ display: none;
+ position: absolute;
+ background-color: #f9f9f9;
+ min-width: 150px;
+ box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
+ z-index: 1;
+}
+
+/* Links inside dropdown content */
+.dropdown-content a {
+ color: black;
+ padding: 12px 16px;
+ text-decoration: none;
+ display: block;
+}
+
+/* Change color of dropdown links on hover */
+.dropdown-content a:hover {
+ background-color: #f1f1f1
+}
+
+/* Show the dropdown content on hover */
+.dropdown:hover .dropdown-content {
+ display: block;
+ padding: 12px 16px;
+}