summaryrefslogtreecommitdiff
path: root/templates/comments
diff options
context:
space:
mode:
authorlxf <sng@luxagraf.net>2021-11-06 09:42:47 -0400
committerlxf <sng@luxagraf.net>2021-11-06 09:42:47 -0400
commitd9f51299809bfb6b3ac589b7c42016d0ef240299 (patch)
treeaa5f945e82fdbf1b66aca82fe5122f6ff5a12eb9 /templates/comments
parentdde9914dbbc6cda18ba59024065727c8dc6bcdf4 (diff)
moved templates to top level directory
Diffstat (limited to 'templates/comments')
-rw-r--r--templates/comments/base.html10
-rw-r--r--templates/comments/comment_notification_email.txt3
-rw-r--r--templates/comments/deleted.html8
-rw-r--r--templates/comments/flagged.html8
-rw-r--r--templates/comments/form.html25
-rw-r--r--templates/comments/list.html27
-rw-r--r--templates/comments/posted.html40
-rw-r--r--templates/comments/preview.html47
8 files changed, 168 insertions, 0 deletions
diff --git a/templates/comments/base.html b/templates/comments/base.html
new file mode 100644
index 0000000..9828ff6
--- /dev/null
+++ b/templates/comments/base.html
@@ -0,0 +1,10 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+ <title>{% block title %}{% endblock %}</title>
+</head>
+<body>
+ {% block content %}{% endblock %}
+</body>
+</html>
diff --git a/templates/comments/comment_notification_email.txt b/templates/comments/comment_notification_email.txt
new file mode 100644
index 0000000..63f1493
--- /dev/null
+++ b/templates/comments/comment_notification_email.txt
@@ -0,0 +1,3 @@
+A comment has been posted on {{ content_object }}.
+The comment reads as follows:
+{{ comment }}
diff --git a/templates/comments/deleted.html b/templates/comments/deleted.html
new file mode 100644
index 0000000..e608481
--- /dev/null
+++ b/templates/comments/deleted.html
@@ -0,0 +1,8 @@
+{% extends "comments/base.html" %}
+{% load i18n %}
+
+{% block title %}{% trans "Thanks for removing" %}.{% endblock %}
+
+{% block content %}
+ <h1>{% trans "Thanks for taking the time to improve the quality of discussion on our site" %}.</h1>
+{% endblock %}
diff --git a/templates/comments/flagged.html b/templates/comments/flagged.html
new file mode 100644
index 0000000..e558019
--- /dev/null
+++ b/templates/comments/flagged.html
@@ -0,0 +1,8 @@
+{% extends "comments/base.html" %}
+{% load i18n %}
+
+{% block title %}{% trans "Thanks for flagging" %}.{% endblock %}
+
+{% block content %}
+ <h1>{% trans "Thanks for taking the time to improve the quality of discussion on our site" %}.</h1>
+{% endblock %}
diff --git a/templates/comments/form.html b/templates/comments/form.html
new file mode 100644
index 0000000..b70862f
--- /dev/null
+++ b/templates/comments/form.html
@@ -0,0 +1,25 @@
+{% load comments i18n %}
+<div class="comment-form-header">
+ <p class="hed">Thoughts?</p>
+ <p class="subhed">Please leave a reply:</p>
+</div>
+<form action="{% comment_form_target %}" method="post" class="comment-form">
+ {% if next %}<div><input type="hidden" name="next" value="{{ next }}" /></div>{% endif %}
+<input type="hidden" name="rder" value="{{ form.instance.content_object.get_absolute_url }}" />
+ {% for field in form %}
+ {% if field.is_hidden %}
+ {{ field }}
+ {% else %}
+ <fieldset class="{% if field.errors %} error{% endif %} {% ifequal field.name "honeypot" %} honeypot"{% endifequal %}">
+ {{ field.label_tag }}
+ {%ifequal field.name "comment"%}<div class="textarea-rounded">{{ field }}</div>{%else%}{{field}}{%endifequal%}
+ </fieldset>
+ {% endif %}
+ {% endfor %}
+ <div class="submit">
+ <input type="submit" name="preview" class="submit-preview btn" value="{% trans "Preview" %}" />
+ <input type="submit" name="post" class="submit-post btn" value="{% trans "Post" %}" />
+ </div>
+</form>
+<p style="font-size: 75%;"><strong>All comments are moderated</strong>, so you won&#8217;t see it right away. And please remember Kurt Vonnegut's rule: &#8220;god damn it, you&#8217;ve got to be kind.&#8221; You can use Markdown or HTML to format your comments. The allowed tags are <code>&lt;b&gt;, &lt;i&gt;, &lt;em&gt;, &lt;strong&gt;, &lt;a&gt;</code>. To create a new paragraph hit return twice. </p>
+
diff --git a/templates/comments/list.html b/templates/comments/list.html
new file mode 100644
index 0000000..7c43a9a
--- /dev/null
+++ b/templates/comments/list.html
@@ -0,0 +1,27 @@
+{% load gravatar_local %}
+{% load typogrify_tags %}
+{% load markdown%}
+{% load bleach_tags %}
+{% load nofollow %}
+{% load comments %}
+ <div>
+ {% for comment in comment_list %}
+ <div id="comment-{{ comment.id }}" class="comment-card-wrapper">
+ <div class="comment-card-hed">
+ <noscript class="datahashloader" data-hash="{% if comment.user_email == "sng@luxagraf.net" %}d64f4854965b2b1c3ecafee4b2a66fac{%else%}{%if comment.user_email|has_grav %}{%gravatar_hash comment.user_email %}{%else%}default{%endif%}{%endif%}">
+ <img class="comment-card-image" {% if comment.user_email == "sng@luxagraf.net" %}src="https://images.luxagraf.net/gravcache/d64f4854965b2b1c3ecafee4b2a66fac.jpg" {%else%} {%if comment.user_email|has_grav %} src="https://images.luxagraf.net/gravcache/{%gravatar_hash comment.email %}.jpg"{%else%}src="https://images.luxagraf.net/gravcache/default.jpg"{%endif%}{%endif%} alt="gravatar icon for {{comment.name}}" />
+ </noscript>
+ <span class="comment-card-commenter">{%if comment.url %}<a href="{{comment.url}}" rel="nofollow" target="_blank">{{comment.name}}</a>{% else %}{{comment.name}}{%endif%}</span>
+ <span class="card-smcaps">{{comment.submit_date|date:"F d, Y"}} at {{comment.submit_date|date:"g:i a"}}</span>
+ </div>
+
+ <div class="comment-card-body">
+ {% if comment.user_email == "sng@luxagraf.net" %}
+ {{comment.comment|markdown|safe|smartypants}}
+ {%else%}
+ {{comment.comment|markdown|bleach|nofollow|safe|smartypants}}
+ {%endif%}
+ </div>
+ </div>
+ {% endfor %}
+ </div>
diff --git a/templates/comments/posted.html b/templates/comments/posted.html
new file mode 100644
index 0000000..de9aa9e
--- /dev/null
+++ b/templates/comments/posted.html
@@ -0,0 +1,40 @@
+{% extends "base.html" %}
+{% load i18n %}
+{%block htmlclass%}class="detail"{%endblock%}
+{% block js %}
+<script type="text/javascript">
+
+(function () {
+ var timeLeft = 5,
+ cinterval;
+
+ var timeDec = function (){
+ timeLeft--;
+ document.getElementById('countdown').innerHTML = timeLeft;
+ if(timeLeft === 0){
+ clearInterval(cinterval);
+ {% if not comment.content_object.get_absolute_url %}
+ window.location="/";
+ {% else%}
+ window.location="{{comment.content_object.get_absolute_url}}";{%endif%}
+ }
+ };
+
+ cinterval = setInterval(timeDec, 1000);
+})();
+
+</script>
+{% endblock %}
+{% block primary %}
+<main>
+ <article class="content">
+ <header class="post-header">
+ <h1 class="post-title">Thank you for your comment</h1>
+ </header>
+ <div class="post-article">
+ <p>Unless you've previously been approved a few times, your comment will be moderated. If we're on the road this can sometimes take a few days, so please be patient.</p>
+ <p><a href="{{comment.content_object.get_absolute_url}}">Return to the page you came from</a> Redirecting in <span id="countdown">5</span></p>
+ </div>
+ </article>
+</main>
+{% endblock %}
diff --git a/templates/comments/preview.html b/templates/comments/preview.html
new file mode 100644
index 0000000..9e27c81
--- /dev/null
+++ b/templates/comments/preview.html
@@ -0,0 +1,47 @@
+{% extends "base.html" %}
+{% load i18n %}
+
+{%block htmlclass%}
+class="detail"{%endblock%}
+
+
+{% block primary %}
+<main>
+ <article class="content">
+ <header class="post-header">
+ <h1 class="post-title">{% trans "Preview your comment" %}</h1>
+ </header>
+
+ {% load comments %}
+<div class="comment-form-wrapper">
+<div class="comment-form-header">
+ <form action="{% comment_form_target %}" method="post" class="comment--form" style="margin-left: 0;">{% csrf_token %}
+ {% if next %}<div><input type="hidden" name="next" value="{{ next }}" /></div>{% endif %}
+ {% if form.errors %}
+ <h3>{% if form.errors|length == 1 %}{% trans "Please correct the error below" %}{% else %}{% trans "Please correct the errors below" %}{% endif %}</h3>
+ {% else %}
+ <blockquote>{{ comment|linebreaks }}</blockquote>
+ <p>
+ <input type="submit" name="submit" class="submit-post btn" value="{% trans "Post your comment" %}" id="submit" /> <h3>{% trans "Or make changes" %}:</h3>
+ </p>
+ {% endif %}
+ {% for field in form %}
+ {% if field.is_hidden %}
+ {{ field }}
+ {% else %}
+ <fieldset {% if field.errors %} class="error"{% endif %} {% ifequal field.name "honeypot" %} style="display:none;"{% endifequal %}>
+ {{ field.label_tag }}
+ {%ifequal field.name "comment"%}<div class="textarea-rounded">{{ field }}</div>{%else%}{{field}}{%endifequal%}
+ </fieldset>
+ {% endif %}
+ {% endfor %}
+ <div class="submit">
+ <input type="submit" name="post" class="submit-post btn" value="{% trans "Post" %}" />
+ <input type="submit" name="preview" class="submit-preview btn" value="{% trans "Preview" %}" />
+ </div>
+ </form>
+ </div>
+ </div>
+ </article>
+</main>
+{% endblock %}