frontend code for the homepage posts