-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.py
More file actions
16 lines (16 loc) · 705 Bytes
/
main.py
File metadata and controls
16 lines (16 loc) · 705 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
def define_env(env):
@env.macro
def checkbox(name):
lines = [
f'<div id="{name}" class="mdc-checkbox">',
f'<label>',
f'<input type="checkbox" name="{name}" class="mdc-checkbox__native-control" />',
f'<div class="mdc-checkbox__background">',
f'<svg class="mdc-checkbox__checkmark" viewBox="0 0 24 24"><path class="mdc-checkbox__checkmark-path" fill="none" d="M1.73,12.91 8.1,19.28 22.79,4.59"></svg>',
f'<div class="mdc-checkbox__mixedmark"></div>',
f'</div>',
f'<div class="mdc-checkbox__ripple"></div>',
f'</label>',
f'</div>',
]
return ''.join(lines)