finish mainpage layout