Adding the concept of a demo file to snippets.

This allows us to have demo files with more code and styling than
the snippet, to make it look good without showing extraneous
details to the user.
master
Sérgio Gomes 2015-06-25 16:57:01 +01:00
parent 5950902c15
commit 93b91710b4
1 changed files with 4 additions and 0 deletions

View File

@ -3,7 +3,11 @@
<div class="snippet-demos">
<div class="snippet-demo"></div>
{% for snippet in snippet_group %}
{% if snippet.demo_file %}
{% set snippet_file = "../../src/" + component_name + "/snippets/" + snippet.demo_file %}
{% else %}
{% set snippet_file = "../../src/" + component_name + "/snippets/" + snippet.file %}
{% endif %}
<div class="snippet-demo">
<div class="snippet-demo-container">
{% include snippet_file ignore missing %}