From d68e76478d5d2d0d22436b8b2560d5d956bf8285 Mon Sep 17 00:00:00 2001 From: Eryn Wells Date: Sat, 7 Jan 2023 09:43:15 -0800 Subject: [PATCH] Add the ability for post headers to be links when you add a link parameter to the page front matter --- assets/styles/root.css | 8 ++++++++ layouts/partials/content_header.html | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/assets/styles/root.css b/assets/styles/root.css index d1f23d9..3aaae16 100644 --- a/assets/styles/root.css +++ b/assets/styles/root.css @@ -470,6 +470,14 @@ header > span.series::before { padding-bottom: 0; } +.post-title h1 > .link-arrow { + margin-inline-start: 0.5rem; + text-decoration: none; +} +.post-title h1 > .link-arrow:hover { + text-decoration: none; +} + .post-title > .post-date { color: var(--light-dim); display: inline-block; diff --git a/layouts/partials/content_header.html b/layouts/partials/content_header.html index c7032b6..6d743d4 100644 --- a/layouts/partials/content_header.html +++ b/layouts/partials/content_header.html @@ -1,7 +1,7 @@
{{ partial "development/draft_tag.html" . }}
-

{{ .Title }}

+

{{ .Title }}{{ with .Params.link }}{{ end }}

{{ if not (eq .Section "about") }} {{ end }}