Extract duplicated diff rendering logic into shared/diff-page.js Implement theme switcher component across all templates