Skip to content

Commit

Permalink
Implement clickable flag buttons to filter records without updating s…
Browse files Browse the repository at this point in the history
…earch term (#5611)

Co-authored-by: Severin Neumann <[email protected]>
  • Loading branch information
basiratkareem and svrnm authored Nov 22, 2024
1 parent 37bab28 commit 65b7a32
Showing 1 changed file with 13 additions and 10 deletions.
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

0 comments on commit 65b7a32

Please sign in to comment.