Eerste opzet voor het verzamelen van relevante communities
This commit is contained in:
parent
5d512572ec
commit
6735925a32
8 changed files with 85 additions and 0 deletions
33
themes/nluug/layouts/community/section.html
Normal file
33
themes/nluug/layouts/community/section.html
Normal file
|
@ -0,0 +1,33 @@
|
|||
{{ 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 }}" target="_blank" rel="noopener">{{ .name }}</a></h4>
|
||||
{{ else }}
|
||||
<h4>{{ .name }}</h4>
|
||||
{{ end }}
|
||||
<p>{{ .description }}</p>
|
||||
</div>
|
||||
{{ end }}
|
||||
</blockquote>
|
||||
{{ end }}
|
||||
|
||||
|
||||
{{ end }}
|
Loading…
Add table
Add a link
Reference in a new issue