How do I reveal the Navbar when scroll direction is up?

I have used the scroll-offset value to hide the navbar when scrolling but I think this should be swapped for scroll direction, then I could set it to reveal when scrolling up and hide when scrolling down. The problem is, I don’t know what I’m supposed to put in the code to get this working.

Community Page
Last updated: