Factor out comment code from layouts into partials