Files
docker-docs/layouts/partials/languages.html
Arthur 9eff1ba5fc theme: extract more styles (#22734)
Extract shared styling into appropriate utilities.
Improve toc width.
2025-05-30 09:20:56 -07:00

24 lines
654 B
HTML

{{- /*
List of languages (taxonomy) chips with images
Context: page.Pages
*/
-}}
{{- range . -}}
{{- if eq .File nil }}
{{- errorf "[languages] Undefined language: '%s' in %s" (urlize (strings.ToLower .Title)) page.File.Filename }}
{{- end }}
{{- if not .Page.Params.icon }}
{{- errorf "[languages] language is missing an icon: '%s' in %s" (urlize (strings.ToLower .Title)) page.File.Filename }}
{{- end }}
<span class="chip">
<img
class="py-1"
height="18"
width="18"
title="{{ .Page.LinkTitle }}"
src="{{ .Page.Params.icon }}"
/>
<span>{{ .Page.LinkTitle }}</span>
</span>
{{- end -}}