fix(avatar_list): 🐛 fix layout of avatar-list

This commit is contained in:
CWorld 2024-07-24 13:27:44 +08:00
parent f88130a5af
commit 880b4aed2c

View File

@ -33,10 +33,8 @@
alt="Avatar" alt="Avatar"
/> />
<div class="flex-1"> <div class="flex-1">
<div class="nickname text-4xl italic mb-2 px-2 text-light"> <div class="nickname text-4xl italic mb-2 px-2 text-light">
{{ nickname }} {{ nickname }} {% if level > 0 %}
{% if level > 0 %}
<span class="text-lg">lv.{{ level }}</span> <span class="text-lg">lv.{{ level }}</span>
{% endif %} {% endif %}
</div> </div>
@ -49,7 +47,9 @@
<div class="content grid grid-cols-2 gap-4 rounded-xl"> <div class="content grid grid-cols-2 gap-4 rounded-xl">
{% for avatar_data in avatar_datas %} {% for avatar_data in avatar_datas %}
<div class="flex out-shadow bg-card p-3 rounded-2xl items-center gap-x-3"> <div
class="flex out-shadow bg-card p-2.5 rounded-2xl items-center gap-x-2.5"
>
<!-- <td class="text-right {{ row_bg }}"> <!-- <td class="text-right {{ row_bg }}">
{{ start_id + loop.index }} {{ start_id + loop.index }}
</td> --> </td> -->
@ -74,21 +74,21 @@
<!-- info --> <!-- info -->
<div <div
class="info in-shadow flex-1 relative flex flex-row justify-between bg-black text-muted px-3 py-3 rounded-xl gap-x-3" class="info in-shadow flex-1 relative flex flex-row justify-between bg-black text-muted px-3 py-3 rounded-xl gap-x-1"
> >
<div class="basic flex flex-col items-start gap-y-2 min-w-[3.7rem]"> <div class="basic flex flex-col items-start gap-y-2 min-w-[3.7rem]">
<span class="name text-xl text-light">{{ avatar_data.name }}</span> <span class="name text-xl text-light">{{ avatar_data.name }}</span>
<div> <div>
<small <small
class="level text-light font-sans font-bold bg-[#686868] px-2 py-1 rounded" class="level text-light font-sans font-bold bg-[#686868] px-1.5 py-1 rounded"
>Lv.{{ avatar_data.level }}</small >Lv.{{ avatar_data.level }}</small
> >
<!-- constellation --> <!-- constellation -->
{% set constellation = avatar_data.eidolon %} {% set class_str = {% set constellation = avatar_data.eidolon %} {% set class_str =
'' %} {% if constellation != 0 %} {% set color = ['green', 'cyan', '' %} {% if constellation != 0 %} {% set color = ['green', 'cyan',
'blue', 'purple', 'pink', 'red'][constellation - 1] %} {% set 'blue', 'purple', 'pink', 'red'][constellation - 1] %} {% set
class_str = "color " ~ color %} {% endif %} class_str = "color-" ~ color %} {% endif %}
<span class="number {{ class_str }} mx-1" <span class="number {{ class_str }} mx-1"
>{{ constellation }}</span >{{ constellation }}</span
> >