forked from rc/aircox
remove old cms, switch to wagtail; move website to cms
This commit is contained in:
52
cms/templates/cms/snippets/comments.html
Normal file
52
cms/templates/cms/snippets/comments.html
Normal file
@ -0,0 +1,52 @@
|
||||
{% load i18n %}
|
||||
{% load honeypot %}
|
||||
|
||||
{% if comment_form %}
|
||||
{% with comment_form as form %}
|
||||
{{ form.non_field_errors }}
|
||||
<form action="" method="POST">
|
||||
{% csrf_token %}
|
||||
{% render_honeypot_field "hp_website" %}
|
||||
<div>
|
||||
<input type="hidden" name="type" value="comments">
|
||||
{{ form.author.errors }}
|
||||
{{ form.author }}
|
||||
<div>
|
||||
<input type="checkbox" value="1" id="show_more">
|
||||
<label for="show_more">{% trans "show more options" %}</label>
|
||||
<div class="extra">
|
||||
{{ form.email.errors }}
|
||||
{{ form.email }}
|
||||
{{ form.url.errors }}
|
||||
{{ form.url }}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
{{ form.content.errors }}
|
||||
{{ form.content }}
|
||||
<button type="submit">{% trans "Post!" %}</button>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<ul>
|
||||
{% for comment in page.comments %}
|
||||
<li class="comment">
|
||||
<div class="metadata">
|
||||
<a {% if comment.url %}href="{{ comment.url }}" {% endif %}
|
||||
class="author">{{ comment.author }}</a>
|
||||
<time datetime="{{ comment.date }}">
|
||||
{{ comment.date|date:'l d F, H:i' }}
|
||||
</time>
|
||||
</div>
|
||||
<div class="body">{{ comment.content }}</div>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
|
||||
{% endwith %}
|
||||
{% endif %}
|
||||
|
||||
|
||||
|
||||
9
cms/templates/cms/snippets/list.html
Normal file
9
cms/templates/cms/snippets/list.html
Normal file
@ -0,0 +1,9 @@
|
||||
|
||||
<div class="list">
|
||||
{% for page in object_list %}
|
||||
{% with item=page.specific %}
|
||||
{% include "cms/snippets/list_item.html" %}
|
||||
{% endwith %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
||||
16
cms/templates/cms/snippets/list_item.html
Normal file
16
cms/templates/cms/snippets/list_item.html
Normal file
@ -0,0 +1,16 @@
|
||||
{% load wagtailimages_tags %}
|
||||
|
||||
<a {% if item.url %}href="{{ item.url }}" {% endif %}class="item page_item">
|
||||
{% image item.cover fill-64x64 class="cover item_cover" %}
|
||||
<h3>{{ item.title }}</h3>
|
||||
<div class="summary">{{ item.summary }}</div>
|
||||
{% if not item.show_in_menus %}
|
||||
{% if item.date %}
|
||||
<time datetime="{{ item.date }}">
|
||||
{{ item.date|date:'l d F, H:i' }}
|
||||
</time>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</a>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user