From 5e7f6dfb6e21731f25a1f67a155f3a47e0474479 Mon Sep 17 00:00:00 2001 From: Peter Etelej Date: Sun, 25 Feb 2018 00:46:45 +0300 Subject: [PATCH] website: add header anchor links on hover Adds header link icons on hover. Check for headers (h1-h4) with defined id's and adds link icon with relevant fragment link. Fixes #1028 Change-Id: Ic9c8744efe12dda251f4a461adb0b09cf84604c3 --- website/content/index.html | 8 ++++---- website/static/all.css | 23 +++++++++++++++++++++++ website/tmpl/page.html | 19 +++++++++++++++++++ 3 files changed, 46 insertions(+), 4 deletions(-) diff --git a/website/content/index.html b/website/content/index.html index ff8054d1f..7dd0a2c66 100644 --- a/website/content/index.html +++ b/website/content/index.html @@ -17,16 +17,16 @@
  • Your data should be alive in 80 years, especially if you are
  • -

    Latest Tweets

    +

    Latest Tweets

    -

    Latest Release

    +

    Latest Release

    The latest release is 2017-05-05.

    Follow the download and getting started instructions to set up Perkeep.

    -

    Video Demo

    +

    Video Demo

    LinuxFest Northwest 2016 Camlistore presentation:

    @@ -34,7 +34,7 @@

    Or see the other presentations.

    -

    Contribute

    +

    Contribute

    In addition to user feedback, bug reports, and code contributions, we also accept donations via either our Bitcoin donation page or via OpenCollective:

    diff --git a/website/static/all.css b/website/static/all.css index 63bd5173c..5024bdaa5 100644 --- a/website/static/all.css +++ b/website/static/all.css @@ -283,3 +283,26 @@ a.downloadBox:hover .filename { } a { font-weight: bold; } + +/* Header anchor links styling */ +.anchor { + padding:4px; +} +.anchor svg { + visibility: hidden; + vertical-align:middle; +} +h1 svg, +h2 svg, +h3 svg, +h4 svg { + fill: #375EAB; +} +h2 svg { + fill: #fff; +} +h1:hover .anchor svg, h2:hover .anchor svg, +h3:hover .anchor svg, h4:hover .anchor svg, +h5:hover .anchor svg, h6:hover .anchor svg { + visibility: visible; +} diff --git a/website/tmpl/page.html b/website/tmpl/page.html index 668c1f524..05b47c7e1 100644 --- a/website/tmpl/page.html +++ b/website/tmpl/page.html @@ -55,4 +55,23 @@ Website layout inspired by memcached.
    Content by the authors. + {{end}}