From bc9bbd8d482385ae7bb165a1f0e3aaba1059a6b0 Mon Sep 17 00:00:00 2001 From: Yukiko Gannett Date: Tue, 6 Mar 2018 15:44:32 -0500 Subject: [PATCH] clean up svg.twig --- .../_patterns/01-atoms/05-icons/svg.twig | 26 ++----------------- 1 file changed, 2 insertions(+), 24 deletions(-) diff --git a/styleguide/source/_patterns/01-atoms/05-icons/svg.twig b/styleguide/source/_patterns/01-atoms/05-icons/svg.twig index a98006c202..bf0a448693 100644 --- a/styleguide/source/_patterns/01-atoms/05-icons/svg.twig +++ b/styleguide/source/_patterns/01-atoms/05-icons/svg.twig @@ -1,33 +1,11 @@ -{# -OPTIMIZED VERSION: -- This approach gets rid of the individual twig templates for icons. -- Use one twig template to generate any SVGs. -- Not necessary to use {% include TEMPLATE with id %} approach since property "icon" already exists to pass a specific icon template. This could be utilized to pass icon ID instead of a template as seen in the current sample. - -Requirement: -- svg file and id need to match for the simple version. --- in this case no -sprite. -- sprite can be setup with conditions. --- Is it worth it? - -Mayflower: /assets/ -Drupal: /themes/custom/mass_theme/ - -#} -{# -NOTE: If what this template does is calls the function, it would be better to call the function in parent templates and get rid of this template. - -{{ icon(icon) }} -As the final version, the function takes "icon" value, geneartes the whole icon -HTML, and prints it. -- A specific assets path for each Mayflower and Drupal is set in its unique -function. -#}