2020-11-23 00:29:05 +00:00
|
|
|
{% extends "base.html" %}
|
2020-12-31 23:54:13 +00:00
|
|
|
{% import "utils.html" as utils %}
|
|
|
|
|
2020-11-23 00:29:05 +00:00
|
|
|
{% block title %}{{ post.title }} - r/{{ post.community }}{% endblock %}
|
2020-12-31 23:54:13 +00:00
|
|
|
|
|
|
|
{% block search %}
|
|
|
|
{% call utils::search(["/r/", post.community.as_str()].concat(), "") %}
|
|
|
|
{% endblock %}
|
|
|
|
|
|
|
|
{% block root %}/r/{{ post.community }}{% endblock %}{% block location %}r/{{ post.community }}{% endblock %}
|
2020-11-23 00:29:05 +00:00
|
|
|
{% block head %}
|
|
|
|
{% call super() %}
|
2021-02-16 19:16:32 +00:00
|
|
|
<!-- Meta Tags -->
|
2021-01-16 23:02:24 +00:00
|
|
|
<meta name="author" content="u/{{ post.author.name }}">
|
2021-02-16 19:16:32 +00:00
|
|
|
<meta name="title" content="{{ post.title }} - r/{{ post.community }}">
|
|
|
|
<meta property="og:title" content="{{ post.title }} - r/{{ post.community }}">
|
|
|
|
<meta property="og:description" content="View on Libreddit, an alternative private front-end to Reddit.">
|
2022-11-09 16:16:51 +00:00
|
|
|
<meta property="og:url" content="{{ post.permalink }}">
|
2021-02-16 19:16:32 +00:00
|
|
|
<meta property="twitter:url" content="{{ post.permalink }}">
|
|
|
|
<meta property="twitter:title" content="{{ post.title }} - r/{{ post.community }}">
|
|
|
|
<meta property="twitter:description" content="View on Libreddit, an alternative private front-end to Reddit.">
|
2022-11-09 16:16:51 +00:00
|
|
|
{% if post.post_type == "image" %}
|
|
|
|
<meta property="og:type" content="image">
|
|
|
|
<meta property="og:image" content="{{ post.thumbnail.url }}">
|
|
|
|
<meta property="twitter:card" content="summary_large_image">
|
2021-02-16 19:16:32 +00:00
|
|
|
<meta property="twitter:image" content="{{ post.thumbnail.url }}">
|
2022-11-09 16:16:51 +00:00
|
|
|
{% else if post.post_type == "video" || post.post_type == "gif" %}
|
|
|
|
<meta property="twitter:card" content="video">
|
|
|
|
<meta property="og:type" content="video">
|
|
|
|
<meta property="og:video" content="{{ post.media.url }}">
|
|
|
|
<meta property="og:video:type" content="video/mp4">
|
|
|
|
{% else %}
|
|
|
|
<meta property="og:type" content="website">
|
|
|
|
{% endif %}
|
2020-11-23 00:29:05 +00:00
|
|
|
{% endblock %}
|
2020-12-20 03:54:46 +00:00
|
|
|
|
2021-01-30 08:47:30 +00:00
|
|
|
{% block subscriptions %}
|
2021-01-30 22:52:18 +00:00
|
|
|
{% call utils::sub_list(post.community.as_str()) %}
|
2021-01-30 05:00:55 +00:00
|
|
|
{% endblock %}
|
|
|
|
|
2020-11-23 00:29:05 +00:00
|
|
|
{% block content %}
|
2020-12-24 06:16:04 +00:00
|
|
|
<div id="column_one">
|
2022-11-09 16:16:51 +00:00
|
|
|
{% call utils::post(post) %}
|
2021-01-04 03:44:44 +00:00
|
|
|
|
|
|
|
<!-- SORT FORM -->
|
2023-03-25 00:41:26 +00:00
|
|
|
<div id="commentQueryForms">
|
2020-12-31 23:54:13 +00:00
|
|
|
<form id="sort">
|
2023-01-16 20:05:53 +00:00
|
|
|
<p id="comment_count">{{post.comments.0}} {% if post.comments.0 == "1" %}comment{% else %}comments{% endif %} <span id="sorted_by">sorted by </span></p>
|
2023-03-25 00:41:26 +00:00
|
|
|
<select name="sort" title="Sort comments by" id="commentSortSelect">
|
2021-01-07 16:38:05 +00:00
|
|
|
{% call utils::options(sort, ["confidence", "top", "new", "controversial", "old"], "confidence") %}
|
2023-03-25 00:41:26 +00:00
|
|
|
</select>
|
|
|
|
<button id="sort_submit" class="submit">
|
|
|
|
<svg width="15" viewBox="0 0 110 100" fill="none" stroke-width="10" stroke-linecap="round">
|
|
|
|
<path d="M20 50 H100" />
|
|
|
|
<path d="M75 15 L100 50 L75 85" />
|
|
|
|
→
|
|
|
|
</svg>
|
|
|
|
</button>
|
|
|
|
</form>
|
|
|
|
<!-- SEARCH FORM -->
|
|
|
|
<form id="sort">
|
|
|
|
<input id="search" type="search" name="q" value="{{ comment_query }}" placeholder="Search comments">
|
|
|
|
<input type="hidden" name="type" value="comment">
|
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div>
|
|
|
|
{% if comment_query != "" %}
|
|
|
|
Comments containing "{{ comment_query }}" | <a id="allCommentsLink" href="{{ url_without_query }}">All comments</a>
|
|
|
|
{% endif %}
|
|
|
|
</div>
|
2020-12-20 03:54:46 +00:00
|
|
|
|
2021-01-04 03:44:44 +00:00
|
|
|
<!-- COMMENTS -->
|
2020-12-24 06:16:04 +00:00
|
|
|
{% for c in comments -%}
|
2021-01-04 03:44:44 +00:00
|
|
|
<div class="thread">
|
2021-02-12 17:16:59 +00:00
|
|
|
{% if single_thread %}
|
2022-11-04 04:08:36 +00:00
|
|
|
<p class="thread_nav"><a href="{{ post.permalink }}">View all comments</a></p>
|
2021-02-12 17:16:59 +00:00
|
|
|
{% if c.parent_kind == "t1" %}
|
|
|
|
<p class="thread_nav"><a href="?context=9999">Show parent comments</a></p>
|
|
|
|
{% endif %}
|
|
|
|
{% endif %}
|
|
|
|
|
2022-05-21 05:28:31 +00:00
|
|
|
{{ c.render().unwrap()|safe }}
|
2021-01-04 03:44:44 +00:00
|
|
|
</div>
|
2020-12-24 06:16:04 +00:00
|
|
|
{%- endfor %}
|
2021-01-04 03:44:44 +00:00
|
|
|
|
2020-12-24 06:16:04 +00:00
|
|
|
</div>
|
2021-01-12 21:43:03 +00:00
|
|
|
{% endblock %}
|