-
Notifications
You must be signed in to change notification settings - Fork 236
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
122 additions
and
1 deletion.
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 |
---|---|---|
@@ -0,0 +1,70 @@ | ||
{% extends "layout.html" %} | ||
|
||
{% block page_title %} | ||
Example - Macros | ||
{% endblock %} | ||
|
||
{% block content %} | ||
<main id="content" role="main"> | ||
|
||
{% include "includes/breadcrumb_examples.html" %} | ||
|
||
<div class="grid-row"> | ||
<div class="column-two-thirds"> | ||
|
||
<h1 class="heading-xlarge"> | ||
Macros | ||
</h1> | ||
|
||
<form action=""> | ||
|
||
<div class="form-group"> | ||
|
||
{{ macro.text('First name') }} | ||
|
||
</div> | ||
|
||
<div class="form-group"> | ||
|
||
{{ macro.text('Last name') }} | ||
|
||
</div> | ||
|
||
<div class="form-group"> | ||
|
||
<h2 class="heading-medium"> | ||
Role | ||
</h2> | ||
|
||
{{ macro.radio('Role', 'Teacher') }} | ||
|
||
{{ macro.radio('Role', 'Student') }} | ||
|
||
{{ macro.radio('Role', 'Administrator') }} | ||
|
||
</div> | ||
|
||
<div class="form-group"> | ||
|
||
<h2 class="heading-medium"> | ||
How do you get to school? | ||
</h2> | ||
|
||
<p>Select all that apply</p> | ||
|
||
{{ macro.checkbox('Bicycle') }} | ||
|
||
{{ macro.checkbox('Bus') }} | ||
|
||
{{ macro.checkbox('Car') }} | ||
|
||
{{ macro.checkbox('Train') }} | ||
|
||
</div> | ||
|
||
</form> | ||
|
||
</div> | ||
</div> | ||
</main> | ||
{% endblock %} |
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
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
File renamed without changes.
File renamed without changes.
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 |
---|---|---|
@@ -0,0 +1,26 @@ | ||
{% macro text(label, name=label) %} | ||
|
||
<label class="form-label" for="{{name | slug}}">{{label}}</label> | ||
<input class="form-control" id="{{name | slug}}" type="text"> | ||
|
||
{% endmacro %} | ||
|
||
|
||
{% macro radio(name, label) %} | ||
|
||
<label class="block-label" for="{{label | slug}}"> | ||
<input id="{{label | slug}}" type="radio" name="{{name}}" value="{{label | slug}}"> | ||
{{label}} | ||
</label> | ||
|
||
{% endmacro %} | ||
|
||
|
||
{% macro checkbox(label, name=label) %} | ||
|
||
<label class="block-label" for="{{name | slug}}"> | ||
<input id="{{name | slug}}" name="{{name | slug}}" type="checkbox" value="{{name | slug}}"> | ||
{{label}} | ||
</label> | ||
|
||
{% 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