Added the ability for the sidebar to retract if the page width is too small.