This commit is contained in:
Hannah 2024-10-03 21:24:20 +01:00
parent 660a6b06ea
commit 40c9e396a1

View File

@ -1056,4 +1056,496 @@
border: none; border: none;
background: none; background: none;
} }
.hidden {
display: none;
}
.placeholder-content {
display: flex;
flex-direction: column;
height: 100%;
}
.placeholder {
align-items: center;
display: flex;
justify-content: center;
height: 100%;
flex-grow: 1;
}
.examples :global(img) {
pointer-events: none;
}
.examples {
margin: auto;
padding: var(--spacing-xxl);
display: grid;
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
gap: var(--spacing-xxl);
max-width: calc(min(4 * 200px + 5 * var(--spacing-xxl), 100%));
}
.example {
display: flex;
flex-direction: column;
align-items: center;
padding: var(--spacing-xl);
border: 0.05px solid var(--border-color-primary);
border-radius: var(--radius-xl);
background-color: var(--background-fill-secondary);
cursor: pointer;
transition: var(--button-transition);
max-width: var(--size-56);
width: 100%;
}
.example:hover {
background-color: var(--color-accent-soft);
border-color: var(--border-color-accent);
}
.example-icon-container {
display: flex;
align-self: flex-start;
margin-left: var(--spacing-md);
width: var(--size-6);
height: var(--size-6);
}
.example-display-text,
.example-text,
.example-file {
font-size: var(--text-md);
width: 100%;
text-align: center;
overflow: hidden;
text-overflow: ellipsis;
}
.example-display-text,
.example-file {
margin-top: var(--spacing-md);
}
.example-image-container {
flex-grow: 1;
display: flex;
justify-content: center;
align-items: center;
margin-top: var(--spacing-xl);
}
.example-image-container :global(img) {
max-height: 100%;
max-width: 100%;
height: var(--size-32);
width: 100%;
object-fit: cover;
border-radius: var(--radius-xl);
}
.panel-wrap {
width: 100%;
overflow-y: auto;
}
.flex-wrap {
width: 100%;
height: 100%;
}
.bubble-wrap {
width: 100%;
overflow-y: auto;
height: 100%;
padding-top: var(--spacing-xxl);
}
:global(.dark) .bubble-wrap {
background: var(--background-fill-secondary);
}
.message-wrap {
display: flex;
flex-direction: column;
justify-content: space-between;
margin-bottom: var(--spacing-xxl);
}
.bubble-gap {
gap: calc(var(--spacing-xxl) + var(--spacing-lg));
}
.message-wrap > div :global(p:not(:first-child)) {
margin-top: var(--spacing-xxl);
}
.message {
position: relative;
display: flex;
flex-direction: column;
width: calc(100% - var(--spacing-xxl));
max-width: 100%;
color: var(--body-text-color);
font-size: var(--chatbot-text-size);
overflow-wrap: break-word;
}
.thought {
margin-top: var(--spacing-xxl);
}
.message :global(.prose) {
font-size: var(--chatbot-text-size);
}
.message-bubble-border {
border-width: 1px;
border-radius: var(--radius-md);
}
.user {
align-self: flex-end;
}
.message-fit {
width: fit-content !important;
}
.panel-full-width {
width: 100%;
}
.message-markdown-disabled {
white-space: pre-line;
}
.flex-wrap.user {
border-width: 1px;
border-radius: var(--radius-md);
align-self: flex-start;
border-bottom-right-radius: 0;
box-shadow: var(--shadow-drop);
align-self: flex-start;
text-align: right;
padding: var(--spacing-sm) var(--spacing-xl);
border-color: var(--border-color-accent-subdued);
background-color: var(--color-accent-soft);
}
:not(.component-wrap).flex-wrap.bot {
border-width: 1px;
border-radius: var(--radius-lg);
align-self: flex-start;
border-bottom-left-radius: 0;
box-shadow: var(--shadow-drop);
align-self: flex-start;
text-align: right;
padding: var(--spacing-sm) var(--spacing-xl);
border-color: var(--border-color-primary);
background-color: var(--background-fill-secondary);
}
.panel .user :global(*) {
text-align: right;
}
/* Colors */
.bubble .bot {
border-color: var(--border-color-primary);
}
.message-row {
display: flex;
/* flex-direction: column; */
position: relative;
}
.message-row.user-row {
align-self: flex-end;
}
.message-row.bubble {
margin: calc(var(--spacing-xl) * 2);
margin-bottom: var(--spacing-xl);
}
.with_avatar.message-row.panel {
padding-left: calc(var(--spacing-xl) * 2) !important;
padding-right: calc(var(--spacing-xl) * 2) !important;
}
.with_avatar.message-row.bubble.user-row {
margin-right: calc(var(--spacing-xl) * 2) !important;
}
.with_avatar.message-row.bubble.bot-row {
margin-left: calc(var(--spacing-xl) * 2) !important;
}
.with_opposite_avatar.message-row.bubble.user-row {
margin-left: calc(var(--spacing-xxl) + 35px + var(--spacing-xxl));
}
.message-row.panel {
margin: 0;
padding: calc(var(--spacing-xl) * 3) calc(var(--spacing-xxl) * 2);
}
.message-row.panel.bot-row {
background: var(--background-fill-secondary);
}
.message-row.bubble.user-row {
align-self: flex-end;
max-width: calc(100% - var(--spacing-xl) * 6);
}
.message-row.bubble.bot-row {
align-self: flex-start;
max-width: calc(100% - var(--spacing-xl) * 6);
}
.message-row:last-of-type {
margin-bottom: calc(var(--spacing-xxl) * 2);
}
.user-row.bubble {
flex-direction: row;
justify-content: flex-end;
}
@media (max-width: 480px) {
.user-row.bubble {
align-self: flex-end;
}
.bot-row.bubble {
align-self: flex-start;
}
.message {
width: 100%;
}
}
.avatar-container {
align-self: flex-start;
position: relative;
display: flex;
justify-content: flex-start;
align-items: flex-start;
width: 35px;
height: 35px;
flex-shrink: 0;
bottom: 0;
border-radius: 50%;
border: 1px solid var(--border-color-primary);
}
.user-row > .avatar-container {
order: 2;
margin-left: var(--spacing-xxl);
}
.bot-row > .avatar-container {
margin-right: var(--spacing-xxl);
margin-left: 0;
margin-top: -5px;
}
.avatar-container:not(.thumbnail-item) :global(img) {
width: 100%;
height: 100%;
object-fit: cover;
border-radius: 50%;
padding: 6px;
}
.selectable {
cursor: pointer;
}
@keyframes dot-flashing {
0% {
opacity: 0.8;
}
50% {
opacity: 0.5;
}
100% {
opacity: 0.8;
}
}
.message-wrap > .message :not(.image-button) :global(img) {
margin: var(--size-2);
max-height: 200px;
}
.message-wrap
> div
:not(.avatar-container)
div
:not(.image-button)
:global(img) {
border-radius: var(--radius-xl);
margin: var(--size-2);
width: 400px;
max-width: 30vw;
max-height: 30vw;
}
.message-wrap .message :global(a) {
color: var(--color-text-link);
text-decoration: underline;
}
.message-wrap .bot :global(table),
.message-wrap .bot :global(tr),
.message-wrap .bot :global(td),
.message-wrap .bot :global(th) {
border: 1px solid var(--border-color-primary);
}
.message-wrap .user :global(table),
.message-wrap .user :global(tr),
.message-wrap .user :global(td),
.message-wrap .user :global(th) {
border: 1px solid var(--border-color-accent);
}
/* KaTeX */
.message-wrap :global(span.katex) {
font-size: var(--text-lg);
direction: ltr;
}
/* Copy button */
.message-wrap :global(div[class*="code_wrap"] > button) {
position: absolute;
top: var(--spacing-md);
right: var(--spacing-md);
z-index: 1;
cursor: pointer;
border-bottom-left-radius: var(--radius-sm);
padding: var(--spacing-md);
width: 25px;
height: 25px;
}
.message-wrap :global(code > button > span) {
position: absolute;
top: var(--spacing-md);
right: var(--spacing-md);
width: 12px;
height: 12px;
}
.message-wrap :global(.check) {
position: absolute;
top: 0;
right: 0;
opacity: 0;
z-index: var(--layer-top);
transition: opacity 0.2s;
background: var(--background-fill-primary);
padding: var(--size-1);
width: 100%;
height: 100%;
color: var(--body-text-color);
}
.message-wrap :global(pre) {
position: relative;
}
.message-wrap :global(.grid-wrap) {
max-height: 80% !important;
max-width: 600px;
object-fit: contain;
}
/* Image preview */
.message :global(.preview) {
object-fit: contain;
width: 95%;
max-height: 93%;
}
.image-preview {
position: absolute;
z-index: 999;
left: 0;
top: 0;
width: 100%;
height: 100%;
overflow: auto;
background-color: rgba(0, 0, 0, 0.9);
display: flex;
justify-content: center;
align-items: center;
}
.image-preview :global(svg) {
stroke: white;
}
.image-preview-close-button {
position: absolute;
top: 10px;
right: 10px;
background: none;
border: none;
font-size: 1.5em;
cursor: pointer;
height: 30px;
width: 30px;
padding: 3px;
background: var(--bg-color);
box-shadow: var(--shadow-drop);
border: 1px solid var(--button-secondary-border-color);
border-radius: var(--radius-lg);
}
.component {
padding: 0;
border-radius: var(--radius-md);
width: fit-content;
overflow: hidden;
}
.component.gallery {
border: none;
}
.file-pil {
display: block;
width: fit-content;
padding: var(--spacing-sm) var(--spacing-lg);
border-radius: var(--radius-md);
background: var(--background-fill-secondary);
color: var(--body-text-color);
text-decoration: none;
margin: 0;
font-family: var(--font-mono);
font-size: var(--text-sm);
}
.file {
width: auto !important;
max-width: fit-content !important;
}
@media (max-width: 600px) or (max-width: 480px) {
.component {
width: 100%;
}
}
.message-wrap :global(.prose.chatbot.md) {
opacity: 0.8;
overflow-wrap: break-word;
}
.message > button {
width: 100%;
}
.html {
padding: 0;
border: none;
background: none;
}
</style> </style>