Add toggle functionality to the sidebar