The code in block--lb-hero--variation-*.html.twig contains highly duplicated code. In order to maintain a DRY codebase and reduce our codebase “weight”, we should de-duplicate code wherever possible.
A possible model for this could be:
- block--lb-hero.html.twig contains the base code for all variants with block statements and switching logic.
- set statements should all be made before any div to maintain separation of concerns.
- block--lb-hero--variation-*.html.twighave set statements to assign variables, then use extends to reference the base template.
Acceptance Criteria
- code diff should have lots of deletions
- front-end should have no changes from prior behavior
Issue fork lb_hero-3403739
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #8
froboy