Skip to content

Commit 78120a0

Browse files
authored
QUIZ-197: refactor landing page (#129)
1 parent b632ac5 commit 78120a0

File tree

1 file changed

+23
-24
lines changed

1 file changed

+23
-24
lines changed

src/components/quizzfly/list/QuizzflyList.vue

Lines changed: 23 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -27,20 +27,21 @@ const handleConfirmDelete = async (quizzflyId: string) => {
2727
<Card
2828
v-for="quizzfly in quizzflys"
2929
:key="quizzfly.id"
30+
class="p-3 flex flex-col gap-4"
3031
>
31-
<div class="p-3 flex gap-2 w-full">
32+
<div class="flex gap-2 w-full">
3233
<!-- left -->
3334
<div>
3435
<img
3536
v-image
36-
class="w-[80px] h-[80px] object-cover rounded-sm"
37+
class="w-[60px] h-[60px] object-cover rounded-sm"
3738
:src="quizzfly.cover_image || ''"
38-
alt=""
39+
:alt="quizzfly.title || 'Untitled Quizzfly'"
3940
/>
4041
</div>
41-
<div class="flex flex-col w-full justify-between">
42+
<div class="flex flex-col w-full gap-2">
4243
<div class="flex items-center justify-between">
43-
<div class="flex item-center gap-3">
44+
<div class="flex gap-3">
4445
<h2 class="title text-base font-medium">{{ quizzfly.title || 'Untitled' }}</h2>
4546
<!-- <Chip
4647
:name="quizzfly.quizzfly_status"
@@ -49,36 +50,34 @@ const handleConfirmDelete = async (quizzflyId: string) => {
4950
</div>
5051
<div class="flex items-center gap-2">
5152
<span
52-
class="i-material-symbols-light-delete-outline cursor-pointer text-2xl"
53+
class="i-material-symbols-light-delete-outline cursor-pointer text-xl text-slate-500 hover:text-red-500"
5354
@click="handleConfirmDelete(quizzfly.id)"
5455
></span>
5556
</div>
5657
</div>
57-
<div class="flex items-center justify-between">
58-
<div class="text-sm text-gray-500">@{{ quizzfly.username }}</div>
59-
<div class="flex gap-5">
60-
<RouterLink
61-
target="_blank"
62-
:to="{ name: 'host-live', params: { quizzflyId: quizzfly.id } }"
63-
><Button class="flex items-center h-6 w-17 text-xs"> Host live</Button>
64-
</RouterLink>
65-
<RouterLink
66-
:to="{ name: 'quizzfly-create', params: { quizzflyId: quizzfly.id } }"
67-
class="flex items-center cursor-pointer hover:text-[#0061ff] gap-2 hover:underline"
68-
>
69-
<span>Edit</span>
70-
<span class="i-material-symbols-light-arrow-right-alt text-2xl"></span>
71-
</RouterLink>
72-
</div>
73-
</div>
58+
<div class="text-sm text-gray-500">@{{ quizzfly.username }}</div>
7459
</div>
7560
</div>
61+
<div class="flex gap-5 justify-between">
62+
<RouterLink
63+
target="_blank"
64+
:to="{ name: 'host-live', params: { quizzflyId: quizzfly.id } }"
65+
><Button class="flex items-center h-8 rounded-lg w-20 text-xs"> Host live</Button>
66+
</RouterLink>
67+
<RouterLink
68+
:to="{ name: 'quizzfly-create', params: { quizzflyId: quizzfly.id } }"
69+
class="flex items-center cursor-pointer hover:text-[#0061ff] gap-2 hover:underline"
70+
>
71+
<span>Edit</span>
72+
<span class="i-material-symbols-light-arrow-right-alt text-2xl"></span>
73+
</RouterLink>
74+
</div>
7675
</Card>
7776
</div>
7877
</template>
7978
<style scoped>
8079
.title {
81-
width: 100px;
80+
width: 300px;
8281
text-overflow: ellipsis;
8382
white-space: nowrap;
8483
overflow: hidden;

0 commit comments

Comments
 (0)