refactord post display template