This repository has been archived by the owner on Apr 11, 2018. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update macros example. Closes gh-318
- Loading branch information
1 parent
735e918
commit 34d5a6d
Showing
3 changed files
with
5 additions
and
9 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
{% macro input type name label %} | ||
{% macro input(type, name, label) %} | ||
<label for="{{ name }}">{{ label }}</label> | ||
<input type="{{ type }}" name="{{ name }}" id="{{ name }}"> | ||
{% endmacro %} | ||
|
||
{% macro button type label %} | ||
<button type="{{ type|default("submit") }}">{{ label|default("Submit") }}</button> | ||
{% endmacro %} | ||
{% endmacro %} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,4 +5,4 @@ | |
<li>{{ form.input("text", "age", "Your Age") }}</li> | ||
</ul> | ||
|
||
{{ form.button() }} | ||
{{ form.button() }} |
This file contains 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