534 lines
11 KiB
SCSS
534 lines
11 KiB
SCSS
html {
|
|
/* Scrollbar */
|
|
/* TODO: Update these to use bulma's scss variables, not css vars. */
|
|
--scrollbarBG: transparent;
|
|
--thumbBG: hsl(0, 0%, 60%); /* scollbar color light */
|
|
/* Back-ground */
|
|
--BgColorDark: hsl(228, 10%, 10%);
|
|
--BgColorLight: hsl(0, 0%, 100%);
|
|
// --BgColorSidebarDark: rgb(28, 30, 36);
|
|
--BgColorSidebarDark: rgb(16, 17, 22);
|
|
--BgColorSidebarLight: hsla(0, 0%, 93%, 0.354);
|
|
// Tool drawer for messages
|
|
--chatToolDrawerSize: 40px;
|
|
--chatToolDrawerColor: var(--BgColorSidebarLight);
|
|
|
|
/* Sizes */
|
|
--sidebarTop: 0px;
|
|
--sidebarWidth: max(300px, 20%);
|
|
--mainContentWidth: calc(100% - var(--sidebarWidth));
|
|
|
|
--sectionPaddingTop: 0px;
|
|
|
|
--chatContentPaddingTop: 20px;
|
|
--chatContentPaddingRight: 40px;
|
|
--chatContentPaddingBottom: 130px;
|
|
--chatContentPaddingLeft: 40px;
|
|
|
|
--chatInputPaddingTop: 0px;
|
|
--chatInputPaddingRight: 60px;
|
|
--chatInputPaddingBottom: 10px;
|
|
--chatInputPaddingLeft: 60px;
|
|
|
|
--BgColor: var(-BgColorLight) /* leave this */
|
|
}
|
|
|
|
.navbar {
|
|
display: none !important;
|
|
}
|
|
|
|
@media (prefers-color-scheme: dark) {
|
|
html {
|
|
--thumbBG: #3f3f3f; /* scrollbar color dark */
|
|
--BgColor: var(-BgColorDark);
|
|
--chatToolDrawerColor: var(--BgColorSidebarDark);
|
|
}
|
|
}
|
|
|
|
@media only screen and (max-width: 900px) {
|
|
html {
|
|
--sidebarWidth: max(250px, 20%);
|
|
|
|
--chatContentPaddingTop: 50px;
|
|
--chatContentPaddingRight: 20px;
|
|
--chatContentPaddingLeft: 20px;
|
|
|
|
--chatInputPaddingRight: 30px;
|
|
--chatInputPaddingLeft: 30px;
|
|
}
|
|
|
|
}
|
|
|
|
@media only screen and (max-width: 768px) {
|
|
.navbar {
|
|
display: block !important;
|
|
}
|
|
html {
|
|
--BgColorSidebarLight: hsl(210, 12%, 97%);
|
|
// --BgColorSidebarDark: rgb(22, 24, 30);
|
|
--sidebarWidth: max(300px, 20%);
|
|
--mainContentWidth: calc(100%);
|
|
--sidebarTop: 56px;
|
|
--chatInputPaddingRight: 20px;
|
|
--chatInputPaddingLeft: 20px;
|
|
}
|
|
.main-menu .gpt-logo {
|
|
display: none;
|
|
}
|
|
.main-menu .level-right {
|
|
display: flex;
|
|
}
|
|
.main-menu .level-item {
|
|
margin-bottom: inherit !important;
|
|
}
|
|
}
|
|
|
|
|
|
@keyframes rotating {
|
|
from {
|
|
transform: rotate(0deg);
|
|
}
|
|
|
|
to {
|
|
transform: rotate(360deg);
|
|
}
|
|
}
|
|
|
|
#app {
|
|
display: flex;
|
|
flex-direction: column;
|
|
flex-grow: 1;
|
|
min-height: 100vh;
|
|
|
|
section.section.root-section {
|
|
flex-grow: 1;
|
|
}
|
|
}
|
|
|
|
.is-disabled {
|
|
pointer-events: none;
|
|
cursor: default;
|
|
opacity: .65;
|
|
}
|
|
|
|
.rotate {
|
|
animation: rotating 10s linear infinite;
|
|
}
|
|
|
|
.greyscale {
|
|
filter: grayscale(100%);
|
|
}
|
|
|
|
.user-message {
|
|
max-width: 90%;
|
|
margin-right: 0;
|
|
margin-left: auto;
|
|
width: fit-content;
|
|
}
|
|
|
|
.assistant-message {
|
|
max-width: 90%;
|
|
width: fit-content;
|
|
}
|
|
|
|
/* Show the edit button on hover of the user message */
|
|
.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 */
|
|
.user-message>.message-body {
|
|
border-width: 0 4px 0 0 !important;
|
|
}
|
|
|
|
/* Show the edit button on hover of the chat name */
|
|
.chat-header:hover .editbutton {
|
|
display: inline !important;
|
|
text-decoration: none !important;
|
|
}
|
|
|
|
/* Style the chat input */
|
|
.chat-input {
|
|
overflow-y: hidden;
|
|
resize: vertical;
|
|
}
|
|
|
|
$footer-padding: 1.5rem 1.5rem;
|
|
$fullhd: 2000px;
|
|
$modal-content-width: 1000px;
|
|
|
|
@import "/node_modules/bulma/bulma.sass";
|
|
|
|
/* Pulsing effect - background goes to red color and back */
|
|
.is-pulse {
|
|
animation: pulse 1s infinite;
|
|
}
|
|
|
|
@keyframes pulse {
|
|
0% {
|
|
background-color: initial;
|
|
/* Default color */
|
|
}
|
|
|
|
50% {
|
|
background-color: $danger;
|
|
/* Red */
|
|
}
|
|
|
|
100% {
|
|
background-color: initial
|
|
/* Default color */
|
|
}
|
|
}
|
|
|
|
/* Support for dark mode */
|
|
$modal-background-background-color-dark: rgba($dark, 0.86) !default; // remove this once a new version of bulma-prefers-dark is released
|
|
@import "/node_modules/bulma-prefers-dark/build/bulma-prefers-dark.sass";
|
|
|
|
/* For the message notes on light mode */
|
|
.message-note, .running-totals {
|
|
opacity: 0.7;
|
|
}
|
|
|
|
@media (prefers-color-scheme: dark) {
|
|
/* For the message notes on dark mode */
|
|
.message-note, .running-totals {
|
|
opacity: 0.5;
|
|
}
|
|
.modal-card-body {
|
|
// remove this once https: //github.com/jloh/bulma-prefers-dark/pull/90 is merged and released
|
|
background-color: $background-dark;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/* Support for copy code button */
|
|
.code-block>button {
|
|
position: absolute;
|
|
top: 0.5rem;
|
|
right: 0.5rem;
|
|
}
|
|
|
|
/* Make menu stick on the left side */
|
|
.menu {
|
|
position: sticky;
|
|
top: 1rem;
|
|
}
|
|
|
|
/* Delete button on side menu chat name */
|
|
.menu-list {
|
|
a:hover {
|
|
.delete-button {
|
|
display: block !important;
|
|
background-color: initial;
|
|
}
|
|
}
|
|
}
|
|
|
|
/* Loading chat messages */
|
|
.is-loading {
|
|
opacity: 0.5;
|
|
@include loader;
|
|
width: 1.5rem;
|
|
height: 1.5rem;
|
|
border-width: 0.25em;
|
|
display: inline-block;
|
|
}
|
|
|
|
/* Support for fullwidth dropdowns, see https://github.com/jgthms/bulma/issues/2055 */
|
|
.dropdown.is-fullwidth {
|
|
display: flex;
|
|
|
|
.dropdown-trigger, .dropdown-menu {
|
|
width: 100%;
|
|
}
|
|
}
|
|
|
|
/* Bulma layout hacks */
|
|
|
|
.chat-option-menu.navbar-item {
|
|
margin-left: auto;
|
|
}
|
|
|
|
/* temp. fix to keep navbar from getting huge on small screen devices
|
|
if the right menu is put in the proper navbar-end container */
|
|
.navbar-brand {
|
|
/* margin-right: 0; */
|
|
width: 100%;
|
|
}
|
|
|
|
.dropdown-item .menu-icon {
|
|
padding-right: .5em;
|
|
}
|
|
.dropdown-menu .dropdown-content {
|
|
max-height: calc(100vh - 60px);
|
|
overflow-y: auto;
|
|
}
|
|
|
|
@media only screen and (max-width: 768px) {
|
|
.main-menu .dropdown-menu .dropdown-content {
|
|
max-height: calc(100vh - 112px);
|
|
}
|
|
.main-menu {
|
|
display: none;
|
|
}
|
|
.main-menu.pinned {
|
|
display: block;
|
|
}
|
|
}
|
|
|
|
.chat-menu-item {
|
|
position: relative;
|
|
}
|
|
.chat-menu-item span {
|
|
display: block;
|
|
white-space:nowrap;
|
|
overflow: hidden;
|
|
-webkit-mask-image: linear-gradient(to right, rgba(0,0,0,1) 75%, rgba(0,0,0,0));
|
|
mask-image: linear-gradient(to right, rgba(0,0,0,1) 75%, rgba(0,0,0,0));
|
|
}
|
|
.chat-menu-item .delete-button {
|
|
position: absolute;
|
|
right: .4em;
|
|
z-index: 200;
|
|
}
|
|
|
|
/* Overrides for main layout */
|
|
|
|
.column.side-bar-column {
|
|
width: var(--sidebarWidth);
|
|
}
|
|
|
|
.column.main-content-column {
|
|
width: var(--mainContentWidth)
|
|
}
|
|
|
|
section.section.root-section {
|
|
padding: 0px;
|
|
padding-top: var(--sectionPaddingTop);
|
|
}
|
|
|
|
aside.menu.main-menu {
|
|
z-index:1;
|
|
position: fixed;
|
|
width: var(--sidebarWidth);
|
|
padding-right: 20px;
|
|
top: var(--sidebarTop);
|
|
bottom:0px;
|
|
}
|
|
|
|
aside.menu.main-menu .menu-expanse {
|
|
display: flex;
|
|
flex-flow: column;
|
|
height: 100%;
|
|
background-color: var(--BgColorSidebarLight);
|
|
box-shadow: 5px 0px 0px var(--BgColorSidebarLight);
|
|
}
|
|
|
|
.menu-expanse
|
|
.menu-label, .menu-expanse
|
|
.menu-list {
|
|
flex: 0 1 auto;
|
|
}
|
|
|
|
.menu-expanse
|
|
.menu-expansion-list {
|
|
flex: 1 1 auto;
|
|
overflow-y: auto;
|
|
}
|
|
|
|
.default-text {
|
|
color: hsl(0, 0%, 21%) !important;
|
|
}
|
|
|
|
.lower-mask, .lower-mask2 {
|
|
display: block;
|
|
position: fixed;
|
|
bottom: 0px;
|
|
height: var(--chatContentPaddingBottom) ;
|
|
width: 100%;
|
|
background-image: linear-gradient(180deg,hsla(0,0%,100%,0) 13.94%, var(--BgColorLight) 54.73%);
|
|
}
|
|
|
|
|
|
@media (prefers-color-scheme: dark) {
|
|
.default-text {
|
|
color: rgb(181, 181, 181) !important;
|
|
}
|
|
.lower-mask, .lower-mask2 {
|
|
background-image: linear-gradient(180deg,hsla(0,0%,100%,0) 13.94%, var(--BgColorDark) 54.73%);
|
|
}
|
|
aside.menu.main-menu .menu-expanse {
|
|
background-color: var(--BgColorSidebarDark);
|
|
box-shadow: 5px 0px 0px var(--BgColorSidebarDark);
|
|
}
|
|
}
|
|
*::-webkit-scrollbar {
|
|
width: 11px;
|
|
}
|
|
*::-webkit-scrollbar-track {
|
|
background: var(--scrollbarBG);
|
|
}
|
|
*::-webkit-scrollbar-thumb {
|
|
background-color: var(--thumbBG) ;
|
|
border-radius: 6px;
|
|
border: 3px solid var(--scrollbarBG);
|
|
}
|
|
* {
|
|
scrollbar-width: thin;
|
|
scrollbar-color: var(--thumbBG) var(--scrollbarBG);
|
|
}
|
|
|
|
.chat-content {
|
|
padding:
|
|
var(--chatContentPaddingTop)
|
|
var(--chatContentPaddingRight)
|
|
var(--chatContentPaddingBottom)
|
|
var(--chatContentPaddingLeft) ;
|
|
}
|
|
|
|
.chat-focus-point {
|
|
width: 100%;
|
|
height: 1px;
|
|
/* Bulma does something strange where scrolling to the end of the body
|
|
or html doesn't actually scroll to the bottom of the page
|
|
this -.75rem, then scroll to the bottom of this works, but I don't like it.*/
|
|
margin-bottom: -.75rem;
|
|
}
|
|
|
|
.prompt-input-container {
|
|
position: fixed;
|
|
bottom: 0px;
|
|
width: var(--mainContentWidth);
|
|
|
|
padding:
|
|
var(--chatInputPaddingTop)
|
|
var(--chatInputPaddingRight)
|
|
var(--chatInputPaddingBottom)
|
|
var(--chatInputPaddingLeft);
|
|
}
|
|
|
|
.content.running-total-container {
|
|
min-height:1em;
|
|
// padding-bottom:.6em;
|
|
// /* padding-left: 1.9em; */
|
|
margin-bottom: .5em;
|
|
}
|
|
|
|
.content.credit-footer {
|
|
margin-bottom: 1em;
|
|
}
|
|
|
|
.side-actions {
|
|
margin: 5px;
|
|
}
|
|
|
|
.main-menu .gpt-logo .icon {
|
|
display: inline-block;
|
|
margin-top: 8px;
|
|
margin-left: 8px;
|
|
}
|
|
|
|
.message-body {
|
|
z-index: 1;
|
|
}
|
|
.message-note {
|
|
padding-top: .6em;
|
|
margin-bottom: -0.6em;
|
|
}
|
|
.message-edit {
|
|
display: block;
|
|
}
|
|
.message-editor {
|
|
white-space: pre-wrap;
|
|
min-width: 60px;
|
|
min-height: 30px;
|
|
}
|
|
.message-display {
|
|
min-width: 60px;
|
|
min-height: 1.3em;
|
|
}
|
|
.button-pack .button {
|
|
display: block;
|
|
margin: 4px;
|
|
// border-radius: 10px;
|
|
opacity: .6;
|
|
}
|
|
.button-pack .button:hover {
|
|
opacity: 1;
|
|
}
|
|
.assistant-message .button-pack {
|
|
right: auto;
|
|
left: -20px;
|
|
}
|
|
.chat-message.message {
|
|
position: relative;
|
|
transition: 0.3s;
|
|
}
|
|
|
|
// .chat-message.message:hover .button-pack, article.message:focus .button-pack {
|
|
// display: block;
|
|
// }
|
|
.chat-message.summarized {
|
|
opacity: 0.6;
|
|
}
|
|
.tool-drawer, .tool-drawer-mask {
|
|
position: absolute;
|
|
visibility: hidden;
|
|
width: 0%;
|
|
top: 0px;
|
|
min-height: 100%;
|
|
max-height: 100%;
|
|
overflow: hidden;
|
|
margin: 0px;
|
|
padding: 0px;
|
|
transition: 0.1s;
|
|
background-color: var(--chatToolDrawerColor);
|
|
border-radius: 4px;
|
|
}
|
|
.tool-drawer-mask {
|
|
border-radius: 0px 4px 4px 0px;
|
|
}
|
|
.user-message .tool-drawer-mask {
|
|
border-radius: 4px 0px 0px 4px;
|
|
}
|
|
.assistant-message .tool-drawer, .assistant-message .tool-drawer-mask {
|
|
left:100%;
|
|
}
|
|
.user-message .tool-drawer, .user-message .tool-drawer-mask {
|
|
right:100%;
|
|
}
|
|
.assistant-message:hover .tool-drawer,
|
|
.assistant-message:focus .tool-drawer {
|
|
width: var(--chatToolDrawerSize);
|
|
visibility: visible;
|
|
max-height: 300%;
|
|
}
|
|
.user-message:hover .tool-drawer,
|
|
.user-message:focus .tool-drawer {
|
|
width: var(--chatToolDrawerSize);
|
|
visibility: visible;
|
|
max-height: 300%;
|
|
}
|
|
|
|
.assistant-message:hover .tool-drawer-mask,
|
|
.assistant-message:focus .tool-drawer {
|
|
width: var(--chatToolDrawerSize);
|
|
visibility: visible;
|
|
}
|
|
.user-message:hover .tool-drawer-mask,
|
|
.user-message:focus .tool-drawer {
|
|
width: var(--chatToolDrawerSize);
|
|
visibility: visible;
|
|
}
|
|
.assistant-message:hover, .assistant-message:focus {
|
|
border-top-right-radius: 0px !important;
|
|
border-bottom-right-radius: 0px !important;
|
|
}
|
|
.user-message:hover, .user-message:focus {
|
|
border-top-left-radius: 0px !important;
|
|
border-bottom-left-radius: 0px !important;
|
|
}
|