2020-04-29 16:48:57 -07:00
|
|
|
{{- /* Takes a list of package names and displays them as a tiled list. Limited to those defined as pages
|
2022-06-01 10:58:20 -07:00
|
|
|
of the API Reference section so that we can use the additional metadata that goes along with them. */
|
|
|
|
-}}
|
2021-10-12 12:52:56 -07:00
|
|
|
|
|
|
|
{{ $site := .Site }}
|
|
|
|
|
2022-06-01 10:58:20 -07:00
|
|
|
|
2020-04-29 16:48:57 -07:00
|
|
|
<div class="tiles flex-wrap">
|
|
|
|
{{ $pkgs := split (.Get 0) "," }}
|
|
|
|
{{ $useLogo := default true (.Get 1) }}
|
2021-10-12 12:52:56 -07:00
|
|
|
{{ range $pkg := $pkgs }}
|
2021-11-19 09:45:45 -08:00
|
|
|
{{ $href := printf "/registry/packages/%s/api-docs" $pkg }}
|
2021-10-12 12:52:56 -07:00
|
|
|
{{ 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 }}
|
2022-06-01 10:58:20 -07:00
|
|
|
<img class="h-10 mx-auto text-center" src="/logos/pkg/{{ $pkg }}.svg" alt="{{ .Title }}" />
|
2021-10-12 12:52:56 -07:00
|
|
|
{{ else }}
|
|
|
|
<div class="text-center">{{ .Title }}</div>
|
|
|
|
{{ end }}
|
|
|
|
</a>
|
|
|
|
</div>
|
2020-04-29 16:48:57 -07:00
|
|
|
{{ end }}
|
|
|
|
{{ end }}
|
|
|
|
</div>
|