Skip to content

Commit eb4bb34

Browse files
committed
site(gordon): update message window styles
- Increase chat panel width from 70ch to 80ch - Update user message background colors for better contrast - Add prose styling to messages for consistent typography - Simplify message rendering template structure Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com>
1 parent a9651d1 commit eb4bb34

1 file changed

Lines changed: 4 additions & 7 deletions

File tree

layouts/partials/gordon-chat.html

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@
291291
x-transition:enter-start="translate-x-full" x-transition:enter-end="translate-x-0"
292292
x-transition:leave="transition ease-in duration-200" x-transition:leave-start="translate-x-0"
293293
x-transition:leave-end="translate-x-full"
294-
class="fixed top-0 right-0 z-50 flex h-screen w-full flex-col overflow-hidden rounded-lg bg-white shadow-2xl transition-all duration-200 md:w-[min(70ch,90vw)] md:h-[calc(100vh-1rem)] md:top-2 md:right-2 dark:bg-gray-900">
294+
class="fixed top-0 right-0 z-50 flex h-screen w-full flex-col overflow-hidden rounded-lg bg-white shadow-2xl transition-all duration-200 md:w-[min(80ch,90vw)] md:h-[calc(100vh-1rem)] md:top-2 md:right-2 dark:bg-gray-900">
295295
<!-- Header -->
296296
<div
297297
class="flex items-center justify-between rounded-t-lg border-b border-gray-200 bg-blue-600 px-6 py-3 dark:border-gray-700">
@@ -355,8 +355,8 @@ <h3 class="mb-2 text-xl font-semibold text-gray-900 dark:text-white">
355355
<!-- Messages -->
356356
<template x-for="(message, index) in messages" :key="index">
357357
<div :class="message.role === 'user' ? 'flex justify-end' : 'flex justify-start'">
358-
<div class="flex flex-col gap-2">
359-
<div :class="message.role === 'user' ? 'bg-blue-600 text-white' : 'bg-gray-100 text-gray-900 dark:bg-gray-800 dark:text-gray-100'" class="rounded-lg px-4 py-3">
358+
<div class="flex flex-col gap-2 max-w-full">
359+
<div :class="message.role === 'user' ? 'bg-blue-500 dark:bg-blue-800 text-white' : 'max-w-none bg-gray-100 dark:bg-gray-800'" class="prose prose-sm dark:prose-invert rounded-lg px-4">
360360
<template x-if="!message.content && message.isStreaming">
361361
<div class="flex gap-1">
362362
<span class="inline-block h-2 w-2 animate-bounce rounded-full bg-current"
@@ -368,10 +368,7 @@ <h3 class="mb-2 text-xl font-semibold text-gray-900 dark:text-white">
368368
</div>
369369
</template>
370370
<template x-if="message.content">
371-
<div>
372-
<div x-html="formatMessageContent(message.content)"
373-
:class="message.role === 'assistant' ? 'prose prose-sm dark:prose-invert max-w-none break-words' : 'max-w-none break-words'"></div>
374-
</div>
371+
<div x-html="formatMessageContent(message.content)"></div>
375372
</template>
376373
</div>
377374
<!-- Feedback buttons for assistant messages -->

0 commit comments

Comments
 (0)