summaryrefslogtreecommitdiffstats
path: root/adenosine-pds/templates
diff options
context:
space:
mode:
Diffstat (limited to 'adenosine-pds/templates')
-rw-r--r--adenosine-pds/templates/macro.html3
-rw-r--r--adenosine-pds/templates/thread.html16
2 files changed, 17 insertions, 2 deletions
diff --git a/adenosine-pds/templates/macro.html b/adenosine-pds/templates/macro.html
index 1d38482..96fdfe3 100644
--- a/adenosine-pds/templates/macro.html
+++ b/adenosine-pds/templates/macro.html
@@ -2,10 +2,12 @@
{% macro feed_item(item) %}
<div class="feed_item">
+{# TODO: handle both thread items and feed items
{% if item.repostedBy.is_some() %}
{% if item.author.displayName.is_some() %}{{ item.author.displayName.as_ref().unwrap() }}{% endif %}
<b>@{{ item.author.handle }}</b>
{% endif %}
+#}
<div style="float: right;">
<a class="item_timestamp" href="/u/{{ item.author.handle }}/post/{{ item.uri|aturi_to_tid }}">
@@ -27,6 +29,7 @@
<br>
<span class="counts">
[<a href="#">{{ item.likeCount }} like</a> / <a href="#">{{ item.repostCount }} repost</a> / <a href="#">{{ item.replyCount }} reply</a>]
+ [<a href="{{ item.uri|aturi_to_path }}">inspect</a>]
</span>
{% if item.record.get("reply").is_some() %}
diff --git a/adenosine-pds/templates/thread.html b/adenosine-pds/templates/thread.html
index e2e2e96..608c971 100644
--- a/adenosine-pds/templates/thread.html
+++ b/adenosine-pds/templates/thread.html
@@ -1,8 +1,20 @@
{% extends "base.html" %}
{% import "macro.html" as macro %}
-{% block post %}
+{% block main %}
-Post stuff will go here
+{% if post.parent.is_some() %}
+ {% call macro::feed_item(post.parent.as_ref().unwrap()) %}
+ <center><i>---</i></center>
+{% endif %}
+
+{% call macro::feed_item(post) %}
+
+{% if post.replies.is_some() && post.replies.as_ref().unwrap().len() > 0 %}
+ <center><i>--- replies ---</i></center>
+ {% for item in post.replies.as_ref().unwrap() %}
+ {% call macro::feed_item(item) %}
+ {% endfor %}
+{% endif %}
{% endblock %}