diff --git a/docs/_layouts/default.html b/docs/_layouts/default.html index 76be15b0..fe9b3050 100644 --- a/docs/_layouts/default.html +++ b/docs/_layouts/default.html @@ -79,7 +79,11 @@ diff --git a/docs/css/_anchor.scss b/docs/css/_anchor.scss index a6f99503..24db9ed3 100644 --- a/docs/css/_anchor.scss +++ b/docs/css/_anchor.scss @@ -8,19 +8,6 @@ font-weight: normal; font-style: normal; } -.icon-link { - font-family: 'anchorjs-link'; - speak: none; - font-style: normal; - font-weight: normal; - font-variant: normal; - text-transform: none; - line-height: 1; - - /* Better Icon Rendering */ - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; -} /** * Link placement and hover behavior. @@ -33,6 +20,16 @@ opacity: 0; color: inherit; text-align: center; + speak: none; + font-family: "anchorjs-link"; + font-style: normal; + font-weight: normal; + font-variant: normal; + line-height: 1; + + /* Better Icon Rendering */ + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; @media (max-width: 34em) { display: none; @@ -48,10 +45,3 @@ text-decoration: none; } } -.icon-link { - font-size: 60%; - vertical-align: .2em; -} -.icon-link:before { - content: "\e600"; -} diff --git a/docs/js/anchor.min.js b/docs/js/anchor.min.js index 8932aab1..68c3cb70 100644 --- a/docs/js/anchor.min.js +++ b/docs/js/anchor.min.js @@ -1 +1,6 @@ -/*! AnchorJS - v0.1.0 - 2014-08-17 | https://github.com/bryanbraun/anchorjs | Copyright (c) 2014 Bryan Braun; Licensed MIT */function addAnchors(e){e=e||"h1, h2, h3, h4, h5, h6";var t=document.querySelectorAll(e);for(var n=0;n';t[n].innerHTML=t[n].innerHTML+o}} +/*! + * AnchorJS - v1.1.1 - 2015-05-23 + * https://github.com/bryanbraun/anchorjs + * Copyright (c) 2015 Bryan Braun; Licensed MIT + */ +function AnchorJS(A){"use strict";this.options=A||{},this._applyRemainingDefaultOptions=function(A){this.options.icon=this.options.hasOwnProperty("icon")?A.icon:"",this.options.visible=this.options.hasOwnProperty("visible")?A.visible:"hover",this.options.placement=this.options.hasOwnProperty("placement")?A.placement:"right",this.options.class=this.options.hasOwnProperty("class")?A.class:""},this._applyRemainingDefaultOptions(A),this.add=function(A){var e,t,o,n,i,s,a,l,c,r,h,g,B,Q;if(this._applyRemainingDefaultOptions(this.options),A){if("string"!=typeof A)throw new Error("The selector provided to AnchorJS was invalid.")}else A="h1, h2, h3, h4, h5, h6";if(e=document.querySelectorAll(A),0===e.length)return!1;for(this._addBaselineStyles(),t=document.querySelectorAll("[id]"),o=[].map.call(t,function(A){return A.id}),i=0;i',B=document.createElement("div"),B.innerHTML=g,Q=B.childNodes,"always"===this.options.visible&&(Q[0].style.opacity="1"),""===this.options.icon&&(Q[0].style.fontFamily="anchorjs-icons",Q[0].style.fontStyle="normal",Q[0].style.fontVariant="normal",Q[0].style.fontWeight="normal"),"left"===this.options.placement?(Q[0].style.position="absolute",Q[0].style.marginLeft="-1em",Q[0].style.paddingRight="0.5em",e[i].insertBefore(Q[0],e[i].firstChild)):(Q[0].style.paddingLeft="0.375em",e[i].appendChild(Q[0]))}return this},this.remove=function(A){for(var e,t=document.querySelectorAll(A),o=0;o