Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

27 lines
1.1 KiB
HTML
Raw Permalink Normal View History

{{- /* Takes a list of package names and displays them as a tiled list. Limited to those defined as pages
of the API Reference section so that we can use the additional metadata that goes along with them. */
-}}
{{ $site := .Site }}
<div class="tiles flex-wrap">
{{ $pkgs := split (.Get 0) "," }}
{{ $useLogo := default true (.Get 1) }}
{{ range $pkg := $pkgs }}
{{ $href := printf "/registry/packages/%s/api-docs" $pkg }}
{{ with $site.GetPage $href }}
{{ $page := .Site.GetPage $href }}
<div class="md:w-1/2 lg:w-1/3 xl:w-1/4 p-2">
<a class="tile p-6 font-display font-semibold text-lg" href="{{ .RelPermalink }}" title="{{ .Title }} resource documentation">
{{ if eq $useLogo true }}
<img class="h-10 mx-auto text-center" src="/logos/pkg/{{ $pkg }}.svg" alt="{{ .Title }}" />
{{ else }}
<div class="text-center">{{ .Title }}</div>
{{ end }}
</a>
</div>
{{ end }}
{{ end }}
</div>