Skip to content

Instantly share code, notes, and snippets.

@andrewfairlie
Last active April 22, 2016 19:07
Show Gist options
  • Save andrewfairlie/c6d927fca90d686337a495cd1091aab3 to your computer and use it in GitHub Desktop.
Save andrewfairlie/c6d927fca90d686337a495cd1091aab3 to your computer and use it in GitHub Desktop.
{# Define our macro #}
{% macro card(title,content) %}
<div class="card">
<h2>{{ title }}</h2>
{{ content }}
</div>
{% endmacro %}
{# Import the macro, here we use _self but usually it'll be a separate file #}
{% import _self as ui %}
{# Output the profile #}
{{ ui.card('Card Title','Hello World') }}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment