Files
hammerfest/layouts/partials/sections/logos.html
T
2026-10-05 06:13:52 -06:00

25 lines
1.1 KiB
HTML

{{/*
A logo wall. `source: "apps"` fills it from data/app_wall.yaml (icons from
the sprite at images/app-icons.svg; a tile without an icon shows its first
letter). Otherwise `items`, each a `name` and optional `url`, render as
wordmarks.
*/}}
{{ $s := . }}
{{ partial "sections/head.html" $s }}
{{ $sprite := "images/app-icons.svg" | relURL }}
{{ $items := cond (eq $s.source "apps") hugo.Data.app_wall ($s.items | default slice) }}
<ul class="logo-wall">
{{ range $items }}
<li>
{{ if .url }}<a class="logo-tile" href="{{ .url | relURL }}">{{ else }}<span class="logo-tile">{{ end }}
{{ if eq $s.source "apps" }}
{{ with .icon }}<svg class="logo-icon" aria-hidden="true"><use href="{{ $sprite }}#{{ . }}"></use></svg>
{{ else }}<span class="logo-icon logo-letter" aria-hidden="true">{{ substr .name 0 1 }}</span>{{ end }}
{{ end }}
<span class="logo-name">{{ .name }}</span>
{{ if .url }}</a>{{ else }}</span>{{ end }}
</li>
{{ end }}
</ul>
{{ if $s.ctas }}<div class="cta-row">{{ partial "sections/ctas.html" $s.ctas }}</div>{{ end }}