230
|
1 {% import 'components/avatar.html' as avatar with context %} |
|
2 |
|
3 <div id="{{msg.id}}" class="media is-chat-message msg_{{msg.type}} {{'own_msg' if msg.from_ == own_jid.full()}}"> |
|
4 {%- if msg.type != C.MESS_TYPE_INFO %} |
|
5 {%- set author = identities[msg.from_].nicknames[0] | default(msg.from_) -%} |
|
6 <figure class="media-left"> |
|
7 {{ avatar.avatar(msg.from_, "is-32x32") }} |
|
8 </figure> |
|
9 {% endif -%} |
|
10 <div class="media-content"> |
|
11 <div class="content"> |
|
12 {%- if msg.type != C.MESS_TYPE_INFO %} |
|
13 <nav class="level is-mobile is-marginless is-size-7"> |
|
14 <div class="level-left has-text-weight-bold"> |
|
15 <div class="level-item"> |
|
16 <span class="author">{{author}}</span> |
|
17 </div> |
|
18 </div> |
|
19 <div class="level-right is-italic"> |
|
20 <div class="level-item"> |
|
21 <span class="date">{{msg.timestamp|date_fmt('auto_day')}}</span> |
|
22 </div> |
|
23 </div> |
|
24 </nav> |
|
25 {% endif -%} |
|
26 <p class="msg_body"> |
|
27 {{- msg.html or (msg.text|urlize(nofollow=true, target="_blank")) -}} |
|
28 </p> |
|
29 </div> |
|
30 </div> |
|
31 </div> |