2021-07-03 16:03:24 +02:00
|
|
|
{{- $protocol := "tel" -}}
|
|
|
|
{{- $tel := . -}}
|
2021-10-21 21:47:42 +02:00
|
|
|
{{- $telWithProtocol := $tel -}}
|
|
|
|
{{- if strings.HasPrefix $tel $protocol -}}
|
|
|
|
{{- $tel = substr $tel 4 -}}
|
|
|
|
{{- else -}}
|
2022-02-23 11:26:53 +01:00
|
|
|
{{- $telWithProtocol = print $protocol ":" (replace $tel " " "") -}}
|
2021-10-21 21:47:42 +02:00
|
|
|
{{- end -}}
|
2021-07-03 16:03:24 +02:00
|
|
|
<a
|
|
|
|
class="tel obfuscate"
|
|
|
|
data-link="{{ range $index := seq (sub (len $telWithProtocol) 1) 0}}{{ substr $telWithProtocol $index 1}}{{ end }}"
|
2021-10-21 22:50:06 +02:00
|
|
|
>{{ range $index := seq (sub (len $tel) 1) 0}}{{ substr $tel $index 1}}{{if modBool $index 2}} {{ end }}{{ end }}</a>
|