From cf4fd27e3da24a1258339c3aa186efcac711b044 Mon Sep 17 00:00:00 2001 From: Aditya Telange <21258296+adityatelange@users.noreply.github.com> Date: Tue, 10 Nov 2020 12:15:56 +0530 Subject: [PATCH] anchored-headings: port to PaperMod - add corresponding css - gen anchored headings for h1-h6 - link with single.html --- assets/css/post-single.css | 12 ++++++++++++ layouts/_default/single.html | 4 +++- layouts/partials/anchored_headings.html | 2 +- 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/assets/css/post-single.css b/assets/css/post-single.css index d46cb83..f93e8d1 100644 --- a/assets/css/post-single.css +++ b/assets/css/post-single.css @@ -315,6 +315,18 @@ transform: scale(0.96); } +h1:hover .anchor, +h2:hover .anchor, +h3:hover .anchor, +h4:hover .anchor, +h5:hover .anchor, +h6:hover .anchor { + display: inline-flex; + color: var(--secondary); + margin-inline-start: 8px; + font-weight: 500; +} + @media screen and (max-width: 600px) { .post-content blockquote { margin: 0 calc(var(--gap) * -1); diff --git a/layouts/_default/single.html b/layouts/_default/single.html index d4476ed..e46d05f 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -41,7 +41,9 @@ {{- end }} -
{{ .Content }}
+
+ {{- partial "anchored_headings.html" .Content -}} +