diff options
author | Sebastian Pech <windows@spech.de> | 2020-04-18 09:47:54 +0300 |
---|---|---|
committer | Sebastian Pech <windows@spech.de> | 2020-04-18 09:47:54 +0300 |
commit | 68b8b74e6b1a2f5f1a68f4d5a1bc73233c73ea38 (patch) | |
tree | 9e690e6eda2ced933c1902d78a0c0a3561184c5d | |
parent | 8ddab5e8e29f8bebe62c88cec7757561f83de6e5 (diff) |
render-link extended
-rw-r--r-- | layouts/_default/_markup/render-link.html | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/layouts/_default/_markup/render-link.html b/layouts/_default/_markup/render-link.html index d1eef46..494a87c 100644 --- a/layouts/_default/_markup/render-link.html +++ b/layouts/_default/_markup/render-link.html @@ -1 +1,8 @@ -<a href="{{ .Destination | safeURL }}"{{ with .Title}} title="{{ . }}"{{ end }}{{ if strings.HasPrefix .Destination "http" }} target="_blank" rel="noopener noreferrer"{{ end }}>{{ .Text | safeHTML }}{{ if strings.HasPrefix .Destination "https://amzn.to" }} <i class="fab fa-amazon"></i>{{ end }}{{ if strings.HasPrefix .Destination "https://github" }} <i class="fab fa-github"></i>{{ end }}</a>
\ No newline at end of file +<a href="{{ .Destination | safeURL }}"{{ with .Title}} title="{{ . }}"{{ end }}{{ if strings.HasPrefix .Destination "http" }} target="_blank" rel="noopener noreferrer"{{ end }}> +{{ .Text | safeHTML }} +{{ if strings.HasPrefix .Destination "https://amzn.to" }} <i class="fab fa-amazon"></i> +{{ else if strings.HasPrefix .Destination "https://github" }} <i class="fab fa-github"></i> +{{ else if strings.HasPrefix .Destination "https://" }} <i class="fas fa-external-link-alt"></i> +{{ else if strings.HasPrefix .Destination "http://" }} <i class="fas fa-external-link-alt"></i> +{{ end }} +</a>
\ No newline at end of file |