diff --git a/frontend/src/Hero.tsx b/frontend/src/Hero.tsx index a000ab2e..33710b84 100644 --- a/frontend/src/Hero.tsx +++ b/frontend/src/Hero.tsx @@ -37,12 +37,14 @@ export default function Hero({ diff --git a/frontend/src/conversation/Conversation.tsx b/frontend/src/conversation/Conversation.tsx index 29438f93..a88e1415 100644 --- a/frontend/src/conversation/Conversation.tsx +++ b/frontend/src/conversation/Conversation.tsx @@ -382,10 +382,10 @@ export default function Conversation() { )} -
+
-

+

{t('tagline')}

diff --git a/frontend/src/conversation/ConversationBubble.tsx b/frontend/src/conversation/ConversationBubble.tsx index d39cf485..813739f2 100644 --- a/frontend/src/conversation/ConversationBubble.tsx +++ b/frontend/src/conversation/ConversationBubble.tsx @@ -5,10 +5,14 @@ import { useTranslation } from 'react-i18next'; import ReactMarkdown from 'react-markdown'; import { useSelector } from 'react-redux'; import { Prism as SyntaxHighlighter } from 'react-syntax-highlighter'; -import { vscDarkPlus } from 'react-syntax-highlighter/dist/cjs/styles/prism'; +import { + vscDarkPlus, + oneLight, +} from 'react-syntax-highlighter/dist/cjs/styles/prism'; import rehypeKatex from 'rehype-katex'; import remarkGfm from 'remark-gfm'; import remarkMath from 'remark-math'; +import { useDarkTheme } from '../hooks'; import DocsGPT3 from '../assets/cute_docsgpt3.svg'; import ChevronDown from '../assets/chevron-down.svg'; @@ -69,6 +73,7 @@ const ConversationBubble = forwardRef< ref, ) { const { t } = useTranslation(); + const [isDarkTheme] = useDarkTheme(); // const bubbleRef = useRef(null); const chunks = useSelector(selectChunks); const selectedDocs = useSelector(selectSelectedDocs); @@ -333,7 +338,7 @@ const ConversationBubble = forwardRef<

- - {String(children).replace(/\n$/, '')} - -
+
+
+ + {language} +
+ + {String(children).replace(/\n$/, '')} +
) : ( diff --git a/frontend/tailwind.config.cjs b/frontend/tailwind.config.cjs index 938eacee..d8546373 100644 --- a/frontend/tailwind.config.cjs +++ b/frontend/tailwind.config.cjs @@ -11,7 +11,7 @@ module.exports = { colors: { 'eerie-black': '#212121', 'black-1000': '#343541', - jet: '#343541', + 'jet': '#343541', 'gray-alpha': 'rgba(0,0,0, .64)', 'gray-1000': '#F6F6F6', 'gray-2000': 'rgba(0, 0, 0, 0.5)', @@ -32,23 +32,35 @@ module.exports = { 'green-2000': '#0FFF50', 'light-gray': '#edeef0', 'white-3000': '#ffffff', - 'just-black':"#00000", - 'purple-taupe':'#464152', + 'just-black': '#00000', + 'purple-taupe': '#464152', 'dove-gray': '#6c6c6c', 'silver': '#c4c4c4', 'rainy-gray': '#a4a4a4', - 'raisin-black':'#222327', - 'chinese-black':'#161616', - 'chinese-silver':'#CDCDCD', - 'dark-charcoal':'#2F3036', - 'bright-gray':'#ECECF1', - 'outer-space':'#444654', - 'gun-metal':'#2E303E', - 'sonic-silver':'#747474', - 'soap':'#D8CCF1', - 'independence':'#54546D', - 'philippine-yellow':'#FFC700', - 'bright-gray':'#EBEBEB' + 'raisin-black': '#222327', + 'chinese-black': '#161616', + 'chinese-silver': '#CDCDCD', + 'dark-charcoal': '#2F3036', + 'bright-gray': '#ECECF1', + 'outer-space': '#444654', + 'gun-metal': '#2E303E', + 'sonic-silver': '#747474', + 'soap': '#D8CCF1', + 'independence': '#54546D', + 'philippine-yellow': '#FFC700', + 'bright-gray': '#EBEBEB', + + // New semantically named colors for UI elements + 'chinese-white': '#e0e0e0', + 'dark-gray': '#aaaaaa', + 'dim-gray': '#6A6A6A', + 'cultured': '#f4f4f4', + 'charleston-green': '#2b2c31', + 'grey':'#7e7e7e', + 'lotion':'#fbfbfb', + 'platinum':'#e6e6e6', + 'eerie-black-2': '#191919', + 'light-silver': '#D9D9D9', }, }, },