Add an element and pagination to posts

Added pagination to posts index method and created a return element for
navigation to index page.