M doc/website/index.html => doc/website/index.html +17 -2
@@ 116,14 116,29 @@ SPDX-License-Identifier: GPL-3.0-only
}
function renderReleases(list) {
+ function versionTag(type) {
+ var e = document.createElement("span");
+ e.classList.add("version-tag");
+ e.classList.add(`version-tag-${type}`);
+ e.innerHTML = type;
+ return e;
+ }
+
sortReleases(list);
- list.forEach((e) => {
+ list.forEach((e, i) => {
var elem = document.createElement("details");
downloadsElement.appendChild(elem);
var summary = document.createElement("summary");
- summary.innerHTML = e.ver;
+ var summaryTitle = document.createElement("span");
+ summaryTitle.innerHTML = e.ver;
+ summary.appendChild(summaryTitle);
+ if (i == 0) {
+ summary.appendChild(versionTag("edge"));
+ } else if (i == 1) {
+ summary.appendChild(versionTag("released"));
+ }
elem.appendChild(summary);
var ul = document.createElement("ul");
M doc/website/main.css => doc/website/main.css +34 -0
@@ 72,3 72,37 @@ nav div {
transform: rotate(360deg);
}
}
+
+summary {
+ display: flex;
+ flex-direction: row;
+ justify-content: flex-start;
+ width: 100%;
+ margin-bottom: 5px;
+}
+
+summary:hover {
+ background-color: #21222C;
+}
+
+.version-tag {
+ margin-left: 3px;
+ font-size: 10px;
+ border-radius: 40% / 100%;
+ padding: 1px;
+ min-width: 40px;
+ text-align: center;
+ vertical-align: middle;
+ line-height: 18px;
+}
+
+.version-tag-edge {
+ color: #282A36;
+ background-color: #FFB86C;
+}
+
+.version-tag-released {
+ color: #282A36;
+ background-color: #50FA7B;
+}
+