From f905b1694049623bad5e426605c660696d273af8 Mon Sep 17 00:00:00 2001 From: Eryn Wells Date: Sat, 18 Nov 2023 11:13:16 -0800 Subject: [PATCH] Add a render template for headings Create heading anchors and style them with colors and stuff --- assets/styles/root/002_colors.css | 7 +++++++ layouts/_default/_markup/render-heading.html | 3 +++ 2 files changed, 10 insertions(+) create mode 100644 layouts/_default/_markup/render-heading.html diff --git a/assets/styles/root/002_colors.css b/assets/styles/root/002_colors.css index 87e4d7e..dbdccce 100644 --- a/assets/styles/root/002_colors.css +++ b/assets/styles/root/002_colors.css @@ -29,6 +29,7 @@ --header-border-color: var(--separator-color); --footer-border-color: var(--separator-color); + --header-anchor-link-color: rgb(var(--sub-lt-gray)); --header-box-shadow-color: var(--box-shadow-color); --header-series-arrow-foreground-color: rgb(var(--sub-dk-gray)); --heading-color: rgb(var(--black)); @@ -56,6 +57,7 @@ --box-shadow-color: rgba(var(--dk-gray), 0.8); --body-code-background-color: rgb(var(--dk-gray)); + --header-anchor-link-color: rgb(var(--super-dk-gray)); --header-series-arrow-foreground-color: rgb(var(--super-dk-gray)); --heading-color: rgb(var(--white)); @@ -171,6 +173,11 @@ color: var(--color); } + main > :is(h1, h2, h3, h4, h5, h6) > a[href], + main > :is(h1, h2, h3, h4, h5, h6) > a[href]:visited { + color: inherit; + } + nav.bulleted > li:first-child::before { color: var(--color); } diff --git a/layouts/_default/_markup/render-heading.html b/layouts/_default/_markup/render-heading.html new file mode 100644 index 0000000..44de726 --- /dev/null +++ b/layouts/_default/_markup/render-heading.html @@ -0,0 +1,3 @@ + + {{ .Text | safeHTML }} +