37 lines
1.2 KiB
HTML
37 lines
1.2 KiB
HTML
{{- $links := .links }}
|
|
{{- $odd := .odd }}
|
|
{{- $defaultimage := .defaultimage}}
|
|
{{- $id := "links"}}
|
|
{{if $links.id}}
|
|
{{- $id = $links.id}}
|
|
{{else if .id}}
|
|
{{- $id = .id }}
|
|
{{end}}
|
|
<div id="{{ $id }}" class="section {{if eq $odd 0}} section-even {{end}}">
|
|
<div class="section-content">
|
|
{{ with $links.title }}
|
|
{{ partial "components/title.html" . }}
|
|
{{ end }}
|
|
<div class="cardList">
|
|
{{- range $links.links}}
|
|
<div class="mediumCard">
|
|
<a href="{{ .url }}">
|
|
<div class="cardContent">
|
|
{{ if .image }}
|
|
{{ $style := "cardImage {{if ne .Params.image.cover }} noCover {{ end }}" }}
|
|
{{- partial "components/image.html" (dict "style" $style "url" .image.url "alt" .image.alt) -}}
|
|
{{ else if .icon }}
|
|
<div class="cardImage">
|
|
<i class="icon-{{ .icon }}"></i>
|
|
</div>
|
|
{{ else }}
|
|
{{- partial "components/image.html" (dict "style" "cardImage" "url" $defaultimage "alt" "Placeholder") -}}
|
|
{{ end }}
|
|
<div class="cardTitle">{{ .title }}</div>
|
|
</div>
|
|
</a>
|
|
</div>
|
|
{{- end}}
|
|
</div>
|
|
</div>
|
|
</div>
|