18 lines
536 B
HTML
18 lines
536 B
HTML
{{- $name := .Get 0 -}}
|
|
{{- $label := cond (ge (len .Params) 2) (.Get 1) $name -}}
|
|
|
|
{{/* naam "hugo" -> i18n key "tooltip_hugo" */}}
|
|
{{- $key := printf "tooltip_%s" $name -}}
|
|
|
|
{{- $raw := i18n $key -}}
|
|
|
|
{{/* simpele fallback als vertaling ontbreekt */}}
|
|
{{- $text := cond (eq $raw $key) (printf "Missing tooltip for '%s'" $name) $raw -}}
|
|
|
|
<span class="tooltip-word">
|
|
{{ $label }}
|
|
<span class="tooltip-icon" aria-hidden="true">
|
|
<i class="fa fa-info-circle"></i>
|
|
<span class="tooltip-text">{{ $text }}</span>
|
|
</span>
|
|
</span> |