Start implementing reply context! It's ugly and doesn't actually link the original post yet but you *can* see the original post's author and content :3

This commit is contained in:
Danielle McLean 2017-11-16 21:52:42 +11:00
parent fb9e9a24c9
commit e72a6b01f0
Signed by untrusted user: 00dani
GPG key ID: 5A5D2D1AFF12EEC5
7 changed files with 78 additions and 13 deletions

View file

@ -1,5 +1,18 @@
{% load friendly_url humanize jsonify markdown shortlink %}<article class="card h-entry">
{% load bleach friendly_url humanize jsonify markdown shortlink %}<article class="card h-entry">
{% if entry.photo %}<img class="card-img-top u-photo" src="{{ entry.photo.url }}" />{% endif %}
{% if entry.in_reply_to %}{% with reply=entry.reply_context %}
<article class="card-header media u-in-reply-to h-cite">
<a class="align-self-center p-author h-card" href="{{ reply.author.url }}">
<img class="mr-3 rounded" width="100" src="{{ reply.author.photo }}"
alt="{{ reply.author.name }}" title="{{ reply.author.name }}" />
</a>
<div class="media-body">
{% if reply.name %}<h4 class="p-name">{{ reply.name }}</h4>{% endif %}
<div class="e-content{% if not reply.name %} p-name{% endif %}">{{ reply.content | bleach }}</div>
</div>
</article>{% endwith %}{% endif %}
<div class="card-body">
{% if entry.name %}<h4 class="card-title p-name">{{ entry.name }}</h4>{% endif %}
<div class="e-content{% if not entry.name %} p-name{% endif %}">{{ entry.content | markdown }}</div>