Skip to content

Commit 4320475

Browse files
committed
Fix responsiveness on presence-example
1 parent 16b0049 commit 4320475

File tree

2 files changed

+13
-15
lines changed

2 files changed

+13
-15
lines changed

Examples/PresenceExample/Pages/Index.razor

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,16 @@
1616
<div class="flex justify-between">
1717
<div class="dark:bg-brand-1200 bg-scale-200 border border-scale-500 dark:border-scale-300 p-3 rounded-md space-y-8 transition-all max-h-[70px] duration-500 overflow-hidden shadow-2xl dark:shadow-lg">
1818
<a href="https://github.com/supabase-community/supabase-csharp">
19-
<img class="w-auto h-full" src="/logo.png" />
19+
<img class="sm:w-300 xs:w-200 w-auto h-full" src="/logo.png" />
2020
</a>
2121
</div>
2222

2323
<a href="https://github.com/supabase-community/realtime-csharp/tree/master/Examples/PresenceExample">
24-
<img class="w-8 h-8" src="/github-mark-white.png"/>
24+
<img class="w-8 h-8" src="/github-mark-white.png" />
2525
</a>
2626
</div>
2727

28-
<div class="flex items-start flex-col">
28+
<div class="flex items-start flex-col pt-2">
2929
@if (isConnected)
3030
{
3131
<Pill Text="Connected" />
@@ -50,17 +50,15 @@
5050
}
5151
</div>
5252

53-
<div class="grid grid-cols-6 gap-4 absolute bottom-10 w-full right-5 h-10">
54-
<div class="col-end-7 col-span-2">
55-
56-
<InputText @ref="chatInput"
57-
@onfocus="HandleChatInputFocus"
58-
@onfocusout="HandleChatInputLostFocus"
59-
@bind-Value="chatMessage"
60-
placeholder="Send a message..."
61-
type="text"
62-
class="w-full bg-scale-500 h-10 rounded-md px-2.5" />
63-
</div>
53+
<div class="flex absolute bottom-10 right-5 w-3/4 md:w-1/3 h-10">
54+
<InputText @ref="chatInput"
55+
@onfocus="HandleChatInputFocus"
56+
@onfocusout="HandleChatInputLostFocus"
57+
@bind-Value="chatMessage"
58+
@oninput="@((e) => { chatMessage=(string?)e.Value ?? "";})"
59+
placeholder="Send a message..."
60+
type="text"
61+
class="w-full bg-scale-500 h-10 rounded-lg px-2.5" />
6462
</div>
6563

6664
@code {

Examples/PresenceExample/Shared/MainLayout.razor

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<div class="h-screen w-screen p-4 flex flex-col justify-between relative max-h-screen max-w-screen overflow-hidden">
44
<div class="absolute h-full w-full left-0 top-0 pointer-events-none" style="z-index: -1; opacity: 0.15; background-size: 16px 16px; background-image: linear-gradient(to right, gray 1px, transparent 1px), linear-gradient(gray 1px, transparent 1px);"></div>
5-
<div class="flex flex-col h-full justify-between">
5+
<div class="flex flex-col h-full justify-start md:justify-between">
66
@Body
77
</div>
88
<div class="absolute top-0 left-0 w-full h-full flex items-center justify-center space-x-2 pointer-events-none">

0 commit comments

Comments
 (0)