7
1
mirror of https://gitlab.com/ansol/web-ansol.org.git synced 2024-10-23 16:20:42 +00:00
web-ansol.org/themes/academic/layouts/partials/widgets/featurette.html

42 lines
1.2 KiB
HTML
Raw Normal View History

2020-06-11 11:46:16 +00:00
{{ $ := .root }}
{{ $page := .page }}
<div class="row featurette">
{{ with $page.Title }}
<div class="col-md-12 section-heading">
<h1>{{ . | markdownify | emojify }}</h1>
{{ if $page.Params.subtitle }}<p>{{ $page.Params.subtitle | markdownify | emojify }}</p>{{ end }}
</div>
{{ end }}
{{ with $page.Content }}
<div class="col-md-12">
{{ . }}
</div>
{{ end }}
{{ range $page.Params.feature }}
{{ $pack := or .icon_pack "fas" }}
{{ $pack_prefix := $pack }}
{{ if in (slice "fab" "fas" "far" "fal") $pack }}
{{ $pack_prefix = "fa" }}
{{ end }}
<div class="col-12 col-sm-4">
{{ with .icon }}
<div class="featurette-icon">
{{- if eq $pack "emoji" -}}
{{- . | emojify -}}
{{- else if eq $pack "custom" -}}
{{- $svg_icon := resources.Get (printf "images/icon-pack/%s.svg" .) -}}
{{- if $svg_icon -}}<img src="{{ $svg_icon.RelPermalink }}" alt="{{.}}" class="svg-icon svg-baseline">{{- end -}}
{{- else -}}
<i class="{{ $pack }} {{ $pack_prefix }}-{{ . }}"></i>
{{- end -}}
</div>
{{ end }}
<h3>{{ .name | markdownify | emojify }}</h3>
{{ with .description }}<p>{{ . | markdownify | emojify }}</p>{{ end }}
</div>
{{ end }}
</div>