Skip to content

Commit

Permalink
allflags
Browse files Browse the repository at this point in the history
  • Loading branch information
taylorhelene authored and svrnm committed Nov 11, 2024
1 parent dc12484 commit 50839fb
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
6 changes: 6 additions & 0 deletions layouts/partials/ecosystem/registry/entry.html
Original file line number Diff line number Diff line change
Expand Up @@ -86,12 +86,18 @@
{{ end -}}
{{ $primaryHref := printf "href=%q" $primaryUrl | safeHTMLAttr -}}
{{ $flags := slice -}} <!-- Initialize flags slice -->
{{ if $isNew -}} <!-- Check if the entry is new -->
{{ $flags = $flags | append "new" -}}
{{ end -}}
{{ if $isNative -}}
{{ $flags = $flags | append "native" -}}
{{ end -}}
{{ if $isFirstParty -}}
{{ $flags = $flags | append "first party" -}}
{{ end -}}
{{ if $usedInDemo -}} <!-- Check if the entry was used in a demo -->
{{ $flags = $flags | append "used in demo" -}}
{{ end -}}
{{ if $deprecated -}}
{{ $flags = $flags | append "deprecated" -}}
{{ end -}}
Expand Down
8 changes: 6 additions & 2 deletions layouts/shortcodes/ecosystem/registry/search-form.html
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,12 @@
{{ if .isFirstParty -}}
{{ $flags = $flags | append "first party" -}}
{{ end -}}
{{ if .isNew -}}
{{ $flags = $flags | append "new" -}}
{{ end -}}
{{ if .usedInDemo -}}
{{ $flags = $flags | append "used in demo" -}}
{{ end -}}
{{ if .deprecated -}}
{{ $flags = $flags | append "deprecated" -}}
{{ end -}}
Expand All @@ -52,8 +58,6 @@
{{ $counter = add $counter 1 }}
{{ end -}}



{{ $allFlags := slice -}}
{{ range $entry := $entries -}}
{{ range $flag := $entry.flags -}}
Expand Down

0 comments on commit 50839fb

Please sign in to comment.