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