2020-02-27 13:14:40 +01:00
|
|
|
{{- $type := .type | default "fa" -}}
|
|
|
|
{{- $classList := split .class " " -}}
|
2020-02-17 14:02:27 +01:00
|
|
|
{{- /* Fork Awesome */ -}}
|
2020-02-21 16:42:35 +01:00
|
|
|
{{- if eq $type "fo" -}}
|
2020-02-17 14:02:27 +01:00
|
|
|
{{- $newClassList := slice -}}
|
|
|
|
{{- range $classList -}}
|
|
|
|
{{- if eq . "fa" -}}
|
|
|
|
{{- $newClassList = $newClassList | append "fo" -}}
|
|
|
|
{{- else -}}
|
|
|
|
{{- $newClassList = $newClassList | append (replaceRE `^fa\-(.+)$` `fo-$1` .) -}}
|
|
|
|
{{- end -}}
|
|
|
|
{{- end -}}
|
2020-02-21 16:42:35 +01:00
|
|
|
{{- $classList = $newClassList -}}
|
2020-03-08 14:02:21 +01:00
|
|
|
{{- with .scratch -}}
|
|
|
|
{{- .Set "forkawesome" true -}}
|
|
|
|
{{- end -}}
|
2020-02-21 16:42:35 +01:00
|
|
|
|
|
|
|
{{- /* default is Font Awesome */ -}}
|
2020-02-17 14:02:27 +01:00
|
|
|
{{- /* Others */ -}}
|
2020-02-21 16:42:35 +01:00
|
|
|
{{- else if ne $type "fa" -}}
|
2020-03-08 14:02:21 +01:00
|
|
|
{{- with .scratch -}}
|
|
|
|
{{- .Set "iconfont" true -}}
|
|
|
|
{{- end -}}
|
2020-02-17 14:02:27 +01:00
|
|
|
{{- end -}}
|
2020-03-09 20:33:28 +01:00
|
|
|
<i class="{{ delimit $classList ` ` }}"></i>
|