mirror of
https://github.com/edufeed-org/polloer.git
synced 2025-12-07 23:34:31 +00:00
fancy layout, cleanup
This commit is contained in:
parent
e5e53d4968
commit
a9c3d7e32a
2 changed files with 22 additions and 6 deletions
|
|
@ -49,16 +49,32 @@
|
|||
});
|
||||
</script>
|
||||
|
||||
<div class="w-full border p-2">
|
||||
<div class="comment w-full border p-2">
|
||||
<p>{event.content}</p>
|
||||
<div class="flex gap-2">
|
||||
<div class="flex gap-2 reactions">
|
||||
{#if $reacted}
|
||||
<span>👍 {$reactions.length}</span>
|
||||
<span>Danke für deinen Vote!</span>
|
||||
<span class="thanks">Danke für deinen Vote!</span>
|
||||
<button onclick={() => deleteVote()} class="btn">Vote zurückziehen</button>
|
||||
{:else}
|
||||
<button onclick={() => sendReaction()}>👍</button>
|
||||
<button onclick={() => sendReaction()} class="like">👍</button>
|
||||
<span>{$reactions.length}</span>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
<style>
|
||||
.like {
|
||||
cursor: pointer;
|
||||
}
|
||||
.reactions {
|
||||
padding-top: 10px;
|
||||
align-items: center;
|
||||
}
|
||||
.thanks {
|
||||
color: #777;
|
||||
}
|
||||
.comment {
|
||||
border-radius: 20px;
|
||||
border-color: #ccc;
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@
|
|||
<p>Error fetching question: {error.message}</p>
|
||||
{/await}
|
||||
|
||||
<div class="mx-auto flex w-full flex-col items-center justify-center gap-2">
|
||||
<div class="mx-auto flex w-full flex-col items-center justify-center gap-5">
|
||||
{#each $comments as event}
|
||||
<Comment {event} />
|
||||
{/each}
|
||||
|
|
@ -80,7 +80,7 @@
|
|||
height: 100%;
|
||||
}
|
||||
.question {
|
||||
border-radius: 10px;
|
||||
border-radius: 20px;
|
||||
border-color: #ccc;
|
||||
}
|
||||
</style>
|
||||
Loading…
Add table
Add a link
Reference in a new issue