Icons
These icons are used throughout the site.
Usage:
Import the icons macro.
Call the .get()
function passing it the icon name.
(Optional) The second argument is any classes you would like to apply to the svg element.
Example:
{% import '@goizueta_theme/icons/icons.twig' as icons %}
{{ icons.get('facebook', 'icon icon--facebook') }}
This will render the svg inline with whatever class or classes are passed as the second argument.
<svg aria-hidden="true" role="img" class="icon icon--facebook">...</svg>
- Markup Details
-
{% import "icons.twig" as icons %} <div class="kss-icons"> {% for item in items %} <div class="kss-icons__item"> {{ icons.get(item.icon, 'kss-icons__icon') }} <p class="kss-icons__name">{{ item.icon }}</p> </div> {% endfor %} </div>