hugo-theme-lowtech/layouts/partials/contact/telephone.html

10 lines
399 B
HTML
Raw Normal View History

2021-06-11 15:59:39 +02:00
{{- with .Site.Data.contact.telephone -}}
2021-07-03 16:03:24 +02:00
{{- $protocol := "tel" -}}
{{- $tel := . -}}
{{- $telWithProtocol := print $protocol ":" (replace $tel " " "") -}}
<a
class="tel obfuscate"
data-link="{{ range $index := seq (sub (len $telWithProtocol) 1) 0}}{{ substr $telWithProtocol $index 1}}{{ end }}"
>{{ range $index := seq (sub (len $tel) 1) 0}}{{ substr $tel $index 1}}{{ end }}</a>
2021-06-11 15:59:39 +02:00
{{- end -}}