Left-align user message if more than 1 line, fixes #15

This commit is contained in:
Niek van der Maas 2023-03-06 15:58:12 +01:00
parent 3b35868a06
commit f2fd3664a4
2 changed files with 3 additions and 8 deletions

View File

@ -22,13 +22,13 @@ a.is-disabled {
}
/* Show the edit button on hover of the user message */
.usermessage:hover .editbutton {
.user-message:hover .editbutton {
/* TODO: add when ready: display: block !important; */
text-decoration: none !important;
}
/* Swap the border on user messages to the other side */
.usermessage > .message-body {
.user-message > .message-body {
border-width: 0 4px 0 0 !important;
}
@ -43,11 +43,6 @@ a.is-disabled {
overflow-y:hidden;
}
/* Left-align code blocks in messages */
.message-body > pre {
text-align: left !important;
}
$footer-padding: 3rem 1.5rem;
@import "/node_modules/bulma/bulma.sass";

View File

@ -148,7 +148,7 @@
{#each chat.messages as message}
{#if message.role === "user"}
<article class="message is-info has-text-right usermessage">
<article class="message is-info user-message" class:has-text-right={message.content.split("\n").length === 1}>
<div class="message-body">
<a
href={"#"}