thread.html
91 lines
| 3.1 KiB
| text/html
|
HtmlLexer
/ templates / thread.html
neko259
|
r20 | {% extends "base.html" %} | |
neko259
|
r24 | {% load i18n %} | |
neko259
|
r36 | {% load markup %} | |
neko259
|
r24 | ||
neko259
|
r33 | {% block head %} | |
neko259
|
r44 | <title>Neboard - {{ posts.0.title }}</title> | |
neko259
|
r33 | {% endblock %} | |
neko259
|
r20 | {% block content %} | |
{% if posts %} | |||
{% for post in posts %} | |||
neko259
|
r44 | <a id="{{ post.id }}"></a> | |
neko259
|
r28 | <div class="post"> | |
neko259
|
r22 | {% if post.image %} | |
neko259
|
r41 | <div class="image"> | |
neko259
|
r22 | <a href="{{ post.image.url }}"><img | |
src="{{ post.image.url_200x150 }}" /> | |||
</a> | |||
</div> | |||
{% endif %} | |||
neko259
|
r41 | <div class="message"> | |
neko259
|
r22 | <span class="title">{{ post.title }}</span> | |
neko259
|
r30 | <a class="post_id" href="#{{ post.id }}"> | |
(#{{ post.id }})</a> | |||
neko259
|
r36 | [{{ post.pub_time }}] | |
neko259
|
r42 | {% if post.is_get %} | |
<span class="get"> | |||
{% trans "Get!" %} | |||
</span> | |||
{% endif %} | |||
neko259
|
r39 | {% autoescape off %} | |
{{ post.text.rendered }} | |||
{% endautoescape %} | |||
neko259
|
r22 | </div> | |
neko259
|
r32 | {% if post.tags.all %} | |
<div class="metadata"> | |||
<span class="tags">{% trans 'Tags' %}: | |||
{% for tag in post.tags.all %} | |||
<a class="tag" href="{% url 'tag' tag.name %}"> | |||
{{ tag.name }}</a> | |||
{% endfor %} | |||
</span> | |||
</div> | |||
{% endif %} | |||
neko259
|
r28 | </div> | |
neko259
|
r20 | {% endfor %} | |
{% else %} | |||
No threads found. | |||
<hr /> | |||
{% endif %} | |||
neko259
|
r45 | <form id="form" enctype="multipart/form-data" method="post" | |
>{% csrf_token %} | |||
neko259
|
r36 | <div class="post-form-w"> | |
neko259
|
r38 | <div class="form-title">{% trans "Reply to thread" %}</div> | |
neko259
|
r36 | <div class="post-form"> | |
<div class="form-row"> | |||
<div class="form-label">{% trans 'Title' %}</div> | |||
<div class="form-input">{{ form.title }}</div> | |||
</div> | |||
<div class="form-row"> | |||
<div class="form-label">{% trans 'Text' %}</div> | |||
<div class="form-input">{{ form.text }}</div> | |||
</div> | |||
<div class="form-row"> | |||
<div class="form-label">{% trans 'Image' %}</div> | |||
<div class="form-input">{{ form.image }}</div> | |||
</div> | |||
neko259
|
r28 | </div> | |
neko259
|
r36 | <div class="form-submit"><input type="submit" | |
value="{% trans "Post" %}"/></div> | |||
<div>Use <a | |||
href="http://daringfireball.net/projects/markdown/basics"> | |||
markdown</a> syntax for posting.</div> | |||
<div>Example: *<i>italic</i>*, **<b>bold</b>**</div> | |||
<div>Insert quotes with ">"</div> | |||
</div> | |||
</form> | |||
neko259
|
r20 | ||
neko259
|
r38 | {% endblock %} | |
neko259
|
r44 | ||
{% block metapanel %} | |||
<span class="metapanel"> | |||
{{ posts.0.get_reply_count }} {% trans 'replies' %}, | |||
{{ posts.0.get_images_count }} {% trans 'images' %}, | |||
{{ posts.0.get_gets_count }} {% trans 'gets' %} | |||
</span> | |||
{% endblock %} |