accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ctubb...@apache.org
Subject [1/3] accumulo git commit: Add header links for sections
Date Sun, 20 Mar 2016 15:55:59 GMT
Repository: accumulo
Updated Branches:
  refs/heads/asf-site c2d2da656 -> 30417ffb3
  refs/heads/gh-pages bfbecf658 -> 0f94242e0


Add header links for sections


Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo
Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/0f94242e
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/0f94242e
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/0f94242e

Branch: refs/heads/gh-pages
Commit: 0f94242e0e03b9cd1aacc0d191cc67208747856f
Parents: bfbecf6
Author: Christopher Tubbs <ctubbsii@apache.org>
Authored: Sun Mar 20 11:54:49 2016 -0400
Committer: Christopher Tubbs <ctubbsii@apache.org>
Committed: Sun Mar 20 11:54:49 2016 -0400

----------------------------------------------------------------------
 _layouts/skeleton.html | 11 +++++++++++
 css/accumulo.css       | 19 +++++++++++++++++++
 2 files changed, 30 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/0f94242e/_layouts/skeleton.html
----------------------------------------------------------------------
diff --git a/_layouts/skeleton.html b/_layouts/skeleton.html
index 3514f44..9addad5 100644
--- a/_layouts/skeleton.html
+++ b/_layouts/skeleton.html
@@ -116,6 +116,17 @@ if (ga.hasOwnProperty('loaded') && ga.loaded === true) {
 {% if page.nav %}
 $("#{{page.nav}}").addClass("active");
 {% endif %}
+$(function() {
+  return $("h2, h3, h4, h5, h6").each(function(i, el) {
+    var $el, icon, id;
+    $el = $(el);
+    id = $el.attr('id');
+    icon = '<i class="fa fa-link"></i>';
+    if (id) {
+      return $el.prepend($("<a />").addClass("header-link").attr("href", "#" + id).html(icon));
+    }
+  });
+});
 </script>
 </body>
 </html>

http://git-wip-us.apache.org/repos/asf/accumulo/blob/0f94242e/css/accumulo.css
----------------------------------------------------------------------
diff --git a/css/accumulo.css b/css/accumulo.css
index b13f86e..3f9a92c 100644
--- a/css/accumulo.css
+++ b/css/accumulo.css
@@ -98,3 +98,22 @@ code {
     /* override nowrap in bootstrap */
     white-space: normal;
 }
+
+.header-link {
+  position: absolute;
+  left: -0.5em;
+  opacity: 0;
+
+  \-webkit-transition: opacity 0.2s ease-in-out 0.1s;
+  \-moz-transition: opacity 0.2s ease-in-out 0.1s;
+  \-ms-transition: opacity 0.2s ease-in-out 0.1s;
+}
+
+h2:hover .header-link,
+h3:hover .header-link,
+h4:hover .header-link,
+h5:hover .header-link,
+h6:hover .header-link {
+  opacity: 1;
+}
+


Mime
View raw message