aboutsummaryrefslogtreecommitdiffstats
path: root/adenosine-pds/templates/macro.html
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2022-11-10 16:32:36 -0800
committerBryan Newbold <bnewbold@robocracy.org>2022-11-10 16:32:36 -0800
commitcd67cbbb2827c161aa6e99c93fe57f5500cbb789 (patch)
tree74288ae72c0f7ad07cf1f77416b180ab9a4f65c0 /adenosine-pds/templates/macro.html
parent5e149eef22d34e5a2b2081de3533dee3373d47f8 (diff)
downloadadenosine-cd67cbbb2827c161aa6e99c93fe57f5500cbb789.tar.gz
adenosine-cd67cbbb2827c161aa6e99c93fe57f5500cbb789.zip
pds: more web view implementation
Diffstat (limited to 'adenosine-pds/templates/macro.html')
-rw-r--r--adenosine-pds/templates/macro.html41
1 files changed, 41 insertions, 0 deletions
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) %}
+
+<div class="feed_item">
+{% 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 }}">
+ {% if item.record["createdAt"].as_str().is_some() %}
+ {{ item.record["createdAt"].as_str().unwrap() }}
+ {% else %}
+ {{ item.indexedAt }}
+ {% endif %}
+ </a>
+</div>
+
+
+{% if item.author.displayName.is_some() %}
+ <a href="/u/{{ item.author.handle }}"><span class="display_name">{{ item.author.displayName.as_ref().unwrap() }}</span></a>
+{% endif %}
+<a href="/u/{{ item.author.handle }}"><span class="handle">@{{ item.author.handle }}</span></a>
+<br>
+{{ item.record["text"].as_str().unwrap() }}
+<br>
+<span class="counts">
+ [<a href="#">{{ item.likeCount }} like</a> / <a href="#">{{ item.repostCount }} repost</a> / <a href="#">{{ item.replyCount }} reply</a>]
+</span>
+
+{% if item.record.get("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>
+{% endif %}
+
+<!-- TODO: "reposted by" -->
+<!-- TODO: "reply to" -->
+
+</div>
+{% endmacro %}