Skip to content

Commit 43d8cac

Browse files
committed
fixes css
1 parent 5e3d6e5 commit 43d8cac

File tree

6 files changed

+228
-175
lines changed

6 files changed

+228
-175
lines changed

apps/site/.env

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
NEXT_PUBLIC_ORAMA_PROJECT_ID=939d8d74-dbb7-4098-ac46-00325a783e17
2+
NEXT_PUBLIC_ORAMA_API_KEY=p_LQfqxMtf0j8RIpkgohqP0PGZxN7ooPR4XKnqB8ZhojD
3+
NEXT_PUBLIC_ORAMA_DATASOURCE_ID=59bbae6c-07f9-49f7-a062-3de1c7b6e2b6
4+
NEXT_PUBLIC_ORAMA_PUBLIC_PROJECT_ID=939d8d74-dbb7-4098-ac46-00325a783e17
5+
NEXT_PUBLIC_ORAMA_PUBLIC_API_KEY=c1_dRV3iUW4GpJkKffpYXgCEamhWLf$_X9gfYdiVhZkVD4MCr105K0qb$BiGdg

apps/site/components/Common/Searchbox/Chat/ChatInput/index.module.css

Lines changed: 43 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,37 @@
1+
.container {
2+
@apply pb-2;
3+
@apply pt-6;
4+
}
5+
16
.promptWrapperCustom {
27
@apply relative;
8+
@apply mx-8;
9+
@apply flex;
10+
@apply items-center;
11+
@apply gap-2;
12+
@apply rounded-2xl;
13+
@apply border;
14+
@apply border-[rgb(64,64,64)];
15+
@apply bg-[rgb(38,38,38)];
16+
@apply px-4;
17+
@apply py-3;
18+
@apply text-base;
19+
@apply text-white;
320
}
421

522
.promptFieldCustom {
623
font-family: inherit !important;
24+
25+
@apply m-0;
26+
@apply w-full;
27+
@apply resize-none;
28+
@apply border-none;
29+
@apply bg-transparent;
30+
@apply p-0;
31+
@apply font-normal;
32+
@apply leading-relaxed;
33+
@apply text-white;
34+
@apply outline-none;
735
}
836

937
.promptButtonCustom {
@@ -24,19 +52,25 @@
2452
@apply justify-center;
2553
@apply min-h-8;
2654
@apply min-w-8;
27-
}
2855

29-
.promptButtonCustom:hover:not(:disabled) {
30-
@apply bg-green-600;
31-
}
56+
&:hover:not(:disabled) {
57+
@apply bg-green-600;
58+
}
3259

33-
.promptButtonCustom:disabled {
34-
@apply bg-gray-200;
35-
@apply text-gray-500;
36-
@apply cursor-not-allowed;
37-
@apply opacity-60;
60+
&:disabled {
61+
@apply bg-gray-200;
62+
@apply text-gray-500;
63+
@apply cursor-not-allowed;
64+
@apply opacity-60;
65+
}
3866
}
3967

4068
.slidingPanelFooter {
4169
@apply flex;
70+
@apply flex-row;
71+
@apply items-center;
72+
@apply justify-center;
73+
@apply pt-1;
74+
@apply text-xs;
75+
@apply text-neutral-400;
4276
}

