You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tac.apache.org by gm...@apache.org on 2023/03/25 13:08:25 UTC

[tac-website] 29/30: Add headerlink as per main site

This is an automated email from the ASF dual-hosted git repository.

gmcdonald pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tac-website.git

commit 5a8aea42f64b034dbe6a2aa431741beb5acb731c
Author: Sebb <se...@apache.org>
AuthorDate: Sat Mar 25 12:41:19 2023 +0000

    Add headerlink as per main site
---
 layouts/_default/_markup/render-heading.html | 5 +++++
 static/css/main.css                          | 7 +++++++
 2 files changed, 12 insertions(+)

diff --git a/layouts/_default/_markup/render-heading.html b/layouts/_default/_markup/render-heading.html
new file mode 100644
index 0000000..6e02d60
--- /dev/null
+++ b/layouts/_default/_markup/render-heading.html
@@ -0,0 +1,5 @@
+<h{{ .Level }} id="{{ .Anchor | safeURL }}">{{ .Text | safeHTML }}
+{{- if and (ge .Level 1) (le .Level 4) }}{{" " -}}
+<a class="headerlink" title="Permalink" href="#{{ .Anchor | safeURL }}">&para;</a>
+{{- end -}}
+</h{{ .Level }}>
diff --git a/static/css/main.css b/static/css/main.css
index 519b025..b7ccc4a 100644
--- a/static/css/main.css
+++ b/static/css/main.css
@@ -20,3 +20,10 @@ footer.page-footer .footer-copyright {
   background-color: rgba(0,0,0,0.2);
 }
 
+.headerlink {
+  visibility: hidden;
+}
+
+dt:hover > .headerlink, p:hover > .headerlink, td:hover > .headerlink, h1:hover > .headerlink, h2:hover > .headerlink, h3:hover > .headerlink, h4:hover > .headerlink, h5:hover > .headerlink, h6:hover > .headerlink {
+  visibility: visible
+}


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@tac.apache.org
For additional commands, e-mail: commits-help@tac.apache.org