{% 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 }}"> {% if item.record.createdAt.is_some() %} {{ item.record.createdAt.as_ref().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 }} <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 }}" class="pink">[inspect]</a> </span> {% if item.record.reply.is_some() %} <br> <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" --> <!-- TODO: "reply to" --> </div> {% endmacro %}