From cd67cbbb2827c161aa6e99c93fe57f5500cbb789 Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Thu, 10 Nov 2022 16:32:36 -0800 Subject: pds: more web view implementation --- adenosine-pds/templates/macro.html | 41 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 adenosine-pds/templates/macro.html (limited to 'adenosine-pds/templates/macro.html') diff --git a/adenosine-pds/templates/macro.html b/adenosine-pds/templates/macro.html new file mode 100644 index 0000000..1d38482 --- /dev/null +++ b/adenosine-pds/templates/macro.html @@ -0,0 +1,41 @@ + +{% macro feed_item(item) %} + +
+{% if item.repostedBy.is_some() %} + {% if item.author.displayName.is_some() %}{{ item.author.displayName.as_ref().unwrap() }}{% endif %} + @{{ item.author.handle }} +{% endif %} + +
+ + {% if item.record["createdAt"].as_str().is_some() %} + {{ item.record["createdAt"].as_str().unwrap() }} + {% else %} + {{ item.indexedAt }} + {% endif %} + +
+ + +{% if item.author.displayName.is_some() %} + {{ item.author.displayName.as_ref().unwrap() }} +{% endif %} +@{{ item.author.handle }} +
+{{ item.record["text"].as_str().unwrap() }} +
+ + [{{ item.likeCount }} like / {{ item.repostCount }} repost / {{ item.replyCount }} reply] + + +{% if item.record.get("reply").is_some() %} +
+reply to: {{ item.record["reply"]["uri"] }} +{% endif %} + + + + +
+{% endmacro %} -- cgit v1.2.3