Created the controller for posts and edited index & post detail html files