Files
webcoredesktop/layouts/partials/sections/siblings.html
T
2026-10-28 09:17:40 -06:00

34 lines
1.6 KiB
HTML

{{/*
The sibling project directory, from data/siblings.yaml. Each card shows the
project, its author and tags, and the `sibling add` command to install it
(with a Copy button, from baseof.html). With no projects listed yet, an
empty card invites the first submission: `emptyText` and `emptyCtas`.
*/}}
{{ $s := . }}
{{ $projects := hugo.Data.siblings | default slice }}
{{ partial "sections/head.html" $s }}
{{ if $projects }}
<ul class="sib-grid">
{{ range sort $projects "name" }}
{{ $p := . }}
{{ $home := .homepage | default (replaceRE `\.git$` "" .url) }}
<li class="sib-card">
<div class="sib-head">
<h3 class="sib-name"><a href="{{ $home }}">{{ .name }}<span class="arrow" aria-hidden="true">↗</span></a></h3>
{{ with $p.author }}<span class="sib-author">by {{ with $p.authorUrl }}<a href="{{ . }}">{{ $p.author }}</a>{{ else }}{{ . }}{{ end }}</span>{{ end }}
</div>
<p class="sib-desc">{{ .description | markdownify }}</p>
{{ with .tags }}<ul class="sib-tags">{{ range . }}<li>{{ . }}</li>{{ end }}</ul>{{ end }}
<pre class="sib-cmd"><code>sibling add {{ .url }}</code></pre>
</li>
{{ end }}
</ul>
{{ else }}
<div class="sib-empty">
<span class="sib-empty-mark" aria-hidden="true"></span>
<p class="sib-empty-text">{{ $s.emptyText | default "No sibling projects are listed yet. Yours could be the first." | markdownify }}</p>
{{ with $s.emptyCtas }}<div class="actions">{{ partial "sections/ctas.html" . }}</div>{{ end }}
</div>
{{ end }}
{{ if $s.ctas }}<div class="cta-row">{{ partial "sections/ctas.html" $s.ctas }}</div>{{ end }}