mirror of
https://github.com/TrentSPalmer/hugo_themes_report.git
synced 2024-12-04 16:41:31 -08:00
add theme count to table
This commit is contained in:
parent
8fc0b17f96
commit
6e4c1cc072
@ -101,7 +101,7 @@ function getDiplayState() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let tableColumns = [
|
let tableColumns = [
|
||||||
{ headingName: "cname", headingText: "theme" },
|
{ headingName: "cname", headingText: "themes" },
|
||||||
{ headingName: "date", headingText: "date" },
|
{ headingName: "date", headingText: "date" },
|
||||||
{ headingName: "num_stars", headingText: "stars" },
|
{ headingName: "num_stars", headingText: "stars" },
|
||||||
{ headingName: "commit", headingText: "commit" },
|
{ headingName: "commit", headingText: "commit" },
|
||||||
@ -125,14 +125,6 @@ function buildResults() {
|
|||||||
resultsTable.appendChild(resultsTableHeadRow);
|
resultsTable.appendChild(resultsTableHeadRow);
|
||||||
let selectedColumns = getSelectedColumns();
|
let selectedColumns = getSelectedColumns();
|
||||||
|
|
||||||
tableColumns
|
|
||||||
.filter((y) => selectedColumns.includes(y.headingName))
|
|
||||||
.forEach((x) => {
|
|
||||||
let xTH = document.createElement("th");
|
|
||||||
xTH.innerHTML = x.headingText;
|
|
||||||
resultsTableHeadRow.appendChild(xTH);
|
|
||||||
});
|
|
||||||
|
|
||||||
let selectedTags = getSelected("tag");
|
let selectedTags = getSelected("tag");
|
||||||
let selectedFeatures = getSelected("feature");
|
let selectedFeatures = getSelected("feature");
|
||||||
let selectedLicenses = getSelected("license");
|
let selectedLicenses = getSelected("license");
|
||||||
@ -154,6 +146,18 @@ function buildResults() {
|
|||||||
addThemeTableRow(theme, selectedColumns, selectedTags, selectedFeatures)
|
addThemeTableRow(theme, selectedColumns, selectedTags, selectedFeatures)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
tableColumns
|
||||||
|
.filter((y) => selectedColumns.includes(y.headingName))
|
||||||
|
.forEach((x) => {
|
||||||
|
let xTH = document.createElement("th");
|
||||||
|
if (x.headingText === "themes") {
|
||||||
|
xTH.innerHTML = `${filteredThemes.length}/${themes.length} ${x.headingText}`;
|
||||||
|
} else {
|
||||||
|
xTH.innerHTML = x.headingText;
|
||||||
|
}
|
||||||
|
resultsTableHeadRow.appendChild(xTH);
|
||||||
|
});
|
||||||
|
|
||||||
// from buildSelectionMenu.js
|
// from buildSelectionMenu.js
|
||||||
buildSelectionMenu(
|
buildSelectionMenu(
|
||||||
tagAndFeatureFilteredThemes,
|
tagAndFeatureFilteredThemes,
|
||||||
|
Loading…
Reference in New Issue
Block a user