ui: 允许自定义首页布局

This commit is contained in:
undefined committed 2021-05-25 13:30:55 +08:00
1 parent dbf51849d5
commit cc08538bdb
12 files changed
+248 -188

No files matched your search

@@ -0,0 +1,38 @@
{% if uids.length %}
<div class="section">
<div class="section__header">
<h1 class="section__title">{{ _('Ranking') }}</h1>
</div>
<div class="section__body no-padding">
<div>
<table class="data-table">
<colgroup>
<col class="col--rank">
<col class="col--user">
<col class="col--rp">
<col class="col--bio">
</colgroup>
<thead>
<tr>
<th class="col--rank">{{ _('Rank') }}</th>
<th class="col--user">{{ _('Username') }}</th>
<th class="col--rp">{{ _('RP') }}</th>
<th class="col--bio">{{ _('Bio') }}</th>
</tr>
</thead>
<tbody>
{%- for uid in uids -%}
{% set udoc = udict[uid] %}
<tr>
<td class="col--rank">{{ loop.index }}</td>
<td class="col--user">{{ user.render_inline(udoc) }}</td>
<td class="col--rp">{{ udoc.rp|default(1500)|round(0) }}</td>
<td class="col--bio">{{ udoc.bio|default('')|truncate(64, true)|markdownInline|safe }}</td>
</tr>
{%- endfor -%}
</tbody>
</table>
</div>
</div>
</div>
{% endif %}