Hide sections if the content is not present

To make this change slightly easier, I pulled more identical content out
of the type-specific partials. We can always push it back if it ever
does diverge.