{{/* Get address, protocol and other parameters */}} {{- $address := .address -}} {{- $protocol := .protocol | default "mailto" -}} {{- $class := .class -}} {{- $displaytext := .display -}} {{- $parts := split $address "@" -}} {{- $user := (index $parts 0) -}} {{- $domain := (index $parts 1) | default "" -}} {{- $query := .query | default "" -}} {{/* Compute md5 fingerprint */}} {{- $fingerprint := md5 (print $address $protocol (index (seq 999 | shuffle) 0)) | truncate 8 "" -}} {{/* Hide the placeholder span when display text is provided (e.g., icons) */}} {{- if $displaytext }} {{- else }} {{/* Set via CSS what is displayed when Javascript is disabled. Query is never displayed */}} {{- end }} {{/* Alter display with Javascript by changing DOM */}} {{/* The end */}}