Implement support for avatars

This commit is contained in:
Jonas Schäfer
2020-03-07 12:38:17 +01:00
parent 8785a99621
commit c902c59f8b
9 changed files with 304 additions and 27 deletions

View File

@@ -1,3 +1,10 @@
{% macro box(type, title, slim=False, caller=None) %}
<aside class="box{% if slim %} slim{% endif %} {{ type }}"><header>{{ title }}</header> {{ caller() }}</aside>
{% endmacro %}
{% macro avatar(from_, hash, caller=None) -%}
{%- if hash -%}
<div class="avatar" style="background-image: url('{{ url_for_avatar(from_, hash) }}');"></div>
{%- else -%}
{%- endif -%}
{%- endmacro %}