redesign menus

This commit is contained in:
2021-08-14 07:21:26 -07:00
parent 1cb1f0ec1f
commit df277e86ce
10 changed files with 192 additions and 72 deletions

View File

@@ -4,16 +4,13 @@ function addThemeTableRow(theme) {
let themeTD = document.createElement("td");
themeTD.innerHTML =
'<a href="' + theme.url + '" target="_blank">' + theme.short_name + "</a>";
themeTD.style.whiteSpace = "nowrap";
themeTD.style.overFlow = "hidden";
themeTD.style.width = "20%";
'<a href="' + theme.url + '" target="_blank">' + theme.cname + "</a>";
themeTD.style.minWidth = `${theme.cname.length / 6}rem`;
resultsTableRow.appendChild(themeTD);
let dateTD = document.createElement("td");
dateTD.innerHTML = theme.date;
dateTD.style.textAlign = "center";
dateTD.style.minWidth = "8rem";
dateTD.style.minWidth = "5rem";
resultsTableRow.appendChild(dateTD);
let starsTD = document.createElement("td");
@@ -22,8 +19,35 @@ function addThemeTableRow(theme) {
let commitTD = document.createElement("td");
commitTD.innerHTML = theme.commit;
commitTD.style.minWidth = "7rem";
resultsTableRow.appendChild(commitTD);
let minVerTD = document.createElement("td");
minVerTD.innerHTML = theme.min_ver;
resultsTableRow.appendChild(minVerTD);
let licenseTD = document.createElement("td");
licenseTD.innerHTML = theme.license;
licenseTD.style.minWidth = `${theme.license.length / 7}rem`;
resultsTableRow.appendChild(licenseTD);
let descTD = document.createElement("td");
descTD.innerHTML = theme.desc;
descTD.style.minWidth = `${theme.desc.length / 7}rem`;
resultsTableRow.appendChild(descTD);
let tagsTD = document.createElement("td");
let tL = theme.tags.length - 1;
tL += theme.tags.map((x) => x.length).reduce((a, b) => a + b, 0);
tagsTD.innerHTML = theme.tags;
tagsTD.style.minWidth = `${tL / 7}rem`;
resultsTableRow.appendChild(tagsTD);
let featuresTD = document.createElement("td");
let fL = theme.features.length - 1;
fL += theme.features.map((x) => x.length).reduce((a, b) => a + b, 0);
featuresTD.innerHTML = theme.features;
featuresTD.style.minWidth = `${fL / 7}rem`;
resultsTableRow.appendChild(featuresTD);
resultsTable.appendChild(resultsTableRow);
}