From 9057f651fb508edf0e0488df590ed119d08a28b5b8860c7eedd1190eb6e5f571 Mon Sep 17 00:00:00 2001
From: Nicholas Johnson
Date: Fri, 8 Nov 2024 00:00:00 +0000
Subject: Change CSS styling for external links
---
layouts/404.html | 2 +-
layouts/_default/_markup/render-link.html | 3 ++-
layouts/_default/single.html | 2 +-
layouts/index.html | 2 +-
layouts/partials/metadata.html | 2 +-
layouts/partials/pageinfo.html | 2 +-
layouts/taxonomy/taxonomy.html | 6 +++---
layouts/term/term.html | 4 ++--
8 files changed, 12 insertions(+), 11 deletions(-)
(limited to 'layouts')
diff --git a/layouts/404.html b/layouts/404.html
index 6100aa9..dfb2c5f 100644
--- a/layouts/404.html
+++ b/layouts/404.html
@@ -1,6 +1,6 @@
{{ define "main" -}}
{{ i18n "pageNotFound" }}
diff --git a/layouts/_default/_markup/render-link.html b/layouts/_default/_markup/render-link.html
index 6cadaec..8fb3c26 100644
--- a/layouts/_default/_markup/render-link.html
+++ b/layouts/_default/_markup/render-link.html
@@ -1,2 +1,3 @@
{{ $emoji := cond (and (not (.Page.Params.makerefs | default true)) (.Page.Params.showlinkemoji | default true)) (emojify ":link: ") "" -}}
-{{ $emoji }}{{ .Text }}
\ No newline at end of file
+{{ $isExternalLink := (urls.Parse .Destination).IsAbs -}}
+{{ $emoji }}{{ .Text }}
\ No newline at end of file
diff --git a/layouts/_default/single.html b/layouts/_default/single.html
index 1bc79e4..1a8aa10 100644
--- a/layouts/_default/single.html
+++ b/layouts/_default/single.html
@@ -1,6 +1,6 @@
{{ define "main" -}}
{{- if (.Page.Params.pageinfo | default true) }}
{{ partial "pageinfo.html" . }}
diff --git a/layouts/index.html b/layouts/index.html
index 398a770..c5ba561 100644
--- a/layouts/index.html
+++ b/layouts/index.html
@@ -7,7 +7,7 @@
diff --git a/layouts/partials/metadata.html b/layouts/partials/metadata.html
index 47106e8..4158ee5 100644
--- a/layouts/partials/metadata.html
+++ b/layouts/partials/metadata.html
@@ -1,6 +1,6 @@
\ No newline at end of file
diff --git a/layouts/partials/pageinfo.html b/layouts/partials/pageinfo.html
index 4c0e855..c002530 100644
--- a/layouts/partials/pageinfo.html
+++ b/layouts/partials/pageinfo.html
@@ -1,2 +1,2 @@
{{ $dateFormat := .Site.Params.dateFormat | default ":date_long" -}}
-{{ emojify ":calendar:" }} | {{ emojify ":stopwatch:" }} {{ if (.Param (lower (i18n "tags"))) }} | {{ emojify ":label:" }} {{ end }}{{ range $key, $val := (.Param (lower (i18n "tags"))) }}{{ if $key }}, {{ end }}{{ $val }}{{ end }}
+{{ emojify ":calendar:" }} | {{ emojify ":stopwatch:" }} {{ if (.Param (lower (i18n "tags"))) }} | {{ emojify ":label:" }} {{ end }}{{ range $key, $val := (.Param (lower (i18n "tags"))) }}{{ if $key }}, {{ end }}{{ $val }}{{ end }}
diff --git a/layouts/taxonomy/taxonomy.html b/layouts/taxonomy/taxonomy.html
index 77475de..7dd447d 100644
--- a/layouts/taxonomy/taxonomy.html
+++ b/layouts/taxonomy/taxonomy.html
@@ -1,15 +1,15 @@
{{ define "main" -}}
{{ .Type | humanize }}
{{ i18n "feeds" }}
- {{ emojify ":link:" }} {{ i18n "atomFeed" }}
+ {{ emojify ":link:" }} {{ i18n "atomFeed" }}
{{ i18n "list" }}
diff --git a/layouts/term/term.html b/layouts/term/term.html
index 5519ba2..33d5347 100644
--- a/layouts/term/term.html
+++ b/layouts/term/term.html
@@ -1,11 +1,11 @@
{{ define "main" -}}
{{ .Type | singularize | humanize }} "{{ .Title }}"
{{ i18n "feeds" }}
- {{ emojify ":link:" }} {{ i18n "atomFeed" }}
+ {{ emojify ":link:" }} {{ i18n "atomFeed" }}
{{ i18n "journalEntries" }}
{{- range .Data.Pages.ByPublishDate.Reverse }}
{{ partial "metadata.html" . -}}
--
cgit v1.2.3