function buildDescription( selectedColumns, sortBy, selectedMinVer, selectedLicenses, selectedTags, selectedFeatures ) { let d = document.getElementById("description"); d.style.fontSize = ".9rem"; d.style.color = "gray"; d.style.fontStyle = "italic"; d.style.textAlign = "left"; let sCols = selectedColumns.map((x) => { if (x === "cname") { return "theme"; } else if (x === "num_stars") { return "stars"; } else if (x === "min_ver") { return "minVer"; } else { return x; } }); let showingColumns = `ShowingColumns: ${sCols}; `; let sortedBy = `SortedBy: ${sortBy}; `; let sMinVer = `MinHugoVersion=${ selectedMinVer.length === 0 ? "none" : selectedMinVer }; `; let sLicences = `Licenses=${ selectedLicenses.length === 0 ? "none" : selectedLicenses }; `; let sTags = `Tags=${ selectedTags.length === 0 ? "none" : selectedTags }; `; let sFeatures = `Features=${ selectedFeatures.length === 0 ? "none" : selectedFeatures }`; let innerHTML = showingColumns + sortedBy + " FilteredBy: " + sMinVer + sLicences + sTags + sFeatures; d.innerHTML = innerHTML.replace(/[,]/g, ", "); }