Simplify and standardize some of the logic and comments for the post-details.html and page-details.html.