apply layout of main page