Files
LocalAI/core/http/static/general.css
2026-02-03 11:42:51 +00:00

201 lines
4.5 KiB
CSS

body {
font-family: var(--font-body, 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif);
}
.chat-container { height: 90vh; display: flex; flex-direction: column; }
.chat-messages { overflow-y: auto; flex-grow: 1; }
.htmx-indicator{
opacity:0;
transition: opacity 10ms ease-in;
}
.htmx-request .htmx-indicator{
opacity:1
}
@keyframes animloader {
0% { box-shadow: 14px 0 0 -2px, 38px 0 0 -2px, -14px 0 0 -2px, -38px 0 0 -2px; }
25% { box-shadow: 14px 0 0 -2px, 38px 0 0 -2px, -14px 0 0 -2px, -38px 0 0 2px; }
50% { box-shadow: 14px 0 0 -2px, 38px 0 0 -2px, -14px 0 0 2px, -38px 0 0 -2px; }
75% { box-shadow: 14px 0 0 2px, 38px 0 0 -2px, -14px 0 0 -2px, -38px 0 0 -2px; }
100% { box-shadow: 14px 0 0 -2px, 38px 0 0 2px, -14px 0 0 -2px, -38px 0 0 -2px; }
}
.progress {
height: 20px;
margin-bottom: 20px;
overflow: hidden;
background-color: #f5f5f5;
border-radius: 4px;
box-shadow: inset 0 1px 2px rgba(0,0,0,.1);
}
.progress-bar {
float: left;
width: 0%;
height: 100%;
font-size: 12px;
line-height: 20px;
color: #fff;
text-align: center;
background-color: #337ab7;
-webkit-box-shadow: inset 0 -1px 0 rgba(0,0,0,.15);
box-shadow: inset 0 -1px 0 rgba(0,0,0,.15);
-webkit-transition: width .6s ease;
-o-transition: width .6s ease;
transition: width .6s ease;
}
.user {
background-color: #007bff;
}
.assistant {
background-color: #28a745;
}
.message {
display: flex;
align-items: center;
}
.user, .assistant {
flex-grow: 1;
margin: 0.5rem;
}
ul {
list-style-type: disc; /* Adds bullet points */
padding-left: 1.25rem; /* Indents the list from the left margin */
margin-top: 1rem; /* Space above the list */
}
li {
font-size: 0.875rem; /* Small text size */
color: #aab2c7; /* Dark gray text */
/* background-color: #f7fafc; Very light gray background */
border-radius: 0.375rem; /* Rounded corners */
padding: 0.5rem; /* Padding inside each list item */
/*box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06); Subtle shadow */
margin-bottom: 0.5rem; /* Vertical space between list items */
}
li:last-child {
margin-bottom: 0; /* Removes bottom margin from the last item */
}
/* Scrollbar Styling - Minimal */
::-webkit-scrollbar {
width: 6px;
height: 6px;
}
::-webkit-scrollbar-track {
background: var(--color-bg-primary);
}
::-webkit-scrollbar-thumb {
background: var(--color-bg-secondary);
border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
background: var(--color-primary);
}
/* Firefox */
* {
scrollbar-width: thin;
scrollbar-color: var(--color-bg-secondary) var(--color-bg-primary);
}
/* Chat message markdown content styles */
#messages pre {
background-color: var(--color-bg-primary);
border: 1px solid var(--color-border-subtle, rgba(255,255,255,0.1));
border-radius: 0.5rem;
padding: 1rem;
overflow-x: auto;
max-width: 100%;
margin: 0.5rem 0;
white-space: pre;
}
#messages pre code {
background: transparent;
padding: 0;
white-space: pre;
word-wrap: normal;
overflow-wrap: normal;
}
#messages code:not(pre code) {
background-color: var(--color-bg-primary);
padding: 0.2em 0.4em;
border-radius: 3px;
font-size: 0.875em;
}
#messages table {
width: 100%;
border-collapse: collapse;
margin: 0.5rem 0;
display: block;
overflow-x: auto;
}
#messages th,
#messages td {
border: 1px solid var(--color-border-subtle, rgba(255,255,255,0.1));
padding: 0.5rem;
text-align: left;
}
#messages th {
background-color: var(--color-bg-secondary);
}
#messages blockquote {
border-left: 4px solid var(--color-primary);
padding-left: 1rem;
margin: 0.5rem 0;
color: var(--color-text-secondary);
}
#messages h1, #messages h2, #messages h3, #messages h4, #messages h5, #messages h6 {
margin-top: 1rem;
margin-bottom: 0.5rem;
font-weight: 600;
line-height: 1.25;
}
#messages h1 { font-size: 1.5rem; }
#messages h2 { font-size: 1.25rem; }
#messages h3 { font-size: 1.125rem; }
#messages h4 { font-size: 1rem; }
#messages p {
margin: 0.5rem 0;
}
#messages ul, #messages ol {
margin: 0.5rem 0;
padding-left: 1.5rem;
}
#messages hr {
border: none;
border-top: 1px solid var(--color-border-subtle, rgba(255,255,255,0.1));
margin: 1rem 0;
}
/* Mobile responsiveness for chat */
@media (max-width: 768px) {
#messages {
max-width: 100%;
padding-left: 0.5rem;
padding-right: 0.5rem;
}
#messages pre {
max-width: calc(100vw - 3rem);
font-size: 0.8rem;
}
}