153 lines
3.9 KiB
Plaintext
153 lines
3.9 KiB
Plaintext
.chat-citation-pills() {
|
|
:deep(.citation) {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
gap: 2px;
|
|
vertical-align: baseline;
|
|
box-sizing: border-box;
|
|
border-radius: 999px;
|
|
padding: 0 5px;
|
|
font-size: 0.72em;
|
|
line-height: 1.45;
|
|
margin: 0 0.06em;
|
|
background-clip: padding-box;
|
|
transform: translateY(-0.04em);
|
|
}
|
|
|
|
:deep(.citation-icon) {
|
|
display: inline-block;
|
|
width: 1em;
|
|
height: 1em;
|
|
flex-shrink: 0;
|
|
background-color: currentColor;
|
|
opacity: 0.68;
|
|
mask-size: contain;
|
|
mask-repeat: no-repeat;
|
|
mask-position: center;
|
|
-webkit-mask-size: contain;
|
|
-webkit-mask-repeat: no-repeat;
|
|
-webkit-mask-position: center;
|
|
}
|
|
|
|
:deep(.citation-icon--book) {
|
|
mask-image: url('@/assets/img/ziliao.svg');
|
|
-webkit-mask-image: url('@/assets/img/ziliao.svg');
|
|
}
|
|
|
|
:deep(.citation-icon--web) {
|
|
mask-image: url('@/assets/img/websearch-globe.svg');
|
|
-webkit-mask-image: url('@/assets/img/websearch-globe.svg');
|
|
}
|
|
|
|
:deep(.citation-text),
|
|
:deep(.citation-domain) {
|
|
line-height: 1.45;
|
|
max-width: 180px;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
}
|
|
|
|
:deep(.citation-kb) {
|
|
background: color-mix(in srgb, var(--td-text-color-primary) 4%, transparent);
|
|
color: color-mix(in srgb, var(--td-text-color-primary) 86%, var(--td-text-color-primary));
|
|
border: 0;
|
|
box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--td-text-color-primary) 10%, transparent);
|
|
cursor: pointer;
|
|
white-space: nowrap;
|
|
position: relative;
|
|
transition: background 0.15s ease, box-shadow 0.15s ease, color 0.15s ease;
|
|
}
|
|
|
|
:deep(.citation-kb:hover) {
|
|
background: color-mix(in srgb, var(--td-text-color-primary) 7%, transparent);
|
|
box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--td-text-color-primary) 18%, transparent);
|
|
color: var(--td-text-color-primary);
|
|
}
|
|
|
|
:deep(.citation-web) {
|
|
background: color-mix(in srgb, var(--td-brand-color) 6%, transparent);
|
|
color: color-mix(in srgb, var(--td-brand-color) 72%, var(--td-text-color-secondary));
|
|
border: 0;
|
|
box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--td-brand-color) 17%, transparent);
|
|
cursor: pointer;
|
|
white-space: nowrap;
|
|
position: relative;
|
|
text-decoration: none;
|
|
transition: background 0.15s ease, box-shadow 0.15s ease, color 0.15s ease;
|
|
}
|
|
|
|
:deep(.citation-web:hover) {
|
|
background: color-mix(in srgb, var(--td-brand-color) 10%, transparent);
|
|
box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--td-brand-color) 28%, transparent);
|
|
color: color-mix(in srgb, var(--td-brand-color) 82%, var(--td-text-color-primary));
|
|
}
|
|
|
|
:deep(.citation-web:focus-visible),
|
|
:deep(.citation-kb:focus-visible) {
|
|
outline: 2px solid var(--td-component-border);
|
|
outline-offset: 2px;
|
|
}
|
|
|
|
:deep(.citation-tip) {
|
|
display: none;
|
|
}
|
|
|
|
:deep(a.wiki-content-link) {
|
|
color: var(--td-brand-color);
|
|
border-bottom: 1px dashed var(--td-brand-color);
|
|
text-decoration: none;
|
|
font-weight: 500;
|
|
transition: border-bottom-style 0.15s ease;
|
|
|
|
&:hover {
|
|
border-bottom-style: solid;
|
|
text-decoration: none !important;
|
|
}
|
|
|
|
&:focus-visible {
|
|
outline: 2px solid var(--td-brand-color);
|
|
outline-offset: 2px;
|
|
border-radius: 2px;
|
|
}
|
|
}
|
|
}
|
|
|
|
.chat-citation-float {
|
|
position: absolute;
|
|
z-index: 10000;
|
|
max-width: 320px;
|
|
padding: 10px 12px;
|
|
border-radius: 8px;
|
|
background: var(--td-bg-color-container);
|
|
box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
|
|
font-size: 12px;
|
|
line-height: 1.5;
|
|
color: var(--td-text-color-primary);
|
|
|
|
&__title {
|
|
font-weight: 600;
|
|
color: var(--td-brand-color);
|
|
margin-bottom: 4px;
|
|
}
|
|
|
|
&__link {
|
|
color: var(--td-brand-color);
|
|
word-break: break-all;
|
|
}
|
|
|
|
&__body {
|
|
max-height: 200px;
|
|
overflow-y: auto;
|
|
white-space: pre-wrap;
|
|
}
|
|
|
|
&__muted,
|
|
&__error {
|
|
color: var(--td-text-color-secondary);
|
|
}
|
|
|
|
&__error {
|
|
color: var(--td-error-color);
|
|
}
|
|
}
|