diff --git a/layouts/_partials/utilities/GetThemeIcon.html b/layouts/_partials/utilities/GetThemeIcon.html new file mode 100644 index 0000000..4a9f373 --- /dev/null +++ b/layouts/_partials/utilities/GetThemeIcon.html @@ -0,0 +1,12 @@ +{{- $id := .id -}} +{{- $alias := .alias -}} +{{- $default := .default -}} +{{- $result := "" -}} + +{{- if reflect.IsMap site.Params.icons -}} + {{- $result = or (index site.Params.icons $id) $alias $default -}} +{{- else -}} + {{- $result = or $alias $default -}} +{{- end -}} + +{{- return $result -}} \ No newline at end of file