feat(website): add Built-in category tag for stdlib entries

Stdlib entries now show a "Built-in" tag alongside their regular
category tag. The tag is clickable and filters to all 17 stdlib
entries. Added to data-cats attribute so existing filter logic works.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Vinta Chen
2026-03-22 02:12:51 +08:00
parent 37a9443bbb
commit d3317bf3c9
2 changed files with 12 additions and 1 deletions

View File

@@ -347,6 +347,12 @@ th[data-sort].sort-asc::after {
white-space: nowrap;
}
.tag-source {
background: var(--bg-input);
color: var(--text-muted);
font-weight: 600;
}
/* === Arrow Column === */
.col-arrow {
width: 2.5rem;

View File

@@ -84,7 +84,7 @@
<tr
class="row"
role="button"
data-cats="{{ entry.categories | join('||') }}"
data-cats="{{ entry.categories | join('||') }}{% if entry.source_type == 'Built-in' %}||Built-in{% endif %}"
data-groups="{{ entry.groups | join('||') }}"
tabindex="0"
aria-expanded="false"
@@ -122,6 +122,11 @@
{{ cat }}
</button>
{% endfor %}
{% if entry.source_type == 'Built-in' %}
<button class="tag tag-source" data-type="cat" data-value="Built-in">
Built-in
</button>
{% endif %}
<button class="tag tag-group" data-type="group" data-value="{{ entry.groups[0] }}">
{{ entry.groups[0] }}
</button>