static-cms/website/gatsby-browser.js
Daniel Lautzenheiser 27659baca6
Feature/website (#5)
* Add basic website
* Add website deploy action
2022-09-30 10:59:03 -04:00

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;
},
});
};