Filter by flair. Closes #124

This commit is contained in:
spikecodes 2021-02-20 13:59:16 -08:00
parent e1f7b6d0c0
commit 9cfab348eb
No known key found for this signature in database
GPG key ID: 004CECFF9B463BCB
7 changed files with 26 additions and 15 deletions

View file

@ -48,7 +48,9 @@
<p class="post_title">
<a href="{{ post.permalink }}">{{ post.title }}</a>
{% 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>
<a href="/r/{{ post.community }}/search/?q=flair_name%3A%22{{ post.flair.text }}%22&restrict_sr=on" class="post_flair" style="color:{{ post.flair.foreground_color }}; background:{{ post.flair.background_color }};">
{% call utils::render_flair(post.flair.flair_parts) %}
</small>
{% endif %}
{% if post.flags.nsfw %} <small class="nsfw">NSFW</small>{% endif %}
</p>