Skip to content
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

Implement clickable flag buttons to filter records without updating search term #5611

Open
wants to merge 9 commits into
base: main
Choose a base branch
from
23 changes: 13 additions & 10 deletions layouts/partials/ecosystem/registry/entry.html
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{{ $languageNames := .languageNames -}}

{{ with .value -}}
{{
{{
$remoteRegistries := dict
"npm" (dict
"npm" (dict
"urlPattern" "https://npmjs.com/package/%s"
"installTemplate" "ecosystem/registry/quickinstall/default.md"
"installLine" "npm install %s"
Expand Down Expand Up @@ -116,16 +116,19 @@ <h4 class="card-title mb-0 d-flex flex-row">
<span class="badge rounded-pill text-bg-info"><i class="fa-regular fa-star"></i> new</span>
{{ end -}}
{{ if $isNative -}}
<span class="badge rounded-pill text-bg-success text-white"><i class="fa-solid fa-puzzle-piece"></i> native</span>
<a href="/ecosystem/registry?flag=native" class="badge rounded-pill text-bg-success text-white" title="Click to filter by native flag">
<i class="fa-solid fa-puzzle-piece"></i> native</a>
{{ end -}}
{{ if $isFirstParty -}}
<span class="badge rounded-pill text-bg-success text-white"><i class="fa-solid fa-heart"></i> first party integration</span>
<a href="/ecosystem/registry?flag=first_party" class="badge rounded-pill text-bg-success text-white" title="Click to filter by first party flag">
<i class="fa-solid fa-heart"></i> first party integration</a>
{{ end -}}
{{ if $usedInDemo -}}
<span class="badge rounded-pill text-bg-secondary text-white" title="This package is used in the OpenTelemetry Demo!"><i class="fa-solid fa-shapes"></i> OTel Demo</span>
{{ end -}}
{{ if $deprecated -}}
<span class="badge rounded-pill text-bg-danger text-white" title=""><i class="fa-solid fa-ban"></i> deprecated</span>
<a href="/ecosystem/registry?flag=deprecated" class="badge rounded-pill text-bg-danger text-white" title="Click to filter by deprecated flag">
<i class="fa-solid fa-ban"></i> deprecated</a>
{{ end -}}
{{ if .cncfProjectLevel -}}
<span class="badge rounded-pill text-bg-primary text-white" title="CNCF {{ .cncfProjectLevel}} Project">
Expand All @@ -136,7 +139,7 @@ <h4 class="card-title mb-0 d-flex flex-row">
</h4>
<p class="card-text">
<small class="text-body-secondary">
by
by
{{ range $index, $author := .authors -}}
{{ if $index }}, {{ end }}
{{ if eq $author.name "OpenTelemetry Authors" -}}
Expand Down Expand Up @@ -191,7 +194,7 @@ <h6><i class="fa-solid fa-forward"></i> Quick Install</h6>
{{ .package.version }}
</div>
<small>Version</small>
</div>
</div>
</li>
{{- end -}}
{{ with .language -}}
Expand All @@ -201,7 +204,7 @@ <h6><i class="fa-solid fa-forward"></i> Quick Install</h6>
{{ $languageNames.Get . | default (humanize .) }}
</div>
<small>Language</small>
</div>
</div>
</li>
{{- end }}
{{ with .registryType -}}
Expand All @@ -211,7 +214,7 @@ <h6><i class="fa-solid fa-forward"></i> Quick Install</h6>
{{ . | humanize }}
</div>
<small>Component</small>
</div>
</div>
</li>
{{- end -}}
{{ with .license -}}
Expand All @@ -221,7 +224,7 @@ <h6><i class="fa-solid fa-forward"></i> Quick Install</h6>
{{ . }}
</div>
<small>License</small>
</div>
</div>
</li>
{{- end -}}
</div>
Expand Down