.github
.storybook
__mocks__
cypress
dev-test
functions
img
packages
scripts
website
content
data
src
static
.babelrc
.gitignore
.markdownlint.json
.nvmrc
README.md
gatsby-browser.js
gatsby-config.js
gatsby-node.js
netlify.toml
package.json
site.yml
yarn.lock
.all-contributorsrc
.editorconfig
.eslintrc.js
.gitattributes
.gitignore
.nvmrc
.prettierignore
.prettierrc
.stylelintrc
.vale.ini
CHANGELOG.md
CODE_OF_CONDUCT.md
CONTRIBUTING.md
LICENSE
README.md
babel.config.js
cms.png
commitlint.config.js
cypress.json
jest.config.js
lerna.json
netlify.toml
package.json
renovate.json
setupTestFramework.js
tsconfig.json
yarn.lock
* website: initial conversion to gatsby v2 * fix unexpected history use warning * use commonjs only to fix gatsby error * fix gatsby import error with sidecar * remove unused postcss-colour-functions * remove unused prop * lowercase layout filename import to match actual file * chore(lint): format code
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;
|
|
},
|
|
});
|
|
};
|