summaryrefslogtreecommitdiff
path: root/themes/CodeIT/layouts/partials/plugin/link.html
diff options
context:
space:
mode:
Diffstat (limited to 'themes/CodeIT/layouts/partials/plugin/link.html')
-rw-r--r--themes/CodeIT/layouts/partials/plugin/link.html9
1 files changed, 9 insertions, 0 deletions
diff --git a/themes/CodeIT/layouts/partials/plugin/link.html b/themes/CodeIT/layouts/partials/plugin/link.html
new file mode 100644
index 0000000..8e07a6c
--- /dev/null
+++ b/themes/CodeIT/layouts/partials/plugin/link.html
@@ -0,0 +1,9 @@
+{{- $rel := "" -}}
+<a href="{{ .Destination | safeURL }}"{{ with .Title }} title="{{ . }}"{{ end }}{{ if (urls.Parse .Destination).Host | or .Newtab }}{{ $rel = "noopener noreferrer" }} target="_blank"{{ end }} rel="{{ $rel }}{{ with .Rel }} {{ . }}{{ end }}"{{ with .Class }} class="{{ . }}"{{ end }}>
+ {{- with .Icon -}}
+ {{- partial "plugin/icon.html" . -}}
+ {{- end -}}
+ {{- with .Content -}}
+ {{- . | safeHTML -}}
+ {{- end -}}
+</a> \ No newline at end of file