blob: f50fbdc3a951f44d7445f513171f08bed8170774 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
{{- $collection := index .Data (.Feature.collection | default "features" ) -}}
{{ range (index $collection .Feature.feature) }}
<div class="item">
<h2 class="item-title">
{{ $useFontAwesome := $.Params.itemTitle.useFontAwesome | default $.Params.useFontAwesome }}
{{ $noExternalIcon := not ($.Params.itemTitle.externalLinkIcon | default $.Params.externalLinkIcon) }}
{{- if .link -}}
{{- if $useFontAwesome -}}
<i class="fas fa-link"></i> <a class="no-external-icon" href="{{ .link }}">{{ .title }}</a>
{{- else -}}
<a class="{{ if $noExternalIcon }}no-external-icon{{ end }}" href="{{ .link }}">{{ .title }}</a>
{{- end -}}
{{- else -}}
{{ .title }}
{{- end -}}
</h2>
<span>{{ if and .subtitle .date }}
{{- .subtitle | markdownify }} - {{ .date }}
{{- else if .subtitle }}
{{- .subtitle | markdownify }}
{{- else if .date }}
{{- .date }}
{{- end }}</span>
{{ if .details }}
{{- partial "markdown" .details }}
{{- end }}
{{ if .links }}
<ul>
{{- range .links }}
<li>
{{- .prefix -}}
<a href="{{ .url }}" class="{{ if and $.Params.useFontAwesome .icon }}no-external-icon{{ end }}">{{ .title }}{{ if and $.Params.useFontAwesome .icon }}<i class="{{ .icon }}"></i>{{ end }}</a>
{{- end -}}
</li>
</ul>
{{ end }}
</div>
{{ end }}
|