tech-envision commited on
Commit
1757403
·
unverified ·
2 Parent(s): 1b849df a74762c

Merge pull request #81 from EnvisionMindCa/codex/align-ui-elements-and-update-font

Browse files
frontend/src/app/globals.css CHANGED
@@ -49,7 +49,7 @@
49
  body {
50
  background: var(--background);
51
  color: var(--foreground);
52
- font-family: Arial, Helvetica, sans-serif;
53
  }
54
 
55
  @keyframes fadeIn {
 
49
  body {
50
  background: var(--background);
51
  color: var(--foreground);
52
+ font-family: var(--font-sans, Arial, Helvetica, sans-serif);
53
  }
54
 
55
  @keyframes fadeIn {
frontend/src/app/layout.tsx CHANGED
@@ -1,6 +1,9 @@
1
  import type { Metadata } from "next";
 
2
  import "./globals.css";
3
 
 
 
4
  export const metadata: Metadata = {
5
  title: "Create Next App",
6
  description: "Generated by create next app",
@@ -12,10 +15,8 @@ export default function RootLayout({
12
  children: React.ReactNode;
13
  }>) {
14
  return (
15
- <html lang="en">
16
- <body className="antialiased">
17
- {children}
18
- </body>
19
  </html>
20
  );
21
  }
 
1
  import type { Metadata } from "next";
2
+ import { Inter } from "next/font/google";
3
  import "./globals.css";
4
 
5
+ const inter = Inter({ subsets: ["latin"], variable: "--font-sans", display: "swap" });
6
+
7
  export const metadata: Metadata = {
8
  title: "Create Next App",
9
  description: "Generated by create next app",
 
15
  children: React.ReactNode;
16
  }>) {
17
  return (
18
+ <html lang="en" className={inter.variable}>
19
+ <body className="antialiased">{children}</body>
 
 
20
  </html>
21
  );
22
  }
frontend/src/components/ChatApp.tsx CHANGED
@@ -51,8 +51,8 @@ export default function ChatApp() {
51
  };
52
 
53
  return (
54
- <div className="flex flex-col items-center h-screen bg-gradient-to-br from-white to-gray-100 text-gray-900 p-4">
55
- <div className="w-full max-w-3xl flex flex-col flex-1 glass-panel rounded-lg overflow-hidden">
56
  <MessageList ref={listRef} messages={messages} />
57
  <MessageInput value={input} onChange={setInput} onSend={sendMessage} disabled={loading} />
58
  </div>
 
51
  };
52
 
53
  return (
54
+ <div className="flex flex-col min-h-screen bg-gradient-to-br from-white to-gray-100 text-gray-900 p-4">
55
+ <div className="w-full max-w-3xl flex flex-col flex-1 mx-auto glass-panel rounded-lg overflow-hidden">
56
  <MessageList ref={listRef} messages={messages} />
57
  <MessageInput value={input} onChange={setInput} onSend={sendMessage} disabled={loading} />
58
  </div>
frontend/src/components/MessageInput.tsx CHANGED
@@ -15,7 +15,7 @@ export default function MessageInput({ value, onChange, onSend, disabled }: Mess
15
  };
16
 
17
  return (
18
- <form onSubmit={handleSubmit} className="flex gap-2 p-2">
19
  <input
20
  type="text"
21
  className="flex-1 bg-white/60 backdrop-blur-sm border border-gray-300 text-gray-900 px-3 py-2 rounded-md focus:outline-none"
 
15
  };
16
 
17
  return (
18
+ <form onSubmit={handleSubmit} className="flex gap-2 p-2 border-t border-gray-200">
19
  <input
20
  type="text"
21
  className="flex-1 bg-white/60 backdrop-blur-sm border border-gray-300 text-gray-900 px-3 py-2 rounded-md focus:outline-none"
frontend/src/components/MessageItem.tsx CHANGED
@@ -14,7 +14,7 @@ export default function MessageItem({ message }: MessageItemProps) {
14
  return (
15
  <div className={`flex flex-col ${alignment} animate-fadeIn`}>
16
  <div className="w-full max-w-xl p-3 my-2 glass-panel rounded-lg shadow-md">
17
- <p className="whitespace-pre-wrap">{message.content}</p>
18
  </div>
19
  </div>
20
  );
 
14
  return (
15
  <div className={`flex flex-col ${alignment} animate-fadeIn`}>
16
  <div className="w-full max-w-xl p-3 my-2 glass-panel rounded-lg shadow-md">
17
+ <p className="whitespace-pre-wrap break-words">{message.content}</p>
18
  </div>
19
  </div>
20
  );
frontend/src/components/MessageList.tsx CHANGED
@@ -7,7 +7,7 @@ interface MessageListProps {
7
 
8
  const MessageList = forwardRef<HTMLDivElement, MessageListProps>(({ messages }, ref) => {
9
  return (
10
- <div className="flex-1 overflow-y-auto p-2" ref={ref}>
11
  {messages.map((msg, idx) => (
12
  <MessageItem key={idx} message={msg} />
13
  ))}
 
7
 
8
  const MessageList = forwardRef<HTMLDivElement, MessageListProps>(({ messages }, ref) => {
9
  return (
10
+ <div className="flex-1 overflow-y-auto p-4 space-y-4" ref={ref}>
11
  {messages.map((msg, idx) => (
12
  <MessageItem key={idx} message={msg} />
13
  ))}