simplify render link
parent
94c7d4cb55
commit
839c9df28d
|
@ -1,6 +1,4 @@
|
||||||
{{- if hasPrefix .Destination "https://t.me/" -}}
|
{{- if hasPrefix .Destination "mailto:" -}}
|
||||||
<a href="{{ .Destination }}">@{{ slicestr .Destination 13 }}</a>
|
|
||||||
{{- else if hasPrefix .Destination "mailto:" -}}
|
|
||||||
{{- $text := replace (replace .Text "-" "--") "_" "__" -}}
|
{{- $text := replace (replace .Text "-" "--") "_" "__" -}}
|
||||||
<a data-email="{{ .Destination | base64Encode }}">
|
<a data-email="{{ .Destination | base64Encode }}">
|
||||||
<img class="shields-icon" src="https://img.shields.io/badge/email-{{ $text }}-blue.svg?style=flat-square" />
|
<img class="shields-icon" src="https://img.shields.io/badge/email-{{ $text }}-blue.svg?style=flat-square" />
|
||||||
|
|
Loading…
Reference in New Issue