init
This commit is contained in:
18
layouts/shortcodes/tooltip.html
Normal file
18
layouts/shortcodes/tooltip.html
Normal file
@@ -0,0 +1,18 @@
|
||||
{{- $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>
|
||||
Reference in New Issue
Block a user