2020-11-23 13:29:05 +13:00
|
|
|
{% extends "base.html" %}
|
|
|
|
{% block title %}{{ post.title }} - r/{{ post.community }}{% endblock %}
|
|
|
|
{% block head %}
|
|
|
|
{% call super() %}
|
|
|
|
<meta name="author" content="u/{{ post.author }}">
|
|
|
|
{% endblock %}
|
2020-12-20 16:54:46 +13:00
|
|
|
|
|
|
|
{% macro comment(item) -%}
|
|
|
|
|
2020-12-21 17:52:15 +13:00
|
|
|
<div id="{{ item.id }}" class="comment">
|
2020-12-20 16:54:46 +13:00
|
|
|
<div class="comment_left">
|
|
|
|
<h3 class="comment_score">{{ item.score }}</h3>
|
|
|
|
<div class="line"></div>
|
|
|
|
</div>
|
|
|
|
<details class="comment_right" open>
|
2020-12-22 05:38:24 +13:00
|
|
|
<summary class="comment_data"><a class="comment_author {% if item.author == post.author %}op{% endif %}" href="/u/{{ item.author }}">u/{{ item.author }}</a>
|
2020-12-21 08:29:23 +13:00
|
|
|
{% if item.flair.0 != "" %}
|
|
|
|
<small class="author_flair">{{ item.flair.0 }}</small>
|
|
|
|
{% endif %}
|
|
|
|
• <span class="datetime">{{ item.time }}</span>
|
2020-12-20 16:54:46 +13:00
|
|
|
</summary>
|
|
|
|
<h4 class="comment_body">{{ item.body }}</h4>
|
|
|
|
|
|
|
|
{%- endmacro %}
|
|
|
|
|
2020-11-23 13:29:05 +13:00
|
|
|
{% block content %}
|
|
|
|
<div class="post highlighted">
|
|
|
|
<div class="post_left">
|
|
|
|
<h3 class="post_score">{{ post.score }}</h3>
|
|
|
|
</div>
|
|
|
|
<div class="post_right">
|
2020-12-06 17:54:43 +13:00
|
|
|
<h4>
|
2020-11-23 13:29:05 +13:00
|
|
|
<b><a class="post_subreddit" href="/r/{{ post.community }}">r/{{ post.community }}</a></b>
|
|
|
|
•
|
|
|
|
<a class="post_author" href="/u/{{ post.author }}">u/{{ post.author }}</a>
|
2020-12-21 08:29:23 +13:00
|
|
|
{% if post.author_flair.0 != "" %}
|
|
|
|
<small class="author_flair">{{ post.author_flair.0 }}</small>
|
|
|
|
{% endif %}
|
2020-12-06 17:54:43 +13:00
|
|
|
<span class="datetime">{{ post.time }}</span>
|
|
|
|
</h4>
|
2020-12-08 08:20:24 +13:00
|
|
|
<a href="{{ post.url }}" class="post_title">
|
2020-11-23 13:29:05 +13:00
|
|
|
{{ post.title }}
|
|
|
|
{% if post.flair.0 != "" %}
|
2020-12-21 08:29:23 +13:00
|
|
|
<small class="post_flair" style="color:{{ post.flair.2 }}; background:{{ post.flair.1 }}">{{ post.flair.0 }}</small>
|
2020-11-23 13:29:05 +13:00
|
|
|
{% endif %}
|
2020-12-08 08:20:24 +13:00
|
|
|
</a>
|
2020-12-01 17:33:55 +13:00
|
|
|
{% if post.post_type == "image" %}
|
|
|
|
<img class="post_media" src="{{ post.media }}"/>
|
|
|
|
{% else if post.post_type == "video" %}
|
|
|
|
<video class="post_media" src="{{ post.media }}" controls autoplay loop>
|
|
|
|
{% else if post.post_type == "link" %}
|
2020-12-12 17:36:25 +13:00
|
|
|
<a id="post_url" href="{{ post.media }}">{{ post.media }}</a>
|
2020-12-01 17:33:55 +13:00
|
|
|
{% endif %}
|
2020-11-23 13:29:05 +13:00
|
|
|
<h4 class="post_body">{{ post.body }}</h4>
|
|
|
|
</div>
|
|
|
|
</div>
|
2020-12-21 18:49:31 +13:00
|
|
|
<form>
|
|
|
|
<select id="sort" name="sort">
|
|
|
|
<option value="confidence" {% if sort == "confidence" %}selected{% endif %}>Best</option>
|
|
|
|
<option value="top" {% if sort == "top" %}selected{% endif %}>Top</option>
|
|
|
|
<option value="new" {% if sort == "new" %}selected{% endif %}>New</option>
|
|
|
|
<option value="controversial" {% if sort == "controversial" %}selected{% endif %}>Controversial</option>
|
|
|
|
<option value="old" {% if sort == "old" %}selected{% endif %}>Old</option>
|
2020-12-22 14:17:40 +13:00
|
|
|
</select><input id="sort_submit" type="submit" value="→">
|
2020-12-21 18:49:31 +13:00
|
|
|
</form>
|
2020-12-20 16:54:46 +13:00
|
|
|
|
|
|
|
{% for c in comments -%}
|
|
|
|
<div class="thread">
|
|
|
|
{% call comment(c) %}
|
|
|
|
<div class="replies">
|
2020-12-21 17:52:15 +13:00
|
|
|
{% for reply1 in c.replies %}
|
|
|
|
{% call comment(reply1) %}
|
2020-12-20 16:54:46 +13:00
|
|
|
<div class="replies">
|
2020-12-21 17:52:15 +13:00
|
|
|
{% for reply2 in reply1.replies %}
|
|
|
|
{% call comment(reply2) %}
|
|
|
|
<div class="replies">
|
|
|
|
{% for reply3 in reply2.replies %}
|
2020-12-22 14:17:40 +13:00
|
|
|
{% call comment(reply3) %}
|
|
|
|
{% if reply3.replies.len() > 0 %}
|
|
|
|
<a class="deeper_replies" href="{{ post.url }}{{ reply3.id }}">→ More replies</a>
|
|
|
|
{% endif %}
|
|
|
|
</details></div>
|
2020-12-21 17:52:15 +13:00
|
|
|
{% endfor %}
|
|
|
|
</div></details></div>
|
2020-12-20 16:54:46 +13:00
|
|
|
{% endfor %}
|
|
|
|
</div></details></div>
|
|
|
|
{% endfor %}
|
|
|
|
</div></details></div>
|
2020-11-23 13:29:05 +13:00
|
|
|
</div>
|
2020-12-20 16:54:46 +13:00
|
|
|
{%- endfor %}
|
|
|
|
|
2020-11-23 13:29:05 +13:00
|
|
|
{% endblock %}
|