feat: Add obfuscates partials
This commit is contained in:
@ -1,3 +1,9 @@
|
||||
{{- with .Site.Data.contact.telephone -}}
|
||||
<a class="tel" href="tel:{{ . }}">{{ . }}</a>
|
||||
{{- $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>
|
||||
{{- end -}}
|
||||
|
Reference in New Issue
Block a user