Created
January 15, 2019 23:24
-
-
Save gregmercer/4bf559910627fbf2ba51c4c54e9dc274 to your computer and use it in GitHub Desktop.
D8 - Twig Templates Attach Library
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Twig Templates | |
Attach Library | |
... | |
lightning-8/modules/custom/basic/css | |
animate.css | |
... | |
lightning-8/modules/custom/basic/basic.libraries.yml | |
basic-hero-style: | |
css: | |
theme: | |
css/animate.css: {} | |
... | |
lightning-8/modules/custom/basic/templates/basic-hero-list.html.twig | |
{{ attach_library('basic/basic-hero-style') }} | |
<h4>{{ title }}</h4> | |
<ol> | |
{% for item in items %} | |
<li class="animated {{ random(['bounce', 'flash', 'rubberBand', 'shake', 'jello', 'tada', 'bounceIn', 'rollIn']) }}">{{ item.name }}</li> | |
{% endfor %} | |
</ol> | |
<strong>This is coming from our custom twig file.</strong> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment