aboutsummaryrefslogtreecommitdiffstats
path: root/adenosine-pds/templates
diff options
context:
space:
mode:
Diffstat (limited to 'adenosine-pds/templates')
-rw-r--r--adenosine-pds/templates/account.html2
-rw-r--r--adenosine-pds/templates/macro.html10
-rw-r--r--adenosine-pds/templates/thread.html6
3 files changed, 9 insertions, 9 deletions
diff --git a/adenosine-pds/templates/account.html b/adenosine-pds/templates/account.html
index b19621d..f45b9ef 100644
--- a/adenosine-pds/templates/account.html
+++ b/adenosine-pds/templates/account.html
@@ -32,7 +32,7 @@
{% endif %}
{% for item in feed %}
- {% call macro::feed_item(item) %}
+ {% call macro::feed_item(item.post) %}
{% endfor %}
diff --git a/adenosine-pds/templates/macro.html b/adenosine-pds/templates/macro.html
index 7c61230..795400b 100644
--- a/adenosine-pds/templates/macro.html
+++ b/adenosine-pds/templates/macro.html
@@ -11,8 +11,8 @@
<div style="float: right;">
<a class="item_timestamp" href="/u/{{ item.author.handle }}/post/{{ item.uri|aturi_to_tid }}">
- {% if item.record["createdAt"].as_str().is_some() %}
- {{ item.record["createdAt"].as_str().unwrap() }}
+ {% if item.record.createdAt.is_some() %}
+ {{ item.record.createdAt.as_ref().unwrap() }}
{% else %}
{{ item.indexedAt }}
{% endif %}
@@ -25,16 +25,16 @@
{% endif %}
<a href="/u/{{ item.author.handle }}"><span class="handle">@{{ item.author.handle }}</span></a>
<br>
-{{ item.record["text"].as_str().unwrap() }}
+{{ item.record.text }}
<br>
<span class="counts">
[<a href="#">{{ item.upvoteCount }} upvote</a> / <a href="#">{{ item.repostCount }} repost</a> / <a href="#">{{ item.replyCount }} reply</a>]
<a href="{{ item.uri|aturi_to_path }}" class="pink">[inspect]</a>
</span>
-{% if item.record.get("reply").is_some() %}
+{% if item.record.reply.is_some() %}
<br>
-<b style="color: orange;">reply to:</b> <a href="{{ item.record["reply"]["uri"].as_str().unwrap()|aturi_to_thread_path }}">{{ item.record["reply"]["uri"] }}</a>
+<b style="color: orange;">reply to:</b> <a href="{{ item.record.reply.as_ref().unwrap().parent.uri|aturi_to_thread_path }}">{{ item.record.reply.as_ref().unwrap().parent.uri }}</a>
{% endif %}
<!-- TODO: "reposted by" -->
diff --git a/adenosine-pds/templates/thread.html b/adenosine-pds/templates/thread.html
index 608c971..c0a8684 100644
--- a/adenosine-pds/templates/thread.html
+++ b/adenosine-pds/templates/thread.html
@@ -4,16 +4,16 @@
{% block main %}
{% if post.parent.is_some() %}
- {% call macro::feed_item(post.parent.as_ref().unwrap()) %}
+ {% call macro::feed_item(post.parent.as_ref().unwrap().post) %}
<center><i>---</i></center>
{% endif %}
-{% call macro::feed_item(post) %}
+{% call macro::feed_item(post.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) %}
+ {% call macro::feed_item(item.post) %}
{% endfor %}
{% endif %}