diff --git a/components/_patterns/01-atoms/04-images/icons/_icon.twig b/components/_patterns/01-atoms/04-images/icons/_icon.twig index 87a380fc..565a6154 100644 --- a/components/_patterns/01-atoms/04-images/icons/_icon.twig +++ b/components/_patterns/01-atoms/04-images/icons/_icon.twig @@ -10,7 +10,7 @@ {% set icon_base_class = icon_base_class|default('icon') %} {% set icon_url = '' %} -{# Drupal #} +{# If using Drupal, you will want to uncomment the section below and set the path to match your theme. #} {# {% if attributes or theme_hook_original %} {% set icon_url = '/themes/custom/YOURTHEME/dist/img/sprite/' %} {{ attach_library('emulsify/sprite') }} diff --git a/components/_patterns/01-atoms/04-images/icons/icons.md b/components/_patterns/01-atoms/04-images/icons/icons.md index 68d28414..2d233231 100644 --- a/components/_patterns/01-atoms/04-images/icons/icons.md +++ b/components/_patterns/01-atoms/04-images/icons/icons.md @@ -1,13 +1,14 @@ --- title: Icons --- + ### How to use icons We are using a gulp SVG sprite generator (details [here](https://una.im/svg-icons)), which automatically creates the SVG in `/images/icons/sprite/sprite.svg`. Simply run `gulp icons` to add to the sprite. **Usage** -The SVG component is found here: `/components/_patterns/01-atoms/04-images/icons/_icon.twig`. See available variables in that file. Examples of usage below: +The SVG component is found here: `/components/_patterns/01-atoms/04-images/icons/_icon.twig`. See available variables in that file as well as instructions for Drupal. Examples of usage below: Simple: (no BEM renaming) diff --git a/components/_twig-components/functions/pl_attach-library.function.php b/components/_twig-components/functions/pl_attach-library.function.php new file mode 100644 index 00000000..14fdce30 --- /dev/null +++ b/components/_twig-components/functions/pl_attach-library.function.php @@ -0,0 +1,9 @@ +