aboutsummaryrefslogtreecommitdiffstats
path: root/adenosine-pds/templates/macro.html
blob: d586adb8922dba68fde7ba27d40fc71cd609b803 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44

{% 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 %}