view sat_templates/templates/bulma/chat/message.html @ 348:789ebf39b2d8

i18n: Translated using Weblate (French) Currently translated at 100.0% (213 of 213 strings) Translation: Libervia/Templates Translate-URL: https://salut-a-toi.org/weblate/projects/libervia/templates/fr/
author Goffi <tmp-weblate_goffi.org@goffi.org>
date Thu, 18 Nov 2021 16:25:27 +0000
parents f5f428a50c10
children b2b859a62e70
line wrap: on
line source

{% import 'components/avatar.html' as avatar with context %}

<div id="{{msg.id}}" class="media is-chat-message msg_{{msg.type}} {{'own_msg' if msg.from_ == own_jid.full()}}">
    {%- if msg.type != C.MESS_TYPE_INFO %}
        {%- set author = identities[msg.from_].nicknames[0] | default(msg.from_) -%}
        <figure class="media-left">
            {{ avatar.avatar(msg.from_, "is-32x32") }}
        </figure>
    {% endif -%}
    <div class="media-content">
        <div class="content">
            {%- if msg.type != C.MESS_TYPE_INFO %}
                <nav class="level is-mobile is-marginless is-size-7">
                    <div class="level-left has-text-weight-bold">
                        <div class="level-item">
                            <span class="author">{{author}}</span>
                        </div>
                    </div>
                    <div class="level-right is-italic">
                        <div class="level-item">
                            <span class="date">{{msg.timestamp|date_fmt('auto_day')}}</span>
                        </div>
                    </div>
                </nav>
            {% endif -%}
            <p class="msg_body has-whitespace-pre-wrap">
            {{- msg.html or (msg.text|urlize(nofollow=true, target="_blank")) -}}
            </p>
        </div>
    </div>
</div>