ui: only render extra content on richmedia class (#743)

This commit is contained in:
panda authored and GitHub committed 2024-03-08 17:17:36 +08:00
1 parent 1b8f209429
commit 48e8c7b3fd
16 files changed
+21 -21

No files matched your search

+1 -1
View File
@@ -6,7 +6,7 @@
<div class="section__header">
<h1 class="section__title" id="{{ section.id }}" data-heading>{{ section.title }}</h1>
</div>
<div class="section__body typo">
<div class="section__body typo richmedia">
{{ section.content|markdown|safe }}
</div>
</div>
@@ -110,7 +110,7 @@
{% endif %}
</div>
</div>
<div class="typo" data-emoji-enabled data-drid="{{ doc.docId }}" data-raw-url="{{ url('discussion_reply_raw', did=doc.parentId, drid=doc._id) }}">
<div class="typo richmedia" data-emoji-enabled data-drid="{{ doc.docId }}" data-raw-url="{{ url('discussion_reply_raw', did=doc.parentId, drid=doc._id) }}">
{{ doc['content']|markdown|safe }}
<div class="reactions list" data-type="drid" data-drid="{{ doc._id }}">
{% for e in Object.entries(doc.react or {})|sort(true, false, 1)|selectattr(1) %}
@@ -148,7 +148,7 @@
{% endif %}
</div>
</div>
<div class="typo" data-emoji-enabled data-raw-url="{{ url('discussion_tail_reply_raw', did=doc.parentId, drid=doc._id, drrid=rdoc._id) }}">
<div class="typo richmedia" data-emoji-enabled data-raw-url="{{ url('discussion_tail_reply_raw', did=doc.parentId, drid=doc._id, drrid=rdoc._id) }}">
{{ rdoc.content|markdown|safe }}
</div>
<div class="commentbox-edit-target"></div>
@@ -122,7 +122,7 @@
{% endif %}
</div>
</div>
<div class="typo" data-emoji-enabled data-raw-url="{{ url('problem_solution_raw', pid=doc.parentId, psid=doc._id) }}">
<div class="typo richmedia" data-emoji-enabled data-raw-url="{{ url('problem_solution_raw', pid=doc.parentId, psid=doc._id) }}">
{{ doc['content']|markdown|safe }}
</div>
<div class="commentbox-edit-target"></div>
@@ -152,7 +152,7 @@
{% endif %}
</div>
</div>
<div class="typo" data-emoji-enabled data-raw-url="{{ url('problem_solution_reply_raw', pid=doc.parentId, psid=doc._id, psrid=rdoc._id) }}">
<div class="typo richmedia" data-emoji-enabled data-raw-url="{{ url('problem_solution_reply_raw', pid=doc.parentId, psid=doc._id, psrid=rdoc._id) }}">
{{ rdoc['content']|markdown|safe }}
</div>
<div class="commentbox-edit-target"></div>
@@ -24,7 +24,7 @@
</div>
</div>
<div class="section">
<div class="section__body typo">
<div class="section__body typo richmedia">
{{ tdoc['content']|markdown|safe }}
{% if model.contest.isOngoing(tdoc, tsdoc) %}
<blockquote class="warn">
@@ -74,7 +74,7 @@
</div>
{% endif %}
</div>
<div class="typo" data-emoji-enabled>
<div class="typo richmedia" data-emoji-enabled>
{{ doc['content']|markdown|safe }}
</div>
</div>
@@ -90,7 +90,7 @@
<b>{{ _('Jury') }}</b>
</div>
</div>
<div class="typo" data-emoji-enabled>
<div class="typo richmedia" data-emoji-enabled>
{{ rdoc['content']|markdown|safe }}
</div>
</div>
@@ -117,7 +117,7 @@
{{_('Subject') }}: {{ contest.render_clarification_subject(tdoc,pdict,doc.subject) }} | {% if doc.owner == 0 %}<b>{{ _('Jury') }}</b>{% else %}{{ user.render_inline(udict[doc.owner], badge=false) }}{% endif %} @ {{ datetimeSpan(doc._id)|safe }}
</div>
</div>
<div class="typo" data-emoji-enabled>
<div class="typo richmedia" data-emoji-enabled>
{{ doc['content']|markdown|safe }}
</div>
</div>
@@ -133,7 +133,7 @@
<b>{{ _('Jury') }}</b> @ {{ datetimeSpan(rdoc['_id'])|safe }}
</div>
</div>
<div class="typo" data-emoji-enabled>
<div class="typo richmedia" data-emoji-enabled>
{{ rdoc['content']|markdown|safe }}
</div>
</div>
@@ -25,7 +25,7 @@
{{ datetimeSpan(ddoc._id)|safe }}
</li>
</ul>
<div class="typo topic__content" data-emoji-enabled data-raw-url="{{ url('discussion_raw', did=ddoc.docId) }}">
<div class="typo topic__content richmedia" data-emoji-enabled data-raw-url="{{ url('discussion_raw', did=ddoc.docId) }}">
{{ ddoc['content']|markdown|safe }}
</div>
</div>
@@ -3,7 +3,7 @@
{% block domain_content %}
{% if domain.bulletin %}
<div class="section">
<div class="section__body typo">
<div class="section__body typo richmedia">
{{ domain.bulletin|markdown|safe }}
</div>
</div>
@@ -8,7 +8,7 @@
<div class="section__header">
<h1 class="section__title">{{ _('Homework Introduction') }}</h1>
</div>
<div class="section__body typo">
<div class="section__body typo richmedia">
{{ tdoc['content']|markdown|safe }}
</div>
</div>
@@ -1,6 +1,6 @@
{% if domain.bulletin %}
<div class="section">
<div class="section__body typo">
<div class="section__body typo richmedia">
{{ domain.bulletin|markdown|safe }}
</div>
</div>
@@ -60,7 +60,7 @@
</div>
{% endif %}
{% if node['content'] %}
<div class="section__body typo">
<div class="section__body typo richmedia">
{{ node['content']|markdown|safe }}
</div>
{% endif %}
@@ -45,7 +45,7 @@
<div class="section__body typo">
{{ tdoc['content'] }}
</div>
<div class="section__body typo">
<div class="section__body typo richmedia">
{% if not handler.user.hasPriv(PRIV.PRIV_USER_PROFILE) %}
<blockquote class="typo note">
<p>{{ _('Login to join training plan') }}</p>
@@ -97,7 +97,7 @@
{% if not udoc.bio %}
{{ nothing.render("This person is lazy and didn't write anything.") }}
{% else %}
<div class="section__body typo">
<div class="section__body typo richmedia">
{{ udoc.bio|default('')|markdown|safe }}
</div>
{% endif %}