Refactored document thumbnail handling to be flatter
Disable the share tab if SOCIAL_BUTTONS is False