Skip to content

Instantly share code, notes, and snippets.

@ericmuyser ericmuyser/template.html
Last active Apr 26, 2016

What would you like to do?
Dust.js component usage
<!-- Expose keys of the `accordion` object to the scope -->
<div class="accordion-wrapper">
<!-- Output a component called `accordion` and pass it `items` + `class` -->
{@c-accordion items=items class="padding-top-small"}
<!-- Override the `footer` block -->
<!-- Iterate the `links` array and expose keys of each object -->
<!-- Output a component called `link` and pass it a `class` -->
{@c-link class="padding-all-bottom"}
<!-- Use exposed variables `href`, `src` and `alt` -->
<a href="{href}">
<img src="{src}" alt="{alt}" />
<!-- Check if this scope has a `banners` key -->
<div class="padding-bottom-small margin-top-small">
<!-- Iterate the `banners` array and expose each object's keys to the scope -->
<!-- Output a component called `banner` passing it the keys exposed to the scope -->
{@c-banner text=text image=image class="margin-bottom-md" /}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.