main.js: Added resize functionality for the navbar when scrolled down