Flask / static /style.css
UntilDot's picture
Update static/style.css
a7878ab verified
/* Gruvbox Material Theme: Light & Dark */
:root {
--bg0: #f2e5bc;
--bg1: #eddeb5;
--bg-statusline1: #ebdbb2;
--bg-statusline2: #ebdbb2;
--fg0: #654735;
--fg1: #4f3829;
--blue: #45707a;
--green: #6c782e;
--purple: #945e80;
--visual_green: #d7d9ae;
--aqua: #689d6a;
}
.dark {
--bg0: #32302f;
--bg1: #3c3836;
--bg-statusline1: #3c3836;
--bg-statusline2: #46413e;
--fg0: #d4be98;
--fg1: #ddc7a1;
--blue: #7daea3;
--green: #a9b665;
--purple: #d3869b;
--visual_green: #a9b665;
--aqua: #8ec07c;
}
/* Base Styling */
html, body {
height: 100%;
margin: 0;
overflow: hidden;
}
body {
background-color: var(--bg0);
color: var(--fg0);
}
body > .main-container {
display: flex;
flex-direction: column;
height: 100vh;
}
input, button {
background-color: var(--bg1);
color: var(--fg0);
}
input::placeholder {
color: var(--fg1);
}
button {
background-color: var(--blue) !important;
color: var(--fg1) !important;
font-weight: 700;
font-size: 1rem;
letter-spacing: 0.25px;
transition: background-color 0.3s;
border: none;
}
button:hover {
background-color: var(--purple) !important;
color: var(--fg0) !important;
}
/* Config Panel Layout */
#configPanel {
max-height: 1000px;
overflow: visible;
transition: max-height 0.5s ease, padding 0.5s ease, opacity 0.5s ease;
display: flex;
flex-direction: column;
gap: 1rem;
}
#configPanel > h2 {
text-align: center;
}
#configPanel .grid {
justify-items: center;
}
.model-zone {
display: flex;
flex-direction: column;
align-items: center;
text-align: center;
}
/* Minimal View */
#configPanel.minimal .model-label,
#configPanel.minimal .model-dropdown,
#configPanel.minimal .options {
display: none !important;
}
#configPanel.minimal .model-name {
display: inline-block;
font-weight: bold;
margin-top: 0.25rem;
}
#configPanel.minimal .loader {
display: none;
}
#configPanel.minimal .model-zone.loading .loader {
display: flex;
justify-content: center;
margin-top: 0.5rem;
}
/* Expanded View */
#configPanel.expanded .model-label,
#configPanel.expanded .model-dropdown {
display: block;
}
#configPanel.expanded .model-name {
display: none;
}
#configPanel.expanded .loader {
display: none;
}
#configPanel.expanded .model-zone.loading .loader {
display: flex;
justify-content: center;
margin-top: 0.5rem;
}
/* Dropdown */
.model-dropdown {
position: relative;
background-color: var(--bg-statusline1);
padding: 0.5rem;
border-radius: 0.5rem;
cursor: pointer;
}
.options {
position: absolute;
top: 100%;
left: 50%;
transform: translateX(-50%);
width: 240px;
z-index: 9999;
background-color: var(--bg-statusline1);
color: var(--fg0);
box-shadow: 0 4px 8px rgba(0,0,0,0.25);
border-radius: 0.5rem;
max-height: 15rem;
overflow-y: auto;
display: none;
}
.options.show {
display: block;
}
.options div {
padding: 0.5rem;
text-align: center;
cursor: pointer;
}
.options div:hover {
background-color: var(--blue);
color: var(--fg1);
font-weight: 600;
}
/* Scrollbar WebKit */
.options::-webkit-scrollbar {
width: 8px;
}
.options::-webkit-scrollbar-track {
background-color: var(--bg-statusline1);
border-radius: 0.25rem;
}
.options::-webkit-scrollbar-thumb {
background-color: var(--fg1); /* Using a color from the palette for base */
border-radius: 4px;
border: 2px solid var(--bg-statusline1);
}
.options::-webkit-scrollbar-thumb:hover {
background-color: var(--blue); /* Switched to a themed color for hover */
}
/* Loader */
.loader {
display: flex;
justify-content: center;
align-items: center;
flex-direction: row;
gap: 4px;
margin-top: 4px;
}
.dot {
width: 8px;
height: 8px;
background-color: var(--aqua);
border-radius: 50%;
animation: bounce 1.4s infinite ease-in-out both;
}
.dot:nth-child(2) {
animation-delay: 0.15s;
}
.dot:nth-child(3) {
animation-delay: 0.3s;
}
@keyframes bounce {
0%, 80%, 100% { transform: scale(0); }
40% { transform: scale(1); }
}
/* Footer */
footer {
margin-top: 1rem;
padding-top: 1rem;
font-size: 0.875rem;
color: var(--fg1);
opacity: 0.7;
}
/* Chat Scrollable Container */
#chatContainer {
flex: 1;
overflow-y: auto;
padding: 1rem;
background-color: var(--bg1);
border-radius: 0.5rem;
display: flex;
flex-direction: column;
gap: 1rem;
height: 100%;
}
/* Message Alignment */
.message-wrapper {
display: flex;
width: 100%;
}
.message-wrapper.user {
justify-content: flex-end;
}
.message-wrapper.bot {
justify-content: flex-start;
}
.message-bubble {
max-width: 80%;
padding: 0.75rem 1rem;
border-radius: 0.5rem;
box-shadow: 0 2px 6px rgba(0,0,0,0.1);
white-space: pre-wrap;
word-break: break-word;
}
.user .message-bubble {
background-color: var(--blue);
color: var(--fg0);
}
.bot .message-bubble {
background-color: var(--green);
color: var(--fg0);
}/* Code Block Styling */
.code-block {
background-color: var(--bg1);
color: var(--fg0);
padding: 1rem;
border-radius: 0.5rem;
overflow-x: auto;
border: 1px solid var(--blue);
font-family: monospace;
text-align: left; /* Ensure code is left-aligned */
white-space: pre; /* Preserve indentation and spacing */
}
/* Scrollbar Styling for All Scrollable Elements */
::-webkit-scrollbar {
width: 8px;
}
::-webkit-scrollbar-track {
background-color: var(--bg-statusline1);
border-radius: 0.25rem;
}
::-webkit-scrollbar-thumb {
background-color: var(--fg1); /* Using a color from the palette for base */
border-radius: 4px;
border: 2px solid var(--bg-statusline1);
}
::-webkit-scrollbar-thumb:hover {
background-color: var(--blue); /* Switched to a themed color for hover */
}