diff options
Diffstat (limited to '')
-rw-r--r-- | _plugins/add-anchor-to-header-from-header-id.rb | 2 | ||||
-rw-r--r-- | styles.css | 20 |
2 files changed, 11 insertions, 11 deletions
diff --git a/_plugins/add-anchor-to-header-from-header-id.rb b/_plugins/add-anchor-to-header-from-header-id.rb index 33e3ad7..b90d22c 100644 --- a/_plugins/add-anchor-to-header-from-header-id.rb +++ b/_plugins/add-anchor-to-header-from-header-id.rb @@ -3,7 +3,7 @@ Jekyll::Hooks.register [:documents, :pages], :post_render do |doc| doc.output = doc.output.gsub( /<h([1-6])(.*?)id="([\w-]+)"(.*?)>(.*?)<\/h[1-6]>/, - '<span class="header-anchor"><h\1\2id="\3"\4>\5</h\1><a href="#\3"><img class="simple-icon" src="/images/link.svg" aria-hidden="true" /></a></span>' + '<div class="header-anchor"><h\1\2id="\3"\4>\5</h\1><a href="#\3"><img class="simple-icon" src="/images/link.svg" aria-hidden="true" /></a></div>' ) end end @@ -123,28 +123,28 @@ a.code-line-anchor:hover { /* Header anchor */ -span.header-anchor { +div.header-anchor { color: black; text-decoration: none; - display: block; + display: inline; margin-bottom: 15px; } -span.header-anchor h1, -span.header-anchor h2, -span.header-anchor h3, -span.header-anchor h4, -span.header-anchor h5, -span.header-anchor h6 { +div.header-anchor h1, +div.header-anchor h2, +div.header-anchor h3, +div.header-anchor h4, +div.header-anchor h5, +div.header-anchor h6 { display: inline; } -span.header-anchor img { +div.header-anchor img { visibility: hidden; } -span.header-anchor:hover img { +div.header-anchor:hover img { visibility: visible; } |