Initial commit

This commit is contained in:
Pascal Engélibert 2022-10-15 15:32:57 +02:00
commit 980a85d41b
Signed by: tuxmain
GPG key ID: 3504BC6D362F7DCA
15 changed files with 3969 additions and 0 deletions

48
templates/comments.html Normal file
View file

@ -0,0 +1,48 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8"/>
<title>Comments</title>
</head>
<body>
<div id="comments_pending">
{% for comment in comments_pending %}
<div class="comment{% if comment.needs_approval %} comment_pending{% endif %}" id="comment-{{ comment.id }}">
<span class="comment-author">{{ comment.author }}</span>
<span class="comment-date">{{ comment.post_time | date(format="%F %R", locale=config.lang) }}</span>
{% if admin and comment.needs_approval %}
<a href="?approve={{ comment.id }}">Approve</a>
{% endif %}
{% if admin %}
<a href="?remove={{ comment.id }}">Remove</a>
{% endif %}
<p class="comment-text">{{ comment.text }}</p>
</div>
{% endfor %}
</div>
<div id="comments">
{% for comment in comments %}
<div class="comment{% if comment.needs_approval %} comment_pending{% endif %}" id="comment-{{ comment.id }}">
<span class="comment-author">{{ comment.author }}</span>
<span class="comment-date">{{ comment.post_time | date(format="%F %R", locale=config.lang) }}</span>
{% if admin and comment.needs_approval %}
<a href="?approve={{ comment.id }}">Approve</a>
{% endif %}
{% if admin %}
<a href="?remove={{ comment.id }}">Remove</a>
{% endif %}
<p class="comment-text">{{ comment.text }}</p>
</div>
{% endfor %}
</div>
<form action="#" method="post">
<label for="new_comment-author">Your name:</label>
<input type="text" id="new_comment-author" name="author" required max-length="{{ config.comment_author_max_len }}"/><br/>
<label for="new_comment-email">Your e-mail:</label>
<input type="email" id="new_comment-email" name="email" max-length="{{ config.comment_email_max_len }}"/><br/>
<label for="new_comment-text">Your comment:</label><br/>
<textarea id="new_comment-text" name="text" max-length="{{ config.comment_text_max_len }}"></textarea><br/>
<button type="submit" name="a" value="new_comment">Post comment</button>
</form>
</body>
</html>