2021-10-15 14:08:27 +00:00
{% extends "default.html" %}
{% set ups=p.upvotes %}
{% set downs=p.downvotes %}
{% set score=ups-downs %}
{% if v %}
2021-12-11 00:47:52 +00:00
{% set voted=p.voted if p.voted else 0 %}
2021-10-15 14:08:27 +00:00
{% else %}
2021-12-11 00:47:52 +00:00
{% set voted=-2 %}
2021-10-15 14:08:27 +00:00
{% endif %}
{% block title %}
2021-12-11 00:53:01 +00:00
{% if v and (v.id == p.author_id or v.admin_level == 6 and v.id in [1,28,995,2513]) %}
< script defer >
togglePostEdit=function(id){
body=document.getElementById("post-body");
title=document.getElementById("post-title");
form=document.getElementById("edit-post-body-"+id);
box=document.getElementById("post-edit-box-"+id);
body.classList.toggle("hidden");
title.classList.toggle("hidden");
form.classList.toggle("hidden");
autoExpand(box);
};
< / script >
{% endif %}
{% if 'rama' not in request.host %}
< script defer >
function poll_vote(cid) {
{% if v %}
var type = document.getElementById(cid).checked;
var scoretext = document.getElementById('poll-' + cid);
var score = Number(scoretext.textContent);
if (type == true) scoretext.textContent = score + 1;
else scoretext.textContent = score - 1;
post('/vote/poll/' + cid + '?vote=' + type);
{% else %}
var myToast = new bootstrap.Toast(document.getElementById('toast-post-error'));
myToast.show();
document.getElementById('toast-post-error-text').innerText = "Only logged-in users can vote!";
{% endif %}
}
< / script >
{% if v %}
< script defer src = "/assets/js/comments_v.js?v=70" > < / script >
{% endif %}
{% endif %}
{% if p.award_count("shit") %}
< script defer src = "/assets/js/bugs.js?v=54" > < / script >
{% set minbugs = 10*p.award_count("shit") if p.award_count("shit") < 3 else 20 % }
{% set maxbugs = 20*p.award_count("shit") if p.award_count("shit") < 3 else 40 % }
< script >
new BugController({
imageSprite: "/assets/images/fly-sprite.gif",
canDie: false,
minBugs: {{minbugs}},
maxBugs: {{maxbugs}},
mouseOver: "multiply"
});
< / script >
{% endif %}
{% if p.award_count("fireflies") %}
< script defer src = "/assets/js/fireflies.js?v=54" > < / script >
{% set minbugs = 10*p.award_count("fireflies") if p.award_count("fireflies") < 3 else 20 % }
{% set maxbugs = 20*p.award_count("fireflies") if p.award_count("fireflies") < 3 else 40 % }
< script >
new BugController({
imageSprite: "/assets/images/fireflies.gif",
canDie: false,
minBugs: {{minbugs}},
maxBugs: {{maxbugs}},
mouseOver: "multiply"
});
< / script >
{% endif %}
2021-10-26 21:11:14 +00:00
< meta charset = "utf-8" >
< meta property = "og:type" content = "article" >
2021-10-15 14:08:27 +00:00
{% if comment_info and not comment_info.is_banned and not linked_comment.deleted_utc > 0 %}
< title > {{'@'+comment_info.author.username}} comments on "{{p.plaintitle(v)}} - {{'SITE_NAME' | app_config}}"< / title >
2021-10-26 21:11:14 +00:00
< meta property = "og:article:author" content = "{{'@'+comment_info.author.username}}" >
< meta property = "article:published_time" content = "{{comment_info.created_datetime}}" >
{% if comment_info.edited_utc %}< meta property = "article:modified_time" content = "{{comment_info.edited_string}}" > {% endif %}
< meta property = "og:description" name = "description" content = "{{comment_info.plainbody(v)}}" >
< meta property = "og:author" name = "author" content = "{{'@'+comment_info.author.username}}" >
< meta property = "og:title" content = "{{'@'+comment_info.author.username}} comments on {{p.plaintitle(v)}} - {{'SITE_NAME' | app_config}}" >
< meta property = "og:image" content = "{% if p.is_image %}{{p.realurl(v)}}{% elif p.has_thumb%}{{p.thumb_url}}{% else %}{{'SITE_NAME' | app_config}}/assets/images/{{'SITE_NAME' | app_config}}/preview.gif{% endif %}" >
2021-12-11 00:47:52 +00:00
{% if p.url and p.url.lower().endswith('.mp4') %}
< meta property = "og:video" content = "{{ p.realurl(v) }}" >
2021-10-15 14:08:27 +00:00
{% endif %}
2021-10-26 21:11:14 +00:00
< meta property = "og:url" content = "{{comment_info.permalink | full_link}}" >
< meta property = "og:site_name" content = "{{request.host}}" >
2021-10-15 14:08:27 +00:00
2021-10-26 21:11:14 +00:00
< meta name = "twitter:card" content = "summary" >
2021-10-15 14:08:27 +00:00
< meta name = "twitter:site" content = "{{request.host_url}}" >
2021-10-26 21:11:14 +00:00
< meta name = "twitter:title" content = "{{'@'+comment_info.author.username}} comments on {{p.plaintitle(v)}} - {{'SITE_NAME' | app_config}}" >
2021-10-15 14:08:27 +00:00
< meta name = "twitter:creator" content = "{{'@'+comment_info.author.username}}" >
2021-10-26 21:11:14 +00:00
< meta name = "twitter:description" content = "{{comment_info.plainbody(v)}}" >
< meta name = "twitter:image" content = "{% if p.is_image %}{{p.realurl(v)}}{% elif p.has_thumb%}{{p.thumb_url}}{% else %}{{'SITE_NAME' | app_config}}/assets/images/{{'SITE_NAME' | app_config}}/preview.gif{% endif %}" >
< meta name = "twitter:url" content = "{{p.permalink | full_link}}" >
2021-10-15 14:08:27 +00:00
{% if linked_comment.author.is_private %}
< meta name = "robots" content = "noindex" >
{% endif %}
{% else %}
< title > {{p.plaintitle(v)}} - {{'SITE_NAME' | app_config}}< / title >
2021-10-26 21:11:14 +00:00
{% if p.author %}< meta property = "og:article:author" content = "{{'@'+p.author.username}}" > {% endif %}
< meta property = "article:published_time" content = "{{p.created_datetime}}" >
{% if p.edited_utc %}< meta property = "article:modified_time" content = "{{p.edited_string}}" > {% endif %}
< meta property = "og:description" name = "description" content = "{{p.plainbody(v)}}" >
{% if p.author %}< meta property = "og:author" name = "author" content = "{{'@'+p.author.username}}" > {% endif %}
< meta property = "og:title" content = "{{p.plaintitle(v)}} - {{'SITE_NAME' | app_config}}" >
< meta property = "og:image" content = "{% if p.is_image %}{{p.realurl(v)}}{% elif p.has_thumb%}{{p.thumb_url}}{% else %}{{'SITE_NAME' | app_config}}/assets/images/{{'SITE_NAME' | app_config}}/preview.gif{% endif %}" >
2021-12-11 00:47:52 +00:00
{% if p.url and p.url.lower().endswith('.mp4') %}
2021-10-26 21:11:14 +00:00
< meta property = "og:video" content = "{{ p.realurl(v) }}" >
2021-10-15 14:08:27 +00:00
{% endif %}
2021-10-26 21:11:14 +00:00
< meta property = "og:url" content = "{{p.permalink | full_link}}" >
< meta property = "og:site_name" content = "{{request.host}}" >
2021-10-15 14:08:27 +00:00
2021-10-26 21:11:14 +00:00
< meta name = "twitter:card" content = "summary_large_image" >
2021-10-15 14:08:27 +00:00
< meta name = "twitter:site" content = "{{request.host_url}}" >
2021-10-26 21:11:14 +00:00
< meta name = "twitter:title" content = "{{p.plaintitle(v)}} - {{'SITE_NAME' | app_config}}" >
2021-10-22 23:50:00 +00:00
{% if p.author %}< meta name = "twitter:creator" content = "{{'@'+p.author.username}}" > {% endif %}
2021-10-26 21:11:14 +00:00
< meta name = "twitter:description" content = "{{p.plainbody(v)}}" >
< meta name = "twitter:image" content = "{% if p.is_image %}{{p.realurl(v)}}{% elif p.has_thumb %}{{p.thumb_url}}{% else %}{{'SITE_NAME' | app_config}}/assets/images/{{'SITE_NAME' | app_config}}/preview.gif{% endif %}" >
< meta name = "twitter:url" content = "{{p.permalink | full_link}}" >
2021-10-15 14:08:27 +00:00
{% if p.author.is_private %}
< meta name = "robots" content = "noindex" >
{% endif %}
{% endif %}
{% endblock %}
{% block pagetype %}thread{% endblock %}
2021-12-11 00:52:40 +00:00
{% block actionsModal %}
< div style = "display:none" id = "popover-{{p.id}}" >
< div class = "popover-user-profile" role = "tooltip" >
< img class = "w-100 h-64 object-cover" src = "{{p.author.banner_url}}" >
< div class = "d-flex align-items-end px-3 mt-n6 mb-3" >
< img class = "avatar-72 rounded img-thumbnail shadow-sm" src = "{{p.author.profile_url}}" >
< div class = "px-3 text-truncate" >
< h5 class = "text-truncate text-black" > {{p.author.username}}< / h5 >
< / div >
< / div >
< div class = "px-3" >
< span class = "popover-bio text-black" > {% if p.author.bio_html %}{{p.author.bio_html_eager | safe}}{% endif %}< / span >
< / div >
< div class = "border-top d-flex align-items-center p-3 gap-3 smol" >
< span >
< strong class = "text-black" > {{p.author.post_count}}< / strong >
< span class = "text-black" > posts< / span >
< / span >
< span class = "ml-3" >
< strong class = "text-black" > {{p.author.comment_count}}< / strong >
< span class = "text-black" > comments< / span >
< / span >
< span class = "ml-3" >
< strong class = "text-black" > {{p.author.coins}}< / strong >
< span class = "text-black" > coins< / span >
< / span >
< a { % if v % } href = "{{p.author.url}}" { % else % } href = "/logged_out{{p.author.url}}" { % endif % } target = "_blank" class = "ml-auto text-decoration-none" >
View
< i class = "fas fa-arrow-right fa-sm px-1" > < / i >
< / a >
< / div >
< / div >
< / div >
{% endblock %}
2021-12-11 00:47:52 +00:00
{% block subHeader %}
< div class = "relative max-w-screen-2xl mx-auto px-4 py-4 grid grid-cols-12 rounded-t" >
< div class = "absolute top-0 left-0 w-full h-full bg-gradient-to-t from-gray-300 to-gray-200 rounded-t sub-header-shadow" > < / div >
< div class = "relative col-span-full flex items-center" >
< div >
< h1 class = "font-bold text-xl font-heading leading-normal mb-0" >
Thread
< / h1 >
< ul class = "flex space-x-2 text-xs text-gray-500 leading-normal mb-0" >
< li >
< a href = "/" class = "text-gray-500 hover:underline" > Home< / a >
< / li >
< li >
< i class = "fas fa-arrow-alt-right text-shadow fa-fw fa-sm" > < / i >
< / li >
< li >
< a href = "{{p.permalink}}" class = "text-gray-700 hover:underline" > {{p.author.username}}'s post< / a >
< li >
2021-12-06 19:30:56 +00:00
< / ul >
2021-10-15 14:08:27 +00:00
< / div >
2021-12-06 19:30:56 +00:00
< / div >
< / div >
{% endblock %}
2021-10-15 14:08:27 +00:00
2021-12-06 19:30:56 +00:00
{% block content %}
2021-10-15 14:08:27 +00:00
2021-12-11 00:47:52 +00:00
< div class = "col-span-full xl:col-span-9" >
{% if (p.is_banned and p.ban_reason) or (p.bannedfor and p.author.banned_by) %}
<!-- Non - dismissable Alerts -->
< div class = "p-2.5 md:p-0" >
<!-- Removal Reason -->
{% if p.is_banned and p.ban_reason %}
< div class = "mt-4 mb-0 rounded-lg shadow-lg p-3 text-white bg-red-600 border border-red-900 shadow-inset-t-white-10" >
< i class = "fas fa-gavel fa-fw mr-1" > < / i >
< span class = "font-medium" >
Removed by @{{p.ban_reason}}
< / span >
< / div >
{% endif %}
<!-- Banned -->
{% if p.bannedfor and p.author.banned_by %}
< div class = "mt-4 mb-0 rounded-lg shadow-lg p-3 text-white bg-red-600 border border-red-900 shadow-inset-t-white-10" >
< i class = "fas fa-gavel fa-fw mr-1" > < / i >
< span class = "font-medium" >
Author was banned for this post by
< a href = "/@{{p.author.banned_by.username}}" class = "text-white hover:underline" > @{{p.author.banned_by.username}}< / a >
< / span >
< / div >
{% endif %}
< / div >
{% endif %}
{% if p.awards or p.over_18 or p.stickied or p.is_pinned or p.private or p.flair or p.club %}
<!-- Mobile post meta, awards, etc -->
< div class = "px-2.5 mt-2.5 lg:p-0 block xl:hidden" >
< ul class = "flex flex-wrap gap-2 items-center mb-0" >
<!-- Flair -->
{% if p.flair %}
< li >
< span class = "badge badge-purple" >
{{p.flair | safe}}
< / span >
< / li >
{% endif %}
<!-- NSFW -->
{% if p.over_18 %}
< li >
< span class = "badge badge-red" > +18< / span >
< / li >
{% endif %}
<!-- Country Club -->
{% if p.club %}
< li >
< span class = "badge badge-yellow" > Country Club< / span >
< / li >
{% endif %}
<!-- Stickied -->
{% if p.stickied %}
< li >
< span class = "badge badge-pink" >
< i class = "fas fa-thumbtack fa-rotate--45 fa-sm fa-fw" > < / i >
Pinned {% if p.stickied.startswith('t:') %}until {{p.stickied[2:]}}{% else %}by @{{p.stickied}}{%endif%}
< / span >
< / li >
{% endif %}
<!-- Pinned -->
{% if p.is_pinned %}
< li >
< span class = "badge badge-green" >
< i class = "fas fa-thumbtack fa-rotate--45 fa-sm fa-fw" > < / i >
Pinned to profile
< / span >
< / li >
{% endif %}
<!-- Private -->
{% if p.private %}
< li >
< span class = "badge badge-blue" >
< i class = "fas fa-lock-alt fa-sm fa-fw1" > < / i >
Draft
< / span >
< / li >
{% endif %}
<!-- Awards -->
{% if p.awards %}
{% for a in p.awards %}
< li >
< i class = "{{a.class_list}} fa-sm fa-fw" data-bs-toggle = "tooltip" data-bs-placement = "bottom" data-bs-original-title = "{{a.title}} Award given by @{{a.user.username}}" > < / i >
< / li >
{% endfor %}
{% endif %}
< / ul >
< / div >
2021-12-06 19:46:13 +00:00
{% endif %}
2021-12-06 19:44:15 +00:00
2021-12-11 00:47:52 +00:00
<!-- Post -->
2021-12-11 00:56:06 +00:00
{% endblock %}
2021-11-25 21:11:27 +00:00
2021-12-11 00:48:40 +00:00
<!-- Sidebar -->
{% block sidebar %}
2021-12-11 00:54:42 +00:00
{% include "/sidebars/SubmissionSidebar.html" %}
2021-12-11 00:48:40 +00:00
{% endblock %}
{% block modals %}
{% if v %}
{% if v.id == p.author_id %}
2021-12-11 00:54:42 +00:00
{% include "delete_post_modal.html" %}
2021-12-11 00:48:40 +00:00
{% endif %}
2021-12-11 00:54:42 +00:00
{% include "report_post_modal.html" %}
{% include "award_modal.html" %}
{% include "emoji_modal.html" %}
{% include "gif_modal.html" %}
2021-12-11 00:48:40 +00:00
{% if v.admin_level == 6 %}
2021-12-11 00:54:42 +00:00
{% include "ban_modal.html" %}
2021-12-11 00:48:40 +00:00
{% endif %}
{% endif %}
2021-12-11 00:54:42 +00:00
{% include "/modals/ModalSubmissionActions.html" %}
{% include "expanded_image_modal.html" %}
2021-12-11 00:48:40 +00:00
{% endblock %}
{% block scripts %}
<!-- This file contains minimal html and javascript required for awards, needs to be near </body> closing tag -->
2021-12-11 00:54:42 +00:00
{% include "/submission/SubmissionAwards.html" %}
2021-12-11 00:48:40 +00:00
{% if v %}
< script defer src = "/assets/js/vote.js?v=1" > < / script >
{% if not p.comment_count %}
< script defer src = "/assets/js/comments_v.js?v=74" > < / script >
{% endif %}
{% endif %}
< script defer src = "/assets/js/new_comments_count.js?v=53" > < / script >
2021-12-11 00:56:21 +00:00
2021-12-11 00:48:40 +00:00
{% endblock %}