Updated demo to collapse the main when clicking on the main layout