10 lines
259 B
JavaScript
10 lines
259 B
JavaScript
|
// Make scroll behavior of internal links smooth
|
||
|
exports.onClientEntry = () => {
|
||
|
const SmoothScroll = require('smooth-scroll');
|
||
|
new SmoothScroll('a[href*="#"]', {
|
||
|
offset() {
|
||
|
return document.querySelector('#header').offsetHeight;
|
||
|
},
|
||
|
});
|
||
|
};
|