fix: drop plural and sort/search hints on single-project category pages

Pages with one project read "Search 1 projects" and told readers to re-sort or search a one-row table.

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Vinta Chen
2026-10-21 23:12:13 +08:00
co-authored by Claude
parent 9177a2e8a7
commit 6e9dc809af
2 changed files with 12 additions and 6 deletions
+5
View File
@@ -761,6 +761,11 @@ kbd {
justify-self: end;
}
/* Single-project pages drop the order note, so keep the note in the last column */
.results-note:only-child {
grid-column: -2 / -1;
}
.controls {
display: grid;
gap: 0.85rem;
+7 -6
View File
@@ -210,20 +210,21 @@
{% include "_sponsor_band.html" %}
<section class="results-section" id="library-index">
{% set single_entry = entries | length == 1 %}
<div class="results-intro section-shell" data-reveal>
{% if entry_groups %}
{% if entry_groups and not single_entry %}
{% set named_groups = entry_groups | selectattr("name") | list %}
<p class="order-note">
{% if group_categories %}Listed by section, in editorial order.{% elif named_groups %}Listed in editorial order, grouped by use case.{% else %}Listed in editorial order.{% endif %}
<strong>Click a column header</strong> to re-sort the whole list.
</p>
{% else %}
{% elif not entry_groups %}
<div>
<h2>{{ entries | length }} {{ category.name }} projects</h2>
<h2>{{ entries | length }} {{ category.name }} project{{ "s" if not single_entry }}</h2>
</div>
{% endif %}
<p class="results-note">
Press <kbd>/</kbd> to search. Tags open their category. Click a row for
{% if not single_entry %}Press <kbd>/</kbd> to search. {% endif %}Tags open their category. Click a row for
details.
</p>
</div>
@@ -248,8 +249,8 @@
<input
type="search"
class="search"
placeholder="Search {{ entries | length }} projects in {{ category.name }}…"
data-short-placeholder="Search {{ entries | length }} projects…"
placeholder="Search {{ entries | length }} project{{ "s" if not single_entry }} in {{ category.name }}…"
data-short-placeholder="Search {{ entries | length }} project{{ "s" if not single_entry }}…"
aria-label="Search projects"
/>
</div>