Change email text to content inner value
parent
87c0e4f8e3
commit
437d8721c8
@ -1,12 +1,12 @@
|
||||
{{ $address := .Get "address" }}
|
||||
{{ $text := .Get "text" }}
|
||||
{{ $content := .Inner | markdownify }}
|
||||
|
||||
{{ if not $address }}
|
||||
{{ errorf "layouts/shortcodes/paige/email.html: no address" }}
|
||||
{{ end }}
|
||||
|
||||
{{ if not $text }}
|
||||
{{ errorf "layouts/shortcodes/paige/email.html: no text" }}
|
||||
{{ if not $content }}
|
||||
{{ errorf "layouts/shortcodes/paige/email.html: no content" }}
|
||||
{{ end }}
|
||||
|
||||
<a href="#" data-a="{{ base64Encode (index (split $address `@`) 0) }}" data-b="{{ base64Encode `@` }}" data-c="{{ base64Encode (index (split $address `@`) 1) }}" onclick="this.href = 'mailto:' + atob(this.dataset.a) + atob(this.dataset.b) + atob(this.dataset.c)">{{ $text }}</a>
|
||||
<a href="#" data-a="{{ base64Encode (index (split $address `@`) 0) }}" data-b="{{ base64Encode `@` }}" data-c="{{ base64Encode (index (split $address `@`) 1) }}" onclick="this.href = 'mailto:' + atob(this.dataset.a) + atob(this.dataset.b) + atob(this.dataset.c)">{{ $content }}</a>
|
||||
|
Loading…
Reference in New Issue