From dcea459226ecdec469858bf6de479c1b592ca4da Mon Sep 17 00:00:00 2001 From: Miek Gieben Date: Wed, 1 Jul 2020 09:24:34 +0200 Subject: [PATCH] linkify each section of the readme (#197) Signed-off-by: Miek Gieben --- Makefile | 3 +-- themes/coredns/static/css/kube.css | 21 ++++++++++++++++++++- themes/coredns/static/js/master.js | 7 +++++++ 3 files changed, 28 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index e8a4e89..7c79a7b 100644 --- a/Makefile +++ b/Makefile @@ -26,5 +26,4 @@ sync: # Scan all markdown files for Corefile snippets and check validity github.com/miekg/corecheck .PHONY: test test: - corecheck -exe $(PWD)/.coredns/coredns -dir content/blog - corecheck -exe $(PWD)/.coredns/coredns -dir content/manual + hugo server diff --git a/themes/coredns/static/css/kube.css b/themes/coredns/static/css/kube.css index bd28d73..533bf07 100644 --- a/themes/coredns/static/css/kube.css +++ b/themes/coredns/static/css/kube.css @@ -195,7 +195,26 @@ h3 a, .h3 a, h4 a, .h4 a, h5 a, .h5 a, h6 a, .h6 a { - color: inherit; } + color: inherit; + text-decoration: none; } + +h1 a:hover, .h1 a:hover, +h2 a:hover, .h2 a:hover, +h3 a:hover, .h3 a:hover, +h4 a:hover, .h4 a:hover, +h5 a:hover, .h5 a:hover, +h6 a:hover, .h6 a:hover { + color: inherit; + text-decoration: underline; } + +h1 a:active, .h1 a:active, +h2 a:active, .h2 a:active, +h3 a:active, .h3 a:active, +h4 a:active, .h4 a:active, +h5 a:active, .h5 a:active, +h6 a:active, .h6 a:active { + color: inherit; + text-decoration: underline; } p + h2, p + h3, diff --git a/themes/coredns/static/js/master.js b/themes/coredns/static/js/master.js index e69de29..963cb86 100644 --- a/themes/coredns/static/js/master.js +++ b/themes/coredns/static/js/master.js @@ -0,0 +1,7 @@ +$(document).ready(function() { + $(':header[id]').each(function() { + var anchor = document.createElement('a') + anchor.href = '#' + this.id + $(this).wrapInner(anchor) + }); +});