From daf591e86195d9f28fa3b2979eab928ef256e30a Mon Sep 17 00:00:00 2001 From: a Date: Sun, 11 Dec 2022 10:38:21 -0600 Subject: [PATCH] switch unicode external link icon to svg --- assets/styles/features/links.scss | 13 +++++++++++++ layouts/_default/_markup/render-link.html | 12 +++++++++++- layouts/partials/styles/external-links.html | 7 ++----- 3 files changed, 26 insertions(+), 6 deletions(-) diff --git a/assets/styles/features/links.scss b/assets/styles/features/links.scss index b74dee5..5cc437e 100644 --- a/assets/styles/features/links.scss +++ b/assets/styles/features/links.scss @@ -26,4 +26,17 @@ a:hover { @media (prefers-reduced-motion) { a:link {transition: none} +} + +a:link[target=_blank] { + svg { + margin-inline-start: 0.35em; + margin-inline-end: 0.15em; + vertical-align: baseline; + font-size: 0.65em; + } +} + +a:link[title] { + text-decoration-style: dotted; } \ No newline at end of file diff --git a/layouts/_default/_markup/render-link.html b/layouts/_default/_markup/render-link.html index 9577022..ec352b7 100644 --- a/layouts/_default/_markup/render-link.html +++ b/layouts/_default/_markup/render-link.html @@ -7,4 +7,14 @@ {{- with $url.Fragment }}{{ $fragment = printf "#%s" . }}{{ end -}} {{- with .Page.GetPage $url.Path }}{{ $link = printf "%s%s" .RelPermalink $fragment }}{{ end }}{{ end -}} {{- end -}} -{{ .Text | safeHTML }} \ No newline at end of file + + +{{- .Text | safeHTML -}} +{{ if $isRemote -}} + +{{- end -}} + \ No newline at end of file diff --git a/layouts/partials/styles/external-links.html b/layouts/partials/styles/external-links.html index 0db6089..113d40f 100644 --- a/layouts/partials/styles/external-links.html +++ b/layouts/partials/styles/external-links.html @@ -1,14 +1,11 @@