mirror of
https://github.com/redlib-org/redlib.git
synced 2025-05-14 05:52:53 +00:00
Rich flairs
This commit is contained in:
parent
bbe7024323
commit
a4d77926b6
5 changed files with 23 additions and 13 deletions
|
@ -28,15 +28,11 @@
|
|||
{%- endmacro %}
|
||||
|
||||
{% macro render_flair(flair) -%}
|
||||
{% if flair.flair_parts.len() > 0 %}
|
||||
<small class="post_flair" style="color:{{ flair.foreground_color }}; background:{{ flair.background_color }}">
|
||||
{% for flair_part in flair.flair_parts %}
|
||||
{% for flair_part in flair %}
|
||||
{% if flair_part.flair_part_type == "emoji" %}
|
||||
<span class="emoji" style="background-image:url('{{ flair_part.value }}')"></span>
|
||||
{% else if flair_part.flair_part_type == "text" %}
|
||||
<span>{{ flair_part.value }}</span>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</small>
|
||||
{% endif %}
|
||||
{%- endmacro %}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue