Skip to content

Commit 65b7a32

Browse files
basiratkareemsvrnm
andauthored
Implement clickable flag buttons to filter records without updating search term (#5611)
Co-authored-by: Severin Neumann <[email protected]>
1 parent 37bab28 commit 65b7a32

File tree

1 file changed

+13
-10
lines changed

1 file changed

+13
-10
lines changed

layouts/partials/ecosystem/registry/entry.html

+13-10
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
{{ $languageNames := .languageNames -}}
22

33
{{ with .value -}}
4-
{{
4+
{{
55
$remoteRegistries := dict
6-
"npm" (dict
6+
"npm" (dict
77
"urlPattern" "https://npmjs.com/package/%s"
88
"installTemplate" "ecosystem/registry/quickinstall/default.md"
99
"installLine" "npm install %s"
@@ -116,16 +116,19 @@ <h4 class="card-title mb-0 d-flex flex-row">
116116
<span class="badge rounded-pill text-bg-info"><i class="fa-regular fa-star"></i> new</span>
117117
{{ end -}}
118118
{{ if $isNative -}}
119-
<span class="badge rounded-pill text-bg-success text-white"><i class="fa-solid fa-puzzle-piece"></i> native</span>
119+
<a href="/ecosystem/registry?flag=native" class="badge rounded-pill text-bg-success text-white" title="Click to filter by native flag">
120+
<i class="fa-solid fa-puzzle-piece"></i> native</a>
120121
{{ end -}}
121122
{{ if $isFirstParty -}}
122-
<span class="badge rounded-pill text-bg-success text-white"><i class="fa-solid fa-heart"></i> first party integration</span>
123+
<a href="/ecosystem/registry?flag=first_party" class="badge rounded-pill text-bg-success text-white" title="Click to filter by first party flag">
124+
<i class="fa-solid fa-heart"></i> first party integration</a>
123125
{{ end -}}
124126
{{ if $usedInDemo -}}
125127
<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>
126128
{{ end -}}
127129
{{ if $deprecated -}}
128-
<span class="badge rounded-pill text-bg-danger text-white" title=""><i class="fa-solid fa-ban"></i> deprecated</span>
130+
<a href="/ecosystem/registry?flag=deprecated" class="badge rounded-pill text-bg-danger text-white" title="Click to filter by deprecated flag">
131+
<i class="fa-solid fa-ban"></i> deprecated</a>
129132
{{ end -}}
130133
{{ if .cncfProjectLevel -}}
131134
<span class="badge rounded-pill text-bg-primary text-white" title="CNCF {{ .cncfProjectLevel}} Project">
@@ -136,7 +139,7 @@ <h4 class="card-title mb-0 d-flex flex-row">
136139
</h4>
137140
<p class="card-text">
138141
<small class="text-body-secondary">
139-
by
142+
by
140143
{{ range $index, $author := .authors -}}
141144
{{ if $index }}, {{ end }}
142145
{{ if eq $author.name "OpenTelemetry Authors" -}}
@@ -191,7 +194,7 @@ <h6><i class="fa-solid fa-forward"></i> Quick Install</h6>
191194
{{ .package.version }}
192195
</div>
193196
<small>Version</small>
194-
</div>
197+
</div>
195198
</li>
196199
{{- end -}}
197200
{{ with .language -}}
@@ -201,7 +204,7 @@ <h6><i class="fa-solid fa-forward"></i> Quick Install</h6>
201204
{{ $languageNames.Get . | default (humanize .) }}
202205
</div>
203206
<small>Language</small>
204-
</div>
207+
</div>
205208
</li>
206209
{{- end }}
207210
{{ with .registryType -}}
@@ -211,7 +214,7 @@ <h6><i class="fa-solid fa-forward"></i> Quick Install</h6>
211214
{{ . | humanize }}
212215
</div>
213216
<small>Component</small>
214-
</div>
217+
</div>
215218
</li>
216219
{{- end -}}
217220
{{ with .license -}}
@@ -221,7 +224,7 @@ <h6><i class="fa-solid fa-forward"></i> Quick Install</h6>
221224
{{ . }}
222225
</div>
223226
<small>License</small>
224-
</div>
227+
</div>
225228
</li>
226229
{{- end -}}
227230
</div>

0 commit comments

Comments
 (0)