jan/web/app/globals.css
NamH 84dd54a98c
Fix/250 (#349)
* fix(UI): #250 better chat left side bar

Signed-off-by: James <james@jan.ai>
Co-authored-by: James <james@jan.ai>
2023-10-15 07:46:15 -07:00

430 lines
8.9 KiB
CSS

@tailwind base;
@tailwind components;
@tailwind utilities;
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap");
@import "./code-block.css";
:root {
/* Your default theme */
--background: white;
--foreground: black;
--gray-50: #f7f7f8;
--gray-100: #ececf1;
--gray-300: #c5c5d2;
--gray-500: #8e8ea0;
}
[data-theme="dark"] {
--background: rgb(55 65 81);
--foreground: white;
--text-primary: var(--gray-100);
--text-secondary: var(--gray-300);
--text-tertiary: var(--gray-500);
}
@layer base {
body {
@apply dark:bg-gray-900 dark:text-white;
}
}
body {
font-family: "Inter", sans-serif;
color: rgb(var(--foreground-rgb));
background: linear-gradient(
to bottom,
transparent,
rgb(var(--background-end-rgb))
)
rgb(var(--background-start-rgb));
overflow: hidden;
height: 100vh;
}
.hidden-text {
display: -webkit-box;
-webkit-line-clamp: 1;
-webkit-box-orient: vertical;
overflow: hidden;
text-overflow: ellipsis;
}
.hidden-text-model {
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
overflow: hidden;
text-overflow: ellipsis;
}
.scroll::-webkit-scrollbar {
width: 4px;
height: 4px;
background: transparent !;
}
.scroll:hover::-webkit-scrollbar-thumb {
background-color: #d1d5db;
}
.scroll::-webkit-scrollbar-thumb {
border-radius: 10px;
}
.scroll::-webkit-scrollbar-track {
background-color: transparent;
border-radius: 10px;
}
.scroll {
scrollbar-gutter: stable;
}
.embla {
--slide-spacing: 1rem;
--slide-size: 100%;
--slide-height: 19rem;
}
.embla__viewport {
overflow: hidden;
}
.embla__container {
backface-visibility: hidden;
display: flex;
touch-action: pan-y;
}
.embla__slide {
flex: 0 0 var(--slide-size);
min-width: 0;
position: relative;
}
.embla__slide__img {
display: block;
height: var(--slide-height);
width: 100%;
object-fit: cover;
}
.embla__slide__number {
width: 4.6rem;
height: 4.6rem;
z-index: 1;
position: absolute;
top: 0.6rem;
right: 0.6rem;
border-radius: 50%;
background-color: rgba(var(--background-site-rgb-value), 0.85);
line-height: 4.6rem;
font-weight: 900;
text-align: center;
pointer-events: none;
}
.embla__slide__number > span {
color: var(--brand-primary);
background-image: linear-gradient(
45deg,
var(--brand-primary),
var(--brand-secondary)
);
background-clip: text;
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
font-size: 1.6rem;
display: block;
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
}
.embla__button {
-webkit-appearance: none;
background-color: transparent;
touch-action: manipulation;
display: inline-flex;
text-decoration: none;
cursor: pointer;
border: 0;
padding: 0;
margin: 0;
}
.embla__buttons {
display: flex;
justify-content: space-between;
align-items: center;
position: absolute;
top: 50%;
transform: translateY(-50%);
padding: 27.44px;
left: 0;
width: 100%;
}
.embla__button {
z-index: 1;
color: var(--background-site);
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
padding: 10px;
border-radius: 12px;
gap: 10px;
background-color: white;
}
.embla__button:disabled {
opacity: 0;
}
.embla__button__svg {
width: 65%;
height: 65%;
}
/* TODO: Move to a separated css later */
/* Typography Utilities */
@layer utilities {
/* Regular */
.text-xs-regular {
/* text-xs/leading-4/font-normal */
font-family: Inter;
font-size: 12px;
font-style: normal;
font-weight: 400;
line-height: 16px; /* 133.333% */
}
.text-sm-regular {
/* text-sm/leading-5/font-normal */
font-family: Inter;
font-size: 14px;
font-style: normal;
font-weight: 400;
line-height: 20px; /* 142.857% */
}
.text-base-regular {
/* text-base/leading-6/font-normal */
font-family: Inter;
font-size: 16px;
font-style: normal;
font-weight: 400;
line-height: 24px; /* 150% */
}
.text-lg-regular {
/* text-lg/leading-7/font-normal */
font-family: Inter;
font-size: 18px;
font-style: normal;
font-weight: 400;
line-height: 28px; /* 155.556% */
}
.text-xl-regular {
/* text-xl/leading-7/font-normal */
font-family: Inter;
font-size: 20px;
font-style: normal;
font-weight: 400;
line-height: 28px; /* 140% */
}
.text-2xl-regular {
/* text-2xl/leading-8/font-normal */
font-family: Inter;
font-size: 24px;
font-style: normal;
font-weight: 400;
line-height: 32px; /* 133.333% */
}
.text-3xl-regular {
/* text-3xl/leading-9/font-normal */
font-family: Inter;
font-size: 30px;
font-style: normal;
font-weight: 400;
line-height: 36px; /* 120% */
}
.text-4xl-regular {
/* text-4xl/leading-10/font-normal */
font-family: Inter;
font-size: 36px;
font-style: normal;
font-weight: 400;
line-height: 40px; /* 111.111% */
}
/* Medium */
.text-xs-medium {
/* text-xs/leading-4/font-normal */
font-family: Inter;
font-size: 12px;
font-style: normal;
font-weight: 500;
line-height: 16px; /* 133.333% */
}
.text-sm-medium {
/* text-sm/leading-5/font-normal */
font-family: Inter;
font-size: 14px;
font-style: normal;
font-weight: 500;
line-height: 20px; /* 142.857% */
}
.text-base-medium {
/* text-base/leading-6/font-normal */
font-family: Inter;
font-size: 16px;
font-style: normal;
font-weight: 500;
line-height: 24px; /* 150% */
}
.text-lg-medium {
/* text-lg/leading-7/font-normal */
font-family: Inter;
font-size: 18px;
font-style: normal;
font-weight: 500;
line-height: 28px; /* 155.556% */
}
.text-xl-medium {
/* text-xl/leading-7/font-normal */
font-family: Inter;
font-size: 20px;
font-style: normal;
font-weight: 500;
line-height: 28px; /* 140% */
}
.text-2xl-medium {
/* text-2xl/leading-8/font-normal */
font-family: Inter;
font-size: 24px;
font-style: normal;
font-weight: 500;
line-height: 32px; /* 133.333% */
}
.text-3xl-medium {
/* text-3xl/leading-9/font-normal */
font-family: Inter;
font-size: 30px;
font-style: normal;
font-weight: 500;
line-height: 36px; /* 120% */
}
.text-4xl-medium {
/* text-4xl/leading-10/font-normal */
font-family: Inter;
font-size: 36px;
font-style: normal;
font-weight: 500;
line-height: 40px; /* 111.111% */
}
/* Semibold */
.text-xs-semibold {
/* text-xs/leading-4/font-normal */
font-family: Inter;
font-size: 12px;
font-style: normal;
font-weight: 600;
line-height: 16px; /* 133.333% */
}
.text-sm-semibold {
/* text-sm/leading-5/font-normal */
font-family: Inter;
font-size: 14px;
font-style: normal;
font-weight: 600;
line-height: 20px; /* 142.857% */
}
.text-base-semibold {
/* text-base/leading-6/font-normal */
font-family: Inter;
font-size: 16px;
font-style: normal;
font-weight: 600;
line-height: 24px; /* 150% */
}
.text-lg-semibold {
/* text-lg/leading-7/font-normal */
font-family: Inter;
font-size: 18px;
font-style: normal;
font-weight: 600;
line-height: 28px; /* 155.556% */
}
.text-xl-semibold {
/* text-xl/leading-7/font-normal */
font-family: Inter;
font-size: 20px;
font-style: normal;
font-weight: 600;
line-height: 28px; /* 140% */
}
.text-2xl-semibold {
/* text-2xl/leading-8/font-normal */
font-family: Inter;
font-size: 24px;
font-style: normal;
font-weight: 600;
line-height: 32px; /* 133.333% */
}
.text-3xl-semibold {
/* text-3xl/leading-9/font-normal */
font-family: Inter;
font-size: 30px;
font-style: normal;
font-weight: 600;
line-height: 36px; /* 120% */
}
.text-4xl-semibold {
/* text-4xl/leading-10/font-normal */
font-family: Inter;
font-size: 36px;
font-style: normal;
font-weight: 600;
line-height: 40px; /* 111.111% */
}
}
/* Typing indicator */
.typingIndicatorContainer {
display: flex;
flex: none;
align-items: flex-end;
margin: 4 0;
}
.typingIndicatorBubble {
display: flex;
align-items: center;
justify-content: center;
width: 52px;
height: 28px;
margin: 0px 8px;
background-color: #f0f1f1;
border-radius: 12px;
}
.typingIndicatorBubbleDot {
width: 4px;
height: 4px;
margin-right: 4px;
background-color: #57585a;
border-radius: 50%;
animation-name: bounce;
animation-duration: 1.3s;
animation-timing-function: linear;
animation-iteration-count: infinite;
}
.typingIndicatorBubbleDot:first-of-type {
margin: 0px 4px;
}
.typingIndicatorBubbleDot:nth-of-type(2) {
animation-delay: 0.15s;
}
.typingIndicatorBubbleDot:nth-of-type(3) {
animation-delay: 0.3s;
}
@keyframes bounce {
0%,
60%,
100% {
transform: translateY(0);
}
30% {
transform: translateY(-4px);
}
}