forked from gergely/calendar-social
31 lines
1009 B
HTML
31 lines
1009 B
HTML
{% macro field(field, inline=false) %}
|
|
<div class="{% if inline %}inline {% endif %}field">
|
|
{% if field.errors %}
|
|
{% for error in field.errors %}
|
|
{{ error }}
|
|
{% endfor %}
|
|
<br>
|
|
{% endif %}
|
|
{% if field.widget.input_type != 'checkbox' %}
|
|
{{ field.label }}
|
|
{% endif %}
|
|
{{ field }}
|
|
{% if field.widget.input_type == 'checkbox' %}
|
|
{{ field.label }}<br>
|
|
{% endif %}
|
|
{% if field.description %}
|
|
{{ field.description }}
|
|
{% endif %}
|
|
</div>
|
|
{% endmacro %}
|
|
|
|
{% macro profile_link(profile) %}
|
|
<a href="{% if profile %}{{ url_for('display_profile', username=profile.user.username) }}{% else %}#{% endif %}" class="ui profile">
|
|
{% if profile and profile.builtin_avatar %}
|
|
<img src="{{ url_for('static', filename='avatars/' + profile.builtin_avatar + '.svg') }}" alt="" class="ui circular avatar image">
|
|
{% endif %}
|
|
<div class="display name">{{ profile.display_name }}</div>
|
|
<div class="handle">{{ profile }}</div>
|
|
</a>
|
|
{% endmacro %}
|