apps/site/components/Common/Searchbox/Chat/ChatInput/index.tsx

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,14 @@ export const ChatInput: FC = () => {
1212
const t = useTranslations();
1313

1414
return (
15-
<div className="pb-2 pt-6">
16-
<PromptTextArea.Wrapper
17-
className={`${styles.promptWrapperCustom} mx-8 flex items-center gap-2 rounded-2xl border border-[rgb(64,64,64)] bg-[rgb(38,38,38)] px-4 py-3 text-base text-white`}
18-
>
15+
<div className={styles.container}>
16+
<PromptTextArea.Wrapper className={styles.promptWrapperCustom}>
1917
<PromptTextArea.Field
2018
placeholder={t('components.search.chatPlaceholder')}
2119
rows={1}
2220
maxLength={500}
2321
autoFocus
24-
className={`${styles.promptFieldCustom} m-0 w-full resize-none border-none bg-transparent p-0 font-normal leading-relaxed text-white outline-none`}
22+
className={styles.promptFieldCustom}
2523
/>
2624
<PromptTextArea.Button
2725
abortContent={<PauseCircleIcon />}
@@ -30,9 +28,7 @@ export const ChatInput: FC = () => {
3028
<PaperAirplaneIcon className="h-4 w-4" />
3129
</PromptTextArea.Button>
3230
</PromptTextArea.Wrapper>
33-
<div
34-
className={`${styles.slidingPanelFooter} flex flex-row items-center justify-center pt-1 text-xs text-neutral-400`}
35-
>
31+
<div className={styles.slidingPanelFooter}>
3632
<small>{t('components.search.disclaimer')}</small>
3733
</div>
3834
</div>

apps/site/components/Common/Searchbox/Chat/ChatMessage/index.module.css

Lines changed: 61 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -31,18 +31,18 @@
3131
@apply opacity-80;
3232

3333
animation: typing 1.4s infinite ease-in-out;
34-
}
3534

36-
.typingDot:nth-child(1) {
37-
animation-delay: 0s;
38-
}
35+
&:nth-child(1) {
36+
animation-delay: 0s;
37+
}
3938

40-
.typingDot:nth-child(2) {
41-
animation-delay: 0.2s;
42-
}
39+
&:nth-child(2) {
40+
animation-delay: 0.2s;
41+
}
4342

44-
.typingDot:nth-child(3) {
45-
animation-delay: 0.4s;
43+
&:nth-child(3) {
44+
animation-delay: 0.4s;
45+
}
4646
}
4747

4848
@keyframes typing {
@@ -60,9 +60,9 @@
6060
}
6161

6262
.chatAssistantMessageMain {
63-
@apply mb-4,
64-
text-base,
65-
text-neutral-900,
63+
@apply mb-4
64+
text-base
65+
text-neutral-900
6666
dark:text-neutral-200;
6767
}
6868

@@ -71,12 +71,12 @@
7171
}
7272

7373
.chatAssistantMessage {
74-
@apply my-4,
75-
mb-6,
76-
max-w-full,
77-
rounded-xl,
78-
px-6,
79-
py-4,
74+
@apply my-4
75+
mb-6
76+
max-w-full
77+
rounded-xl
78+
px-6
79+
py-4
8080
text-base;
8181

8282
background: transparent;
@@ -86,73 +86,65 @@
8686

8787
margin: 0;
8888
padding: 0;
89-
}
9089

91-
.chatAssistantMessage p {
92-
@apply font-sm-line-height,
93-
mb-3,
94-
text-white;
95-
}
90+
p {
91+
@apply font-sm-line-height
92+
mb-3
93+
text-white;
94+
}
9695

97-
.chatAssistantMessage pre {
98-
@apply my-4,
99-
rounded-md,
100-
bg-black/20,
101-
p-4,
102-
text-xs,
103-
text-white;
96+
pre {
97+
@apply my-4
98+
rounded-md
99+
bg-black/20
100+
p-4
101+
text-xs
102+
text-white;
103+
104+
code {
105+
@apply rounded-lg
106+
p-3
107+
text-sm;
108+
}
109+
}
104110

105111
code {
106-
@apply rounded-lg,
107-
p-3,
108-
text-sm;
112+
@apply rounded
113+
bg-black/30
114+
p-1
115+
text-white;
109116
}
110-
}
111117

112-
.chatAssistantMessage code {
113-
@apply rounded,
114-
bg-black/30,
115-
p-1,
116-
text-white;
117-
}
118-
119-
.chatAssistantMessage ul {
120-
@apply list-disc,
121-
pl-6;
122-
}
118+
ul {
119+
@apply list-disc
120+
pl-6;
121+
}
123122

124-
.chatAssistantMessage ol {
125-
@apply list-decimal,
126-
pl-6;
127-
}
123+
ol {
124+
@apply list-decimal
125+
pl-6;
126+
}
128127

129-
.chatAssistantMessage li {
130-
@apply mb-1;
131-
}
128+
li {
129+
@apply mb-1;
130+
}
132131

133-
.chatAssistantMessage h1,
134-
.chatAssistantMessage h2,
135-
.chatAssistantMessage h3 {
136-
@apply mb-2,
137-
text-lg,
138-
font-bold;
132+
h1,
133+
h2,
134+
h3 {
135+
@apply mb-2
136+
text-lg
137+
font-bold;
138+
}
139139
}
140140

141141
.markdownPre {
142142
border-radius: 0.5rem !important;
143143
padding: 0.1875rem 0.3125rem !important;
144144
}
145145

146-
:global(pre[class*='prism']) {
147-
border-radius: 0.5rem !important;
148-
padding: 0.1875rem 0.3125rem !important;
149-
}
150-
151-
:global(.chatAssistantMessage pre) {
152-
border-radius: 0.5rem !important;
153-
padding: 0.1875rem 0.3125rem !important;
154-
}
155-
146+
:global(pre[class*='prism']),
147+
:global(.chatAssistantMessage pre),
156148
:global(pre[style*='background-color']) {
157149
border-radius: 0.5rem !important;
158150
padding: 0.1875rem 0.3125rem !important;

0 commit comments

Comments
 (0)