888e7b302d
* Initial work on filtering subreddits and users * Fix doubly-prefixed subreddit name in search alt text (e.g. r/r/pics) * Don't set post title to "Comment" if empty - this could throw off actual posts with the title "Comment" * Filter search results * Fix filtering to differentiate between "this subject itself is filtered" vs "all posts on this current page have been filtered" * Remove unnecessary check * Clean up * Cargo format * Collapse comments from filtered users Co-authored-by: spikecodes <19519553+spikecodes@users.noreply.github.com>
37 lines
1.7 KiB
HTML
37 lines
1.7 KiB
HTML
{% import "utils.html" as utils %}
|
|
|
|
{% if kind == "more" && parent_kind == "t1" %}
|
|
<a class="deeper_replies" href="{{ post_link }}{{ parent_id }}">→ More replies</a>
|
|
{% else if kind == "t1" %}
|
|
<div id="{{ id }}" class="comment">
|
|
<div class="comment_left">
|
|
<p class="comment_score" title="{{ score.1 }}">{{ score.0 }}</p>
|
|
<div class="line"></div>
|
|
</div>
|
|
<details class="comment_right" {% if !collapsed || highlighted %}open{% endif %}>
|
|
<summary class="comment_data">
|
|
<a class="comment_author {{ author.distinguished }} {% if author.name == post_author %}op{% endif %}" href="/user/{{ author.name }}">u/{{ author.name }}</a>
|
|
{% if author.flair.flair_parts.len() > 0 %}
|
|
<small class="author_flair">{% call utils::render_flair(author.flair.flair_parts) %}</small>
|
|
{% endif %}
|
|
<a href="{{ post_link }}{{ id }}/?context=3" class="created" title="{{ created }}">{{ rel_time }}</a>
|
|
{% if edited.0 != "".to_string() %}<span class="edited" title="{{ edited.1 }}">edited {{ edited.0 }}</span>{% endif %}
|
|
{% if !awards.is_empty() %}
|
|
<span class="dot">•</span>
|
|
{% for award in awards.clone() %}
|
|
<span class="award" title="{{ award.name }}">
|
|
<img alt="{{ award.name }}" src="{{ award.icon_url }}" width="16" height="16"/>
|
|
</span>
|
|
{% endfor %}
|
|
{% endif %}
|
|
</summary>
|
|
{% if is_filtered %}
|
|
<div class="comment_body_filtered {% if highlighted %}highlighted{% endif %}">(Filtered content)</div>
|
|
{% else %}
|
|
<div class="comment_body {% if highlighted %}highlighted{% endif %}">{{ body }}</div>
|
|
{% endif %}
|
|
<blockquote class="replies">{% for c in replies -%}{{ c.render().unwrap() }}{%- endfor %}
|
|
</blockquote>
|
|
</details>
|
|
</div>
|
|
{% endif %}
|