2023-01-04 18:50:51 +00:00
|
|
|
/*
|
|
|
|
|
|
|
|
This CSS file will be included with your plugin, and
|
|
|
|
available in the app when your plugin is enabled.
|
|
|
|
|
|
|
|
If your plugin does not need CSS, delete this file.
|
|
|
|
|
|
|
|
*/
|
2023-03-28 11:04:27 +00:00
|
|
|
|
|
|
|
:root {
|
2023-11-28 22:09:57 +00:00
|
|
|
--khoj-winter-sun: #f9f5de;
|
|
|
|
--khoj-sun: #fee285;
|
|
|
|
--khoj-storm-grey: #475569;
|
2023-07-01 08:16:23 +00:00
|
|
|
}
|
2023-03-28 11:04:27 +00:00
|
|
|
|
|
|
|
.khoj-chat {
|
|
|
|
display: grid;
|
2023-03-28 11:49:28 +00:00
|
|
|
background: var(--background-primary);
|
|
|
|
color: var(--text-normal);
|
2023-03-28 11:04:27 +00:00
|
|
|
text-align: center;
|
|
|
|
font-family: roboto, karma, segoe ui, sans-serif;
|
2023-03-29 15:12:11 +00:00
|
|
|
font-size: var(--font-ui-large);
|
2023-03-28 11:04:27 +00:00
|
|
|
font-weight: 300;
|
|
|
|
line-height: 1.5em;
|
|
|
|
}
|
|
|
|
.khoj-chat > * {
|
|
|
|
padding: 10px;
|
|
|
|
margin: 10px;
|
|
|
|
}
|
|
|
|
|
2023-03-28 11:49:28 +00:00
|
|
|
#khoj-chat-title {
|
2023-03-28 11:04:27 +00:00
|
|
|
font-weight: 200;
|
2023-11-28 22:09:57 +00:00
|
|
|
color: var(--khoj-sun);
|
2023-03-28 11:04:27 +00:00
|
|
|
}
|
|
|
|
|
2023-03-28 11:49:28 +00:00
|
|
|
#khoj-chat-body {
|
2023-03-29 15:12:11 +00:00
|
|
|
font-size: var(--font-ui-medium);
|
2023-03-28 11:04:27 +00:00
|
|
|
margin: 0px;
|
|
|
|
line-height: 20px;
|
|
|
|
overflow-y: scroll; /* Make chat body scroll to see history */
|
|
|
|
}
|
|
|
|
/* add chat metatdata to bottom of bubble */
|
2023-03-28 11:49:28 +00:00
|
|
|
.khoj-chat-message::after {
|
2023-03-28 11:04:27 +00:00
|
|
|
content: attr(data-meta);
|
|
|
|
display: block;
|
2023-03-29 15:12:11 +00:00
|
|
|
font-size: var(--font-ui-smaller);
|
2023-03-28 11:49:28 +00:00
|
|
|
color: var(--text-muted);
|
2023-03-28 11:04:27 +00:00
|
|
|
margin: -12px 7px 0 -5px;
|
|
|
|
}
|
|
|
|
/* move message by khoj to left */
|
2023-03-28 11:49:28 +00:00
|
|
|
.khoj-chat-message.khoj {
|
2023-03-28 11:04:27 +00:00
|
|
|
margin-left: auto;
|
|
|
|
text-align: left;
|
|
|
|
}
|
|
|
|
/* move message by you to right */
|
2023-03-28 11:49:28 +00:00
|
|
|
.khoj-chat-message.you {
|
2023-03-28 11:04:27 +00:00
|
|
|
margin-right: auto;
|
|
|
|
text-align: right;
|
|
|
|
}
|
|
|
|
/* basic style chat message text */
|
2023-03-28 11:49:28 +00:00
|
|
|
.khoj-chat-message-text {
|
2023-03-28 11:04:27 +00:00
|
|
|
margin: 10px;
|
|
|
|
border-radius: 10px;
|
|
|
|
padding: 10px;
|
|
|
|
position: relative;
|
|
|
|
display: inline-block;
|
|
|
|
max-width: 80%;
|
|
|
|
text-align: left;
|
|
|
|
}
|
|
|
|
/* color chat bubble by khoj blue */
|
2023-03-28 11:49:28 +00:00
|
|
|
.khoj-chat-message-text.khoj {
|
2023-11-28 22:09:57 +00:00
|
|
|
color: var(--khoj-storm-grey);
|
|
|
|
background: var(--khoj-winter-sun);
|
2023-03-28 11:04:27 +00:00
|
|
|
margin-left: auto;
|
|
|
|
white-space: pre-line;
|
|
|
|
}
|
|
|
|
/* add left protrusion to khoj chat bubble */
|
2023-03-28 11:49:28 +00:00
|
|
|
.khoj-chat-message-text.khoj:after {
|
2023-03-28 11:04:27 +00:00
|
|
|
content: '';
|
|
|
|
position: absolute;
|
|
|
|
bottom: -2px;
|
|
|
|
left: -7px;
|
|
|
|
border: 10px solid transparent;
|
2023-11-28 22:09:57 +00:00
|
|
|
border-top-color: var(--khoj-winter-sun);
|
2023-03-28 11:04:27 +00:00
|
|
|
border-bottom: 0;
|
|
|
|
transform: rotate(-60deg);
|
|
|
|
}
|
|
|
|
/* color chat bubble by you dark grey */
|
2023-03-28 11:49:28 +00:00
|
|
|
.khoj-chat-message-text.you {
|
|
|
|
color: var(--text-on-accent);
|
2023-11-28 22:09:57 +00:00
|
|
|
background: var(--khoj-storm-grey);
|
2023-03-28 11:04:27 +00:00
|
|
|
margin-right: auto;
|
|
|
|
}
|
|
|
|
/* add right protrusion to you chat bubble */
|
2023-03-28 11:49:28 +00:00
|
|
|
.khoj-chat-message-text.you:after {
|
2023-03-28 11:04:27 +00:00
|
|
|
content: '';
|
|
|
|
position: absolute;
|
|
|
|
top: 91%;
|
|
|
|
right: -2px;
|
|
|
|
border: 10px solid transparent;
|
2023-11-28 22:09:57 +00:00
|
|
|
border-left-color: var(--khoj-storm-grey);
|
2023-03-28 11:04:27 +00:00
|
|
|
border-right: 0;
|
|
|
|
margin-top: -10px;
|
|
|
|
transform: rotate(-60deg)
|
|
|
|
}
|
|
|
|
|
2023-03-28 11:49:28 +00:00
|
|
|
#khoj-chat-footer {
|
2023-03-28 11:04:27 +00:00
|
|
|
padding: 0;
|
|
|
|
display: grid;
|
|
|
|
grid-template-columns: minmax(70px, 100%);
|
|
|
|
grid-column-gap: 10px;
|
|
|
|
grid-row-gap: 10px;
|
|
|
|
}
|
2023-11-26 05:34:01 +00:00
|
|
|
.khoj-input-row {
|
|
|
|
display: grid;
|
2023-11-26 13:47:49 +00:00
|
|
|
grid-template-columns: auto 32px 32px;
|
2023-11-26 05:34:01 +00:00
|
|
|
grid-column-gap: 10px;
|
|
|
|
grid-row-gap: 10px;
|
|
|
|
background: var(--background-primary);
|
2023-03-28 11:04:27 +00:00
|
|
|
}
|
2023-03-28 11:49:28 +00:00
|
|
|
#khoj-chat-input.option:hover {
|
|
|
|
box-shadow: 0 0 11px var(--background-modifier-box-shadow);
|
2023-03-28 11:04:27 +00:00
|
|
|
}
|
2023-03-28 11:49:28 +00:00
|
|
|
#khoj-chat-input {
|
2023-03-29 15:12:11 +00:00
|
|
|
font-size: var(--font-ui-medium);
|
|
|
|
padding: 25px 20px;
|
2023-03-28 11:49:28 +00:00
|
|
|
}
|
2023-11-26 05:34:01 +00:00
|
|
|
.khoj-input-row-button {
|
|
|
|
background: var(--background-primary);
|
|
|
|
border: none;
|
|
|
|
border-radius: 5px;
|
|
|
|
padding: 5px;
|
|
|
|
--icon-size: var(--icon-size);
|
|
|
|
height: auto;
|
|
|
|
font-size: 14px;
|
|
|
|
font-weight: 300;
|
|
|
|
line-height: 1.5em;
|
|
|
|
cursor: pointer;
|
|
|
|
transition: background 0.3s ease-in-out;
|
|
|
|
}
|
|
|
|
.khoj-input-row-button:hover {
|
|
|
|
background: var(--background-modifier-hover);
|
|
|
|
}
|
|
|
|
.khoj-input-row-button:active {
|
|
|
|
background: var(--background-modifier-active);
|
|
|
|
}
|
2023-03-28 11:04:27 +00:00
|
|
|
|
|
|
|
@media (pointer: coarse), (hover: none) {
|
2023-03-28 11:49:28 +00:00
|
|
|
#khoj-chat-body.abbr[title] {
|
2023-03-28 11:04:27 +00:00
|
|
|
position: relative;
|
|
|
|
padding-left: 4px; /* space references out to ease tapping */
|
|
|
|
}
|
2023-03-28 11:49:28 +00:00
|
|
|
#khoj-chat-body.abbr[title]:focus:after {
|
2023-03-28 11:04:27 +00:00
|
|
|
content: attr(title);
|
|
|
|
|
|
|
|
/* position tooltip */
|
|
|
|
position: absolute;
|
|
|
|
left: 16px; /* open tooltip to right of ref link, instead of on top of it */
|
|
|
|
width: auto;
|
|
|
|
z-index: 1; /* show tooltip above chat messages */
|
|
|
|
|
|
|
|
/* style tooltip */
|
2023-03-28 11:49:28 +00:00
|
|
|
background-color: var(--background-secondary);
|
|
|
|
color: var(--text-muted);
|
2023-03-28 11:04:27 +00:00
|
|
|
border-radius: 2px;
|
2023-03-28 11:49:28 +00:00
|
|
|
box-shadow: 1px 1px 4px 0 var(--background-modifier-box-shadow);
|
2023-03-29 15:12:11 +00:00
|
|
|
font-size: var(--font-ui-small);
|
2023-03-28 11:04:27 +00:00
|
|
|
padding: 2px 4px;
|
|
|
|
}
|
|
|
|
}
|
2023-03-29 20:32:24 +00:00
|
|
|
|
|
|
|
.khoj-result-file {
|
|
|
|
font-weight: 600;
|
2023-06-18 11:51:25 +00:00
|
|
|
}
|
2023-03-29 20:32:24 +00:00
|
|
|
|
2023-06-18 11:51:25 +00:00
|
|
|
.khoj-result-entry {
|
2023-03-29 20:32:24 +00:00
|
|
|
color: var(--text-muted);
|
|
|
|
margin-left: 2em;
|
|
|
|
padding-left: 0.5em;
|
|
|
|
line-height: normal;
|
|
|
|
margin-top: 0.2em;
|
|
|
|
margin-bottom: 0.2em;
|
|
|
|
border-left-style: solid;
|
|
|
|
border-left-color: var(--color-accent-2);
|
|
|
|
white-space: normal;
|
2023-06-18 11:51:25 +00:00
|
|
|
}
|
2023-03-29 20:32:24 +00:00
|
|
|
|
2023-06-18 11:51:25 +00:00
|
|
|
.khoj-result-entry > * {
|
2023-03-29 20:32:24 +00:00
|
|
|
font-size: var(--font-ui-medium);
|
2023-06-18 11:51:25 +00:00
|
|
|
}
|
2023-03-29 20:32:24 +00:00
|
|
|
|
2023-06-18 11:51:25 +00:00
|
|
|
.khoj-result-entry > p {
|
2023-03-29 20:32:24 +00:00
|
|
|
margin-top: 0.2em;
|
|
|
|
margin-bottom: 0.2em;
|
2023-06-18 11:51:25 +00:00
|
|
|
}
|
2023-03-29 20:32:24 +00:00
|
|
|
|
2023-06-18 11:51:25 +00:00
|
|
|
.khoj-result-entry p br {
|
2023-03-29 20:32:24 +00:00
|
|
|
display: none;
|
2023-06-18 11:51:25 +00:00
|
|
|
}
|