build base head and footer