Last active
April 22, 2016 19:17
-
-
Save andrewfairlie/c6756a7baea972312ea028faaa83cab8 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
{# Define our macro #} | |
{% macro card(title,content,img,url) %} | |
{% if url %}<a href="{{ url }}">{% endif %} | |
<div class="card"> | |
{% if img %}<img src="{{ img }}">{% endif %} | |
<h2>{{ title }}</h2> | |
{{ content }} | |
</div> | |
{% if url %}</a>{% endif %} | |
{% 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','image.jpg','index.html') }} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment