dakshtaneja commited on
Commit
8f09717
·
1 Parent(s): 23d625d

chat markdown polish: bold headings, multi-hue syntax theme

Browse files

The first hljs theme mapped every token class to orange shades —
technically highlighted, visually monochrome. Replaced with a CRT
phosphor palette (orange keywords, green strings, amber numbers, cyan
function names, purple built-ins) over a neutral base inside code
blocks. Headings get bold weight and top margin; paragraphs and list
items get relaxed leading.

frontend/app/globals.css CHANGED
@@ -160,7 +160,13 @@ body {
160
  background: var(--accent);
161
  }
162
 
163
- /* Syntax highlighting (rehype-highlight) — retro palette, no stock theme */
 
 
 
 
 
 
164
  .hljs-comment,
165
  .hljs-quote {
166
  color: #78716c;
@@ -168,30 +174,30 @@ body {
168
  }
169
  .hljs-keyword,
170
  .hljs-selector-tag,
171
- .hljs-literal,
172
  .hljs-doctag {
173
- color: #fb923c;
174
  }
175
  .hljs-string,
176
  .hljs-regexp,
177
  .hljs-addition {
178
- color: #fbbf24;
179
  }
180
  .hljs-number,
181
  .hljs-symbol,
182
- .hljs-bullet {
183
- color: #fdba74;
 
184
  }
185
  .hljs-title,
186
  .hljs-title.function_,
187
  .hljs-title.class_,
188
  .hljs-section {
189
- color: #fed7aa;
190
  }
191
  .hljs-built_in,
192
  .hljs-type,
193
  .hljs-class {
194
- color: #f59e0b;
195
  }
196
  .hljs-attr,
197
  .hljs-attribute,
 
160
  background: var(--accent);
161
  }
162
 
163
+ /* Syntax highlighting (rehype-highlight) — CRT phosphor palette:
164
+ distinct hues per token class, not just orange shades */
165
+ .md-body pre code {
166
+ color: #d6d3d1; /* neutral base inside blocks; tokens colorize below */
167
+ background: transparent;
168
+ padding: 0;
169
+ }
170
  .hljs-comment,
171
  .hljs-quote {
172
  color: #78716c;
 
174
  }
175
  .hljs-keyword,
176
  .hljs-selector-tag,
 
177
  .hljs-doctag {
178
+ color: #fb923c; /* orange — the signature accent */
179
  }
180
  .hljs-string,
181
  .hljs-regexp,
182
  .hljs-addition {
183
+ color: #4ade80; /* phosphor green */
184
  }
185
  .hljs-number,
186
  .hljs-symbol,
187
+ .hljs-bullet,
188
+ .hljs-literal {
189
+ color: #facc15; /* amber terminal yellow */
190
  }
191
  .hljs-title,
192
  .hljs-title.function_,
193
  .hljs-title.class_,
194
  .hljs-section {
195
+ color: #22d3ee; /* cyan */
196
  }
197
  .hljs-built_in,
198
  .hljs-type,
199
  .hljs-class {
200
+ color: #c084fc; /* magenta-purple */
201
  }
202
  .hljs-attr,
203
  .hljs-attribute,
frontend/components/Markdown.tsx CHANGED
@@ -25,7 +25,7 @@ export function Markdown({
25
  highlight?: boolean;
26
  }) {
27
  return (
28
- <div className="md-body space-y-2 [&_a]:text-orange-400 [&_a]:underline [&_blockquote]:border-l-4 [&_blockquote]:border-stone-700 [&_blockquote]:pl-3 [&_blockquote]:text-stone-400 [&_code]:bg-black [&_code]:px-1 [&_code]:text-orange-300 [&_h1]:text-xl [&_h1]:text-orange-400 [&_h2]:text-lg [&_h2]:text-orange-400 [&_h3]:text-orange-300 [&_hr]:border-stone-700 [&_li]:ml-5 [&_ol]:list-decimal [&_pre]:overflow-x-auto [&_pre]:border-2 [&_pre]:border-stone-700 [&_pre]:bg-black [&_pre]:p-2 [&_strong]:text-orange-200 [&_table]:border-2 [&_table]:border-stone-700 [&_td]:border [&_td]:border-stone-700 [&_td]:px-2 [&_th]:border [&_th]:border-stone-600 [&_th]:bg-stone-900 [&_th]:px-2 [&_ul]:list-disc">
29
  <ReactMarkdown
30
  remarkPlugins={[remarkGfm, remarkMath]}
31
  rehypePlugins={
 
25
  highlight?: boolean;
26
  }) {
27
  return (
28
+ <div className="md-body space-y-2 [&_a]:text-orange-400 [&_a]:underline [&_blockquote]:border-l-4 [&_blockquote]:border-stone-700 [&_blockquote]:pl-3 [&_blockquote]:text-stone-400 [&_code]:bg-black [&_code]:px-1 [&_code]:text-orange-300 [&_h1]:mt-3 [&_h1]:text-xl [&_h1]:font-bold [&_h1]:text-orange-400 [&_h2]:mt-3 [&_h2]:text-lg [&_h2]:font-bold [&_h2]:text-orange-400 [&_h3]:mt-2 [&_h3]:font-semibold [&_h3]:text-orange-300 [&_h4]:font-semibold [&_h4]:text-orange-200 [&_hr]:border-stone-700 [&_li]:ml-5 [&_li]:leading-relaxed [&_ol]:list-decimal [&_p]:leading-relaxed [&_pre]:overflow-x-auto [&_pre]:border-2 [&_pre]:border-stone-700 [&_pre]:bg-black [&_pre]:p-3 [&_strong]:font-bold [&_strong]:text-orange-200 [&_table]:border-2 [&_table]:border-stone-700 [&_td]:border [&_td]:border-stone-700 [&_td]:px-2 [&_th]:border [&_th]:border-stone-600 [&_th]:bg-stone-900 [&_th]:px-2 [&_ul]:list-disc">
29
  <ReactMarkdown
30
  remarkPlugins={[remarkGfm, remarkMath]}
31
  rehypePlugins={