diff --git a/website/static/main.js b/website/static/main.js index c922964e..2a1507ad 100644 --- a/website/static/main.js +++ b/website/static/main.js @@ -132,6 +132,7 @@ function collapseAll() { function applyFilters() { const query = searchInput ? searchInput.value.toLowerCase().trim() : ""; + const descRowsVisible = !isIndexDocument || activeFilter !== null; let visibleCount = 0; collapseAll(); @@ -159,8 +160,11 @@ function applyFilters() { } if (row.hidden !== !show) row.hidden = !show; - if (row._descRow && row._descRow.hidden !== !show) { - row._descRow.hidden = !show; + if (row._descRow) { + const descHidden = !show || !descRowsVisible; + if (row._descRow.hidden !== descHidden) { + row._descRow.hidden = descHidden; + } } if (show) { diff --git a/website/static/style.css b/website/static/style.css index 7a8c5fa7..a547d95b 100644 --- a/website/static/style.css +++ b/website/static/style.css @@ -788,7 +788,7 @@ kbd { box-shadow: inset 3px 0 0 var(--accent); } -.row:has(+ .desc-row) td { +.row:has(+ .desc-row:not([hidden])) td { border-bottom-color: transparent; padding-bottom: 0.35rem; } @@ -980,6 +980,10 @@ th[data-sort].sort-asc::after { display: table-row; } +.desc-row:not([hidden]) + .expand-row .expand-desc { + display: none; +} + .expand-row td { padding-top: 0.1rem; padding-bottom: 1.15rem; diff --git a/website/templates/index.html b/website/templates/index.html index 3fa763e6..367bccc2 100644 --- a/website/templates/index.html +++ b/website/templates/index.html @@ -251,6 +251,14 @@ + {% if entry.description %} + + + +
{{ entry.description | safe }}
+ + + {% endif %}