simplify render link

pull/292/head
Septs 2022-02-03 22:17:35 +08:00
parent 94c7d4cb55
commit 839c9df28d
No known key found for this signature in database
GPG Key ID: 6EC3B9D7E6EE828F
1 changed files with 1 additions and 3 deletions

View File

@ -1,6 +1,4 @@
{{- if hasPrefix .Destination "https://t.me/" -}}
<a href="{{ .Destination }}">@{{ slicestr .Destination 13 }}</a>
{{- else if hasPrefix .Destination "mailto:" -}}
{{- if hasPrefix .Destination "mailto:" -}}
{{- $text := replace (replace .Text "-" "--") "_" "__" -}}
<a data-email="{{ .Destination | base64Encode }}">
<img class="shields-icon" src="https://img.shields.io/badge/email-{{ $text }}-blue.svg?style=flat-square" />