This repository has been archived on 2024-11-13. You can view files and clone it, but cannot push or open issues or pull requests.
fediversity_website/themes/nluug/layouts/community/section.html

34 lines
769 B
HTML
Raw Normal View History

{{ define "main" }}
{{ $communities := slice }}
{{ range sort site.Data.community "name" "asec" }}
{{ $communities = $communities | append . }}
{{ end }}
{{ $categories := slice }}
{{ range .Site.Data.community }}
{{ if .category }}
{{ $categories = $categories | append .category }}
{{ end }}
{{ end }}
{{ $categories = uniq $categories }}
{{ range index $categories }}
<h3>{{ . | title }}</h3>
<blockquote>
{{ range where $communities "category" . }}
<div>
{{ if .url }}
<h4><a href="{{ .url }}">{{ .name }}</a></h4>
{{ else }}
<h4>{{ .name }}</h4>
{{ end }}
<p>{{ .description }}</p>
</div>
{{ end }}
</blockquote>
{{ end }}
{{ end }}