Add email protection
This commit is contained in:
@@ -43,6 +43,7 @@ Search page:
|
|||||||
- Blog
|
- Blog
|
||||||
- Bootstrap
|
- Bootstrap
|
||||||
- Customizable
|
- Customizable
|
||||||
|
- E-mail protection
|
||||||
- Facebook sharing
|
- Facebook sharing
|
||||||
- Header links
|
- Header links
|
||||||
- Landing page
|
- Landing page
|
||||||
|
@@ -2,8 +2,12 @@
|
|||||||
<section>
|
<section>
|
||||||
<div class="mb-3 text-center">
|
<div class="mb-3 text-center">
|
||||||
{{ range $k, $v := . }}
|
{{ range $k, $v := . }}
|
||||||
|
{{ if hasPrefix $v "mailto:" }}
|
||||||
|
<a href="#" data-a="{{ base64Encode (index (split $v `@`) 0) }}" data-b="{{ base64Encode `@` }}" data-c="{{ base64Encode (index (split $v `@`) 1) }}" onclick="this.href = atob(this.dataset.a) + atob(this.dataset.b) + atob(this.dataset.c)"><i class="bi bi-{{ $k }} display-6 mx-2"><span class="visually-hidden">{{ $k }}</span></i></a>
|
||||||
|
{{ else }}
|
||||||
<a href="{{ $v }}"><i class="bi bi-{{ $k }} display-6 mx-2"><span class="visually-hidden">{{ $k }}</span></i></a>
|
<a href="{{ $v }}"><i class="bi bi-{{ $k }} display-6 mx-2"><span class="visually-hidden">{{ $k }}</span></i></a>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
{{ end }}
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
Reference in New Issue
Block a user