finish the main page layout