Rich flairs

This commit is contained in:
robrobinbin 2021-01-12 23:34:16 +01:00
parent bbe7024323
commit a4d77926b6
5 changed files with 23 additions and 13 deletions

View file

@ -22,7 +22,9 @@
</div>
<details class="comment_right" open>
<summary class="comment_data"><a class="comment_author {% if item.author == post.author %}op{% endif %}" href="/u/{{ item.author }}">u/{{ item.author }}</a>
{% call utils::render_flair(item.flair) %}
{% if item.flair.flair_parts.len() > 0 %}
<small class="author_flair">{% call utils::render_flair(item.flair.flair_parts) %}</small>
{% endif %}
<span class="datetime">{{ item.time }}</span>
</summary>
<p class="comment_body">{{ item.body }}</p>
@ -48,13 +50,17 @@
<a class="post_subreddit" href="/r/{{ post.community }}">r/{{ post.community }}</a>
<span class="dot">&bull;</span>
<a class="post_author" href="/u/{{ post.author }}">u/{{ post.author }}</a>
{% call utils::render_flair(post.author_flair) %}
{% if post.author_flair.flair_parts.len() > 0 %}
<small class="author_flair">{% call utils::render_flair(post.author_flair.flair_parts) %}</small>
{% endif %}
<span class="dot">&bull;</span>
<span class="datetime">{{ post.time }}</span>
</p>
<a href="{{ post.permalink }}" class="post_title">
{{ post.title }}
{% call utils::render_flair(post.flair) %}
{% if post.flair.flair_parts.len() > 0 %}
<small class="post_flair" style="color:{{ post.flair.foreground_color }}; background:{{ post.flair.background_color }}">{% call utils::render_flair(post.flair.flair_parts) %}</small>
{% endif %}
</a>
<!-- POST MEDIA -->