refact posts app
refact header and footer view logic