Add AnchorJS logic for header links (#10155)

* Add AnchorJS JavaScript

* Remove existing inpage_heading logic

* Remove underline from anchor tags

* Use single icon and add touch visibility

* Use paragraph link icon for AnchorJS

* Update Sass to use code formatting in docsContent headers

* Update header size coverage to H3-H6
This commit is contained in:
Luc Perkins
2018-09-10 13:09:36 -07:00
committed by k8s-ci-robot
parent c038d8909c
commit 9ce0cd0906
12 changed files with 23 additions and 1978 deletions
-10
View File
@@ -55,13 +55,3 @@
opacity: 1;
}
/* In-page section heading permalinks */
a.inpage_heading {
color: #000;
text-decoration: none !important;
}
a.inpage_heading:hover {
text-decoration: underline !important;
opacity: .8;
}
+6
View File
File diff suppressed because one or more lines are too long
+11 -1
View File
@@ -1,4 +1,12 @@
//modal close button
function addAnchorTags() {
anchors.options = {
visible: 'touch'
}
anchors.add('#docsContent h2, #docsContent h3, #docsContent h4, #docsContent h5, #docsContent h6');
}
//modal close button
(function(){
//π.modalCloseButton = function(closingFunction){
// return π.button('pi-modal-close-button', null, null, closingFunction);
@@ -506,6 +514,8 @@ var pushmenu = (function(){
})();
$(function() {
addAnchorTags();
// Make global nav be active based on pathname
if ((location.pathname.split("/")[1]) !== ""){