fix: Page style changes
This commit is contained in:
parent
8ea9b678a4
commit
d88f6e2bbf
@ -1,3 +1,10 @@
|
|||||||
@import 'tailwindcss/base';
|
@import 'tailwindcss/base';
|
||||||
@import 'tailwindcss/components';
|
@import 'tailwindcss/components';
|
||||||
@import 'tailwindcss/utilities';
|
@import 'tailwindcss/utilities';
|
||||||
|
|
||||||
|
.abs-centered {
|
||||||
|
position: absolute;
|
||||||
|
left: 50%;
|
||||||
|
top: 50%;
|
||||||
|
transform: translate(-50%, -50%);
|
||||||
|
}
|
@ -3,7 +3,7 @@
|
|||||||
const { message, imageSrc, user }: TypeMessage = $props()
|
const { message, imageSrc, user }: TypeMessage = $props()
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div class="w-full hover:bg-base-200 flex py-2">
|
<div class="w-full hover:bg-base-300 bg-base-200 flex py-2">
|
||||||
<div class="avatar mx-2">
|
<div class="avatar mx-2">
|
||||||
<div class="w-12 rounded">
|
<div class="w-12 rounded">
|
||||||
<img src={imageSrc} alt="Profile image for {user}" />
|
<img src={imageSrc} alt="Profile image for {user}" />
|
||||||
|
@ -33,18 +33,22 @@
|
|||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<main class="absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 w-1/2 h-fit">
|
<main class="grid grid-cols-2 h-screen w-full">
|
||||||
<h1 class="text-lg"><span class="text-svelte">SvelteKit</span> with Socket.IO Integration</h1>
|
<div class="relative h-full w-full">
|
||||||
<form class="my-1 flex" on:submit={sendMessage}>
|
<div class="h-fit col-span-1 w-10/12 abs-centered">
|
||||||
<input type="text" placeholder="Type here" class="input input-bordered w-1/2 mr-1" bind:value={msg} />
|
<h1 class="text-lg"><span class="text-svelte">SV</span>Chat</h1>
|
||||||
<button class="btn w-1/2" type="submit">Send</button>
|
<form class="my-1 flex" on:submit={sendMessage}>
|
||||||
</form>
|
<input type="text" placeholder="Type here" class="input input-bordered w-1/2 mr-1" bind:value={msg} />
|
||||||
<button
|
<button class="btn w-1/2" type="submit">Send Message</button>
|
||||||
class="btn w-full"
|
</form>
|
||||||
on:click={() => {
|
<button
|
||||||
|
class="btn w-full"
|
||||||
|
on:click={() => {
|
||||||
log = [];
|
log = [];
|
||||||
}}>Clear</button>
|
}}>Clear Messages</button>
|
||||||
<section>
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-span-1 overflow-scroll bg-base-200 m-4 rounded-lg">
|
||||||
{#each log as message}
|
{#each log as message}
|
||||||
<Message
|
<Message
|
||||||
imageSrc={message.imageSrc}
|
imageSrc={message.imageSrc}
|
||||||
@ -52,5 +56,5 @@
|
|||||||
message={message.message}
|
message={message.message}
|
||||||
/>
|
/>
|
||||||
{/each}
|
{/each}
|
||||||
</section>
|
</div>
|
||||||
</main>
|
</main>
|
Loading…
Reference in New Issue
Block a user