2
0
mirror of https://github.com/tenrok/bootstrap.git synced 2026-06-08 17:22:31 +03:00

Replace anchor.js with jekyll-anchor-headings.

This allows us to generate the anchor links on build time.

https://github.com/allejo/jekyll-anchor-headings
This commit is contained in:
XhmikosR
2018-11-13 16:10:43 +02:00
parent 8470c5f78c
commit b04f97f60b
7 changed files with 98 additions and 18 deletions
+1 -5
View File
@@ -10,7 +10,7 @@
* details, see https://creativecommons.org/licenses/by/3.0/.
*/
/* global ClipboardJS: false, anchors: false, Holder: false, bsCustomFileInput: false */
/* global ClipboardJS: false, Holder: false, bsCustomFileInput: false */
(function ($) {
'use strict'
@@ -101,10 +101,6 @@
.tooltip('_fixTitle')
})
anchors.options = {
icon: '#'
}
anchors.add('.bd-content > h2, .bd-content > h3, .bd-content > h4, .bd-content > h5')
$('.bd-content > h2, .bd-content > h3, .bd-content > h4, .bd-content > h5').wrapInner('<div></div>')
// Holder
File diff suppressed because one or more lines are too long
+9 -4
View File
@@ -1,10 +1,15 @@
.anchorjs-link {
.bd-anchor {
padding-left: .25rem;
font-weight: 400;
color: rgba($link-color, .5);
@include transition(color .16s linear);
color: $link-color;
opacity: 0;
@include transition(opacity .16s linear);
&:hover {
:hover > &,
&:hover,
&:focus {
color: $link-color;
text-decoration: none;
opacity: 1;
}
}