Skip to content

dev: fix filter bar items #5990

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 11, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions docs/content/docs/formatters/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,11 @@ golangci-lint formatters

## All formatters

<div class="hx-mt-6">
{{< icon "filter" >}}
{{< clickable-badge icon="fire" id="new-filter" content="New" class="gl-filter hx-cursor-pointer" type="warning" border=false >}}
{{< clickable-badge icon="emoji-sad" id="deprecated-filter" content="Deprecated" class="gl-filter hx-cursor-pointer" type="info" border=false >}}
{{< clickable-badge icon="trash" id="reset-filter" content="Reset" class="gl-filter-reset gl-hidden hx-cursor-pointer" type="error" border=true >}}
</div>
{{< filter-bar >}}
{{< clickable-badge class="gl-filter" id="new-filter" icon="fire" content="New" type="warning" >}}
{{< clickable-badge class="gl-filter" id="deprecated-filter" icon="emoji-sad" content="Deprecated" type="info" >}}
{{< clickable-badge class="gl-filter-reset gl-hidden" id="reset-filter" icon="trash" content="Reset" type="error" border=true >}}
{{< /filter-bar >}}

{{< cards >}}
{{< item-cards path="formatters" data="formatters_info" >}}
Expand Down
19 changes: 9 additions & 10 deletions docs/content/docs/linters/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,15 @@ golangci-lint linters

## All Linters

<div class="hx-mt-6">
{{< icon "filter" >}}
{{< clickable-badge icon="inbox" id="default-filter" content="Default" class="gl-filter hx-cursor-pointer" type="info" border=false >}}
{{< clickable-badge icon="fire" id="new-filter" content="New" class="gl-filter hx-cursor-pointer" type="warning" border=false >}}
{{< clickable-badge icon="sparkles" id="autofix-filter" content="Autofix" class="gl-filter hx-cursor-pointer" type="info" border=false >}}
{{< clickable-badge icon="fast-forward" id="fast-filter" content="Fast" class="gl-filter hx-cursor-pointer" border=false >}}
{{< clickable-badge icon="play" id="slow-filter" content="Slow" class="gl-filter hx-cursor-pointer" border=false >}}
{{< clickable-badge icon="emoji-sad" id="deprecated-filter" content="Deprecated" class="gl-filter hx-cursor-pointer" type="info" border=false >}}
{{< clickable-badge icon="trash" id="reset-filter" content="Reset" class="gl-filter-reset gl-hidden hx-cursor-pointer" type="error" border=true >}}
</div>
{{< filter-bar >}}
{{< clickable-badge class="gl-filter" id="default-filter" icon="inbox" content="Default" type="info" >}}
{{< clickable-badge class="gl-filter" id="new-filter" icon="fire" content="New" type="warning" >}}
{{< clickable-badge class="gl-filter" id="autofix-filter" icon="sparkles" content="Autofix" type="info" >}}
{{< clickable-badge class="gl-filter" id="fast-filter" icon="fast-forward" content="Fast" >}}
{{< clickable-badge class="gl-filter" id="slow-filter" icon="play" content="Slow" >}}
{{< clickable-badge class="gl-filter" id="deprecated-filter" icon="emoji-sad" content="Deprecated" type="info" >}}
{{< clickable-badge class="gl-filter-reset gl-hidden" icon="trash" id="reset-filter" content="Reset" type="error" border=true >}}
{{< /filter-bar >}}

{{< cards >}}
{{< item-cards path="linters" data="linters_info" >}}
Expand Down
4 changes: 2 additions & 2 deletions docs/layouts/_partials/clickable-badge.html
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@

{{- $borderClass := cond (eq $border true) "hx-border" "" -}}
{{- $badgeClass := or ($styleClass.Get $type) $defaultClass -}}
<div class="hextra-badge hx-mt-2">
<div id="{{ $id }}" class="hx-inline-flex hx-gap-1 hx-items-center hx-rounded-full hx-px-2.5 hx-leading-6 hx-text-[.65rem] {{ $borderClass }} {{ $badgeClass }} {{ $class }}">
<div class="hextra-badge hx-mt-2 hx-mx-1">
<div id="{{ $id }}" class="hx-inline-flex hx-gap-1 hx-items-center hx-rounded-full hx-px-2.5 hx-leading-6 hx-text-[.65rem] hx-cursor-pointer {{ $borderClass }} {{ $badgeClass }} {{ $class }}">
{{- with $icon -}}{{- partial "utils/icon" (dict "name" . "attributes" "height=12") -}}{{- end -}}
{{- $content -}}
</div>
Expand Down
12 changes: 12 additions & 0 deletions docs/layouts/_shortcodes/filter-bar.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{{- /*
This shortcode is used to create a filter bar.

@example {{< filter-bar >}}{{< clickable-badge content="Example">}}{{< filter-bar >}}
*/ -}}

<div class="hx-mt-6">
<span class="hx-inline-block hx-align-text-bottom icon" title="Filter">
{{- partial "utils/icon.html" (dict "name" "filter" "attributes" "height=1.2em") -}}
</span>
{{ .Inner }}
</div>
Loading