cupper-hugo-theme/themes/inclusive-pattern-docs/layouts/shortcodes/principles.html

17 lines
591 B
HTML
Raw Normal View History

2017-06-15 10:41:44 +02:00
{{ $JSON := $.Site.Data.principles }}
{{ $included := .Get "include" }}
{{ $included := apply (split $included ", ") "lower" "." }}
{{ $descriptions := .Get "descriptions" }}
<ul class="principles {{ if $descriptions }}with-desc{{ end }}">
{{ range $JSON.principles }}
{{ if in $included (lower .title) }}
<li>
<strong><a href="https://inclusivedesignprinciples.org#{{ .title | urlize }}">{{ .title }}</a>:</strong> <em>{{ .strapline }}</em>
{{ if $descriptions }}
<p>{{ .description }}</p>
{{ end }}
</li>
{{ end }}
{{ end }}
</ul>