mirror of
https://github.com/tiennm99/HugoBlox-kit.git
synced 2026-10-12 16:15:12 +00:00
BREAKING CHANGE Module paths moved to `github.com/HugoBlox/kit` with new names: - core `blox-tailwind` → `blox` - analytics → `analytics` - netlify → `integrations/netlify` - slides (reveal) → `slides` Update go.mod, module.yaml/params, scripts, tests, and v0.11 migration guide accordingly.
20 lines
698 B
HTML
20 lines
698 B
HTML
{{/*
|
|
Docs: https://docs.hugoblox.com/reference/markdown/#inline-image
|
|
|
|
Parameters
|
|
----------
|
|
name :
|
|
Icon name.
|
|
padding_left : default "0"
|
|
Left padding.
|
|
padding_right : default "1"
|
|
Right padding.
|
|
*/}}
|
|
|
|
{{- if (.Get "name") -}}
|
|
{{- $icon := .Get "name" -}}
|
|
{{- $padding_right := (.Get "padding_right") | default 1 -}}{{/* Defaulting to 1 prevents no spacing when minimizing HTML. */}}
|
|
<span class="inline-block {{with (.Get "padding_left")}}pl-{{.}}{{end}} {{with $padding_right}}pr-{{.}}{{end}}">
|
|
{{ partial "functions/get_icon" (dict "name" $icon "attributes" "style=\"height: 1em; transform: translateY(0.1em);\"") }}
|
|
</span>
|
|
{{- end -}} |