Skip to content

Instantly share code, notes, and snippets.

@neilkinnish
Last active August 29, 2015 14:05
Show Gist options
  • Save neilkinnish/cf568873e9628c9078eb to your computer and use it in GitHub Desktop.
Save neilkinnish/cf568873e9628c9078eb to your computer and use it in GitHub Desktop.
Example modules in Mixture, passing data to a reusable module....
{
"meta": {
"title": "About Us",
"subtitle": "Why we're different",
"description": "<p>Lorem ipsum nibh convallis malesuada nam pulvinar velit pulvinar dolor ante.</p><p>Sed sollicitudin id. Ornare ut laoreet morbi eros nibh tincidunt vitae metus. Consequat placerat lacinia eu at arcu. Mollis metus consectetuer blandit quisque commodo donec velit tincidunt vivamus nunc bibendum. Eu adipiscing tempor praesent aliquam. Sagittis pellentesque pretium nostra pellentesque sollicitudin.</p>",
"logo": {
"name": "Text for logo",
"image": "logo.jpg"
}
}
}
<!-- This file inherits a layout file not described in this gist -->
{% block content %}
{% include "example" with model.meta %}
{% endblock %}
<!-- within the includes folder -->
<div class="example">
{% include "logo" with example.logo %}
<h1 class="example__title">{{ example.title }}</h1>
{% if example.subtitle %}
<h2 class="example__subtitle">{{ example.subtitle }}</h2>
{% endif %}
{{ example.description }}
{% if example.date %}
<h2 class="example__date">{{ example.date }}</h2>
{% endif %}
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment