# endif
# endmacro
# macro prefetch_link(url)
# if url
# endif
# endmacro
# macro signin_button(brand, class_btn, class_icon, url, is_icon=False)
# set caption = 'Sign in with %s' % brand
{{caption if not is_icon}}
# endmacro
# macro auth_icon(auth_id)
# if auth_id == 'email_auth'
# elif auth_id.startswith('azure_ad')
# elif auth_id.startswith('bitbucket')
# elif auth_id.startswith('dropbox')
# elif auth_id.startswith('facebook')
# elif auth_id.startswith('github')
# elif auth_id.startswith('google')
# elif auth_id.startswith('federated')
# elif auth_id.startswith('instagram')
# elif auth_id.startswith('linkedin')
# elif auth_id.startswith('mailru')
# elif auth_id.startswith('microsoft')
# elif auth_id.startswith('reddit')
# elif auth_id.startswith('twitter')
# elif auth_id.startswith('yahoo')
# else
# endif
# endmacro
# macro auth_icons(user_db, max=0)
# set count = user_db.auth_ids|length
# set max = 3 if max > 0 and max < 3 else max
# if user_db.password_hash
# set max = max - 1 if max else max
{{auth_icon('email_auth')}}
# endif
# set max = max - 1 if max and count > max else max
# set more = count - max if max else 0
# for auth_id in user_db.auth_ids
# if not max or loop.index0 < max
{{auth_icon(auth_id)}}
# elif max and loop.index0 == max
# endif
# endfor
# endmacro
# macro html_element(name, content)
<{{name}}
#- for arg in kwargs
{{arg}}="{{kwargs[arg]}}"
#- endfor
>
#- if content
{{content}}{{name}}>
#- endif
# endmacro
# macro include_md(file, class='')