9917ac981e
FossilOrigin-Name: b408ab947f0ee6ceff7ff49d04022c5329fb4fba0f4e92581e41598c8c7e3a82
41 lines
1.5 KiB
Text
41 lines
1.5 KiB
Text
<div class="page-header">
|
|
<a href="/chats" class="page-header-button">←</a>
|
|
<img src="[% chat.account.avatar %]" class="page-header-image avatar">
|
|
<a href="/@[% chat.account.acct %]" class="page-header-title">[% format_username(chat.account) %]</a>
|
|
</div>
|
|
<div class="chat-view">
|
|
[%# I can't quite say the below is fastest or could be done inline (one eval?),
|
|
not the fastest but it just works %]
|
|
[% revmessages = messages.reverse %]
|
|
[% FOREACH msg IN revmessages %]
|
|
<div class="message-container[% IF msg.account_id == ssn.account.id %] message-you[% END %]">
|
|
<img src="
|
|
[%- IF msg.account_id == ssn.account.id -%]
|
|
[% ssn.account.avatar %]
|
|
[%- ELSE -%]
|
|
[% chat.account.avatar %]
|
|
[%- END -%]
|
|
" class="avatar">
|
|
<div class="message-wrapper">
|
|
<div class="message" id="[% msg.id %]">
|
|
<span class="content">[% emojify(msg.content, msg.emojis) %]</span>
|
|
<span class="time">[% reltime(msg.created_at) %]</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
[% END %]
|
|
<div class="anchor"></div>
|
|
</div>
|
|
<form action="" method="post">
|
|
<table class="chatbox ui-table">
|
|
<tr>
|
|
<td>
|
|
<textarea></textarea>
|
|
</td>
|
|
<td>
|
|
<input type="submit" class="chatbox-btn btn" value="Send">
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</form>
|
|
|