Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/spech66/bootstrap-bp-hugo-theme.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Pech <windows@spech.de>2020-04-18 09:47:59 +0300
committerSebastian Pech <windows@spech.de>2020-04-18 09:47:59 +0300
commite770a7a31e27fc680c7317c03ae72d6f9a882f17 (patch)
treebe2d642d75e0b0df7b1176e8ea9cfa7c5003d4a0
parent2668f9b18e41e2649d6ec5f8d334c92673be9ad8 (diff)
render-link extended
-rw-r--r--layouts/_default/_markup/render-link.html9
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" }}&nbsp;<i class="fab fa-amazon"></i>{{ end }}{{ if strings.HasPrefix .Destination "https://github" }}&nbsp;<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" }}&nbsp;<i class="fab fa-amazon"></i>
+{{ else if strings.HasPrefix .Destination "https://github" }}&nbsp;<i class="fab fa-github"></i>
+{{ else if strings.HasPrefix .Destination "https://" }}&nbsp;<i class="fas fa-external-link-alt"></i>
+{{ else if strings.HasPrefix .Destination "http://" }}&nbsp;<i class="fas fa-external-link-alt"></i>
+{{ end }}
+</a> \ No newline at end of file