mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-17 21:01:26 +02:00
Merge commit 'a024bc7d76fcc5e49e8210f9b0896db9ef21861a'
This commit is contained in:
10
docs/assets/js/alpinejs/data/navbar.js
Normal file
10
docs/assets/js/alpinejs/data/navbar.js
Normal file
@@ -0,0 +1,10 @@
|
||||
export const navbar = (Alpine) => ({
|
||||
init: function () {
|
||||
Alpine.bind(this.$root, this.root);
|
||||
},
|
||||
root: {
|
||||
['@scroll.window.debounce.10ms'](event) {
|
||||
this.$store.nav.scroll.atTop = window.scrollY < 40 ? true : false;
|
||||
},
|
||||
},
|
||||
});
|
Reference in New Issue
Block a user