You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi! I started to migrate a custom theme I wrote (mainly for my homepage) to VuePress 2. One thing I like to do is to tweak the Navbar a bit. I'm looking for a way to add functionality (in my case adjust the size of the navbar image depending on scroll position) and change the template while keeping the original functionality (mainly the resize handling). I'm not yet really experienced with Vue 3's composition API. So I like to know if there is a way to inherit all of Navbar's functionality, and add own stuff and a new template.
From what I read, it might be an idea to move the Navbar resize-related code to a composable?
I currently use vuepress version ^2.0.0-beta.36
An example of the VuePress 1 version of the theme can be found here - the adjusted Navbar is visible for small widths only: when scrolled down the image is shrinked into the navbar.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Hi! I started to migrate a custom theme I wrote (mainly for my homepage) to VuePress 2. One thing I like to do is to tweak the Navbar a bit. I'm looking for a way to add functionality (in my case adjust the size of the navbar image depending on scroll position) and change the template while keeping the original functionality (mainly the resize handling). I'm not yet really experienced with Vue 3's composition API. So I like to know if there is a way to inherit all of Navbar's functionality, and add own stuff and a new template.
From what I read, it might be an idea to move the Navbar resize-related code to a composable?
I currently use vuepress version ^2.0.0-beta.36
An example of the VuePress 1 version of the theme can be found here - the adjusted Navbar is visible for small widths only: when scrolled down the image is shrinked into the navbar.
Beta Was this translation helpful? Give feedback.
All reactions