update the layout of the main page