Refactor post component for index and show pages into a partial"