Skip to content

Commit 470c3ab

Browse files
committed
Design React Login UI #7
1 parent f44ac5f commit 470c3ab

31 files changed

Lines changed: 1036 additions & 406 deletions

frontend/DialogGPT/src/Routes/Chat/Chat.css renamed to DBs/Query.sql

File renamed without changes.

DBs/ReadMe.md

Whitespace-only changes.

frontend/DialogGPT/package-lock.json

Lines changed: 10 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

frontend/DialogGPT/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
"dependencies": {
1313
"react": "^19.2.0",
1414
"react-dom": "^19.2.0",
15+
"react-icons": "^5.6.0",
1516
"react-router-dom": "^7.13.1"
1617
},
1718
"devDependencies": {

frontend/DialogGPT/src/App.css

Lines changed: 68 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,70 +1,101 @@
1+
@import url('https://fonts.googleapis.com/css2?family=Space+Mono:wght@400;700&family=Syne:wght@400;600;800&display=swap');
2+
13
:root {
4+
--bg: #0a0a0f;
5+
--surface: #13131a;
6+
--border: #1e1e2e;
7+
--accent: #ff0000; /* DialogRed */
8+
--text: #e8e8f0;
9+
--muted: #6b6b80;
210
--sidebar-width: 20%;
3-
--brand-orange: orange;
411
}
512

6-
/* 1. Sidebar - Fixed to the left */
13+
* {
14+
margin: 0;
15+
padding: 0;
16+
box-sizing: border-box;
17+
}
18+
19+
body {
20+
font-family: 'Syne', sans-serif;
21+
background: var(--bg);
22+
color: var(--text);
23+
min-height: 100vh;
24+
overflow-x: hidden;
25+
}
26+
27+
/* Global Grid Background Effect */
28+
.app-root::before {
29+
content: '';
30+
position: fixed;
31+
inset: 0;
32+
background-image:
33+
linear-gradient(rgba(255, 0, 0, 0.03) 1px, transparent 1px),
34+
linear-gradient(90deg, rgba(255, 0, 0, 0.03) 1px, transparent 1px);
35+
background-size: 40px 40px;
36+
pointer-events: none;
37+
z-index: 0;
38+
}
39+
40+
/* 2. Sidebar - Redesigned for Blueprint Theme */
741
.sidebar {
842
position: fixed;
943
left: 0;
1044
top: 0;
1145
height: 100vh;
1246
width: var(--sidebar-width);
13-
background-color: #121212;
47+
background-color: var(--surface);
1448
z-index: 2000;
15-
transition: transform 0.4s ease;
16-
border-right: 1px solid rgba(255, 165, 0, 0.1);
49+
transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
50+
border-right: 1px solid var(--border);
51+
backdrop-filter: blur(5px);
52+
}
53+
54+
/* 3. Main Layout Wrapper */
55+
.app-layout {
56+
display: flex;
57+
width: 100%;
58+
height: 100vh;
59+
position: relative;
60+
z-index: 1;
1761
}
1862

19-
/* 2. Chat Wrapper - Precise alignment */
20-
/* desktop logic */
21-
.chat-wrapper {
63+
/* 4. Chat/Main Content Area */
64+
.chat-wrapper, .chat-page-container {
2265
position: fixed;
2366
top: 0;
2467
right: 0;
25-
width: 80%; /* Only takes 80% on desktop */
68+
width: calc(100% - var(--sidebar-width));
2669
height: 100vh;
27-
background-color: #121212;
2870
transition: all 0.4s ease;
71+
overflow-x: hidden;
2972
}
3073

31-
/* RESPONSIVE FIX (Triggering at 1024px) */
74+
/* --- RESPONSIVE FIX (1024px Breakpoint) --- */
3275
@media (max-width: 1024px) {
33-
.chat-wrapper {
34-
/* Anchor to BOTH sides to kill the gaps */
35-
left: 0 !important;
36-
right: 0 !important;
76+
.chat-wrapper, .chat-page-container {
3777
width: 100% !important;
78+
left: 0 !important;
3879
margin: 0 !important;
3980
}
4081

4182
.sidebar {
42-
width: 300px;
43-
transform: translateX(-100%); /* Slide it off-screen */
83+
width: 280px;
84+
transform: translateX(-100%);
85+
box-shadow: 20px 0 50px rgba(0, 0, 0, 0.5);
4486
}
4587

4688
.sidebar.active {
47-
transform: translateX(0); /* Slide back in */
89+
transform: translateX(0);
90+
border-right: 1px solid var(--accent);
4891
}
4992
}
5093

51-
/* Update this part in App.css */
52-
.app-layout {
53-
display: flex;
54-
width: 100%;
55-
height: 100vh;
56-
}
57-
58-
/* Ensure the main container in the CHAT page handles the 20% gap */
59-
.chat-page-container {
60-
margin-left: 20%;
61-
width: 80%;
62-
height: 100vh;
63-
}
64-
65-
@media (max-width: 1024px) {
66-
.chat-page-container {
67-
margin-left: 0;
68-
width: 100%;
69-
}
94+
/* Utility for technical labels used in all pages */
95+
.tech-tag {
96+
font-family: 'Space Mono', monospace;
97+
font-size: 0.7rem;
98+
color: var(--accent);
99+
text-transform: uppercase;
100+
letter-spacing: 2px;
70101
}

frontend/DialogGPT/src/App.jsx

Lines changed: 23 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,31 @@
1-
import { useState, useEffect } from 'react'
21
import { BrowserRouter, Routes, Route } from 'react-router-dom';
3-
import Welcome from './Routes/Welcome/Welcome.jsx'; // Your current landing page
4-
import Chat from './Routes/Chat/Chat.jsx'; // Your new page
5-
import './App.css'
2+
import Index from './Routes/Index/Index.jsx';
3+
import Welcome from './Routes/DialogGPT/Welcome/Welcome.jsx';
4+
import Chat from './Routes/DialogGPT/Chat/Chat.jsx';
5+
6+
// Your new Consolidated Auth Imports
7+
import Login from "./Routes/DialogGPT/Auth/Login.jsx";
8+
import Register from "./Routes/DialogGPT/Auth/Register.jsx";
9+
import ForgotPassword from "./Routes/DialogGPT/Auth/ForgotPassword.jsx";
10+
import ResetPassword from "./Routes/DialogGPT/Auth/ResetPassword.jsx";
11+
12+
import './App.css';
613

714
function App() {
815
return (
9-
<div className="app-root"> {/* No styles on this div! */}
16+
<div className="app-root">
1017
<BrowserRouter>
11-
<Routes>
12-
<Route path="/" element={<Welcome/>} />
13-
<Route path="/chat" element={<Chat/>} />
18+
<Routes><Route path="/" element={<Index/>} />
19+
20+
{/* Auth Routes */}
21+
<Route path="/DialogGPT/login" element={<Login/>} />
22+
<Route path="/DialogGPT/register" element={<Register/>} />
23+
<Route path="/DialogGPT/forgot-password" element={<ForgotPassword/>} />
24+
<Route path="/DialogGPT/reset-password/:token" element={<ResetPassword/>} />
25+
26+
{/* Main App Routes */}
27+
<Route path="/DialogGPT" element={<Welcome/>} />
28+
<Route path="/DialogGPT/chat" element={<Chat/>} />
1429
</Routes>
1530
</BrowserRouter>
1631
</div>

frontend/DialogGPT/src/Components/ButtonOrange/Button.css

Lines changed: 22 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,50 @@
11
.round-button {
2-
width: 60px; /* Slightly increased button size to house a bigger arrow */
2+
width: 60px;
33
height: 60px;
4-
background-color: orange;
5-
border: none;
4+
/* Glassmorphism Red */
5+
background-color: rgba(255, 0, 0, 0.2);
6+
border: 1px solid rgba(255, 0, 0, 0.4);
67
border-radius: 50%;
78
color: white;
89
display: flex;
910
align-items: center;
1011
justify-content: center;
1112
cursor: pointer;
12-
transition: transform 0.2s ease, background-color 0.2s ease;
13+
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
1314

14-
/* Centering and Animation */
1515
margin: 20px auto 0;
1616
opacity: 0;
1717
animation: fadeIn 0.5s ease forwards;
18+
/* Default delay matches the Welcome typewriter speed */
1819
animation-delay: 1.8s;
20+
21+
/* Subtle Tech Glow */
22+
box-shadow: 0 0 10px rgba(255, 0, 0, 0.1);
1923
}
2024

21-
/* This targets the arrow icon specifically */
2225
.round-button svg {
23-
width: 32px; /* Increased from 24px */
24-
height: 32px; /* Increased from 24px */
25-
stroke-width: 5; /* Makes the arrow lines look bolder and cleaner */
26+
width: 28px;
27+
height: 28px;
28+
stroke-width: 3;
29+
transition: transform 0.3s ease;
2630
}
2731

32+
/* Hover State - Industrial Glow */
2833
.round-button:hover {
29-
background-color: #e67e00;
34+
background-color: #ff0000;
3035
transform: scale(1.1);
36+
box-shadow: 0 0 20px rgba(255, 0, 0, 0.4);
37+
border-color: #ff0000;
38+
}
39+
40+
.round-button:hover svg {
41+
transform: translateX(3px); /* Arrow nudges forward on hover */
3142
}
3243

3344
@keyframes fadeIn {
3445
from {
3546
opacity: 0;
36-
transform: translateY(10px);
47+
transform: translateY(15px);
3748
}
3849
to {
3950
opacity: 1;

frontend/DialogGPT/src/Components/ButtonOrange/Button.jsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
11
import React from 'react';
22
import './Button.css';
33

4-
const Button = ({ onClick }) => {
4+
const Button = ({ onClick, delay = "1.8s" }) => {
55
return (
6-
<button className="round-button" onClick={onClick}>
6+
<button
7+
className="round-button"
8+
onClick={onClick}
9+
style={{ animationDelay: delay }}
10+
>
711
<svg
812
viewBox="0 0 24 24"
913
fill="none"
Lines changed: 39 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,57 +1,56 @@
1-
/* 1. Base Container */
21
.message-container {
32
display: flex;
4-
margin-bottom: 30px;
5-
gap: 15px;
6-
width: 100%; /* Important for alignment */
7-
align-items: flex-start;
3+
margin-bottom: 24px;
4+
gap: 16px;
5+
width: 100%;
6+
animation: fadeIn 0.3s ease;
87
}
98

10-
/* 2. Bot Layout (Icon Left, Text Right) */
11-
.message-container.bot {
12-
flex-direction: row;
13-
justify-content: flex-start;
14-
}
15-
16-
/* 3. User Layout (Text Left, Icon Right) */
17-
.message-container.user {
18-
flex-direction: row; /* Icon and text in a line */
19-
justify-content: flex-end; /* Pushes the pair to the right edge */
20-
}
21-
22-
/* 4. Ensure the Icon is Visible */
239
.avatar-wrapper {
24-
width: 42px;
25-
height: 42px;
26-
flex-shrink: 0; /* Prevents the icon from squishing to 0px */
27-
border-radius: 50%;
28-
border: 2px solid orange;
10+
width: 38px;
11+
height: 38px;
12+
flex-shrink: 0;
13+
border: 1px solid var(--border);
2914
display: flex;
3015
align-items: center;
3116
justify-content: center;
32-
background-color: rgba(255, 165, 0, 0.05);
33-
padding: 8px;
34-
box-sizing: border-box;
17+
background: var(--surface);
18+
color: var(--muted);
19+
}
20+
21+
.bot .avatar-wrapper {
22+
border-color: var(--accent);
23+
color: var(--accent);
24+
}
25+
26+
.message-content {
27+
max-width: 80%;
28+
}
29+
30+
.message-header {
31+
margin-bottom: 4px;
3532
}
3633

37-
/* 5. Bubble Specifics */
3834
.message-bubble {
39-
padding: 14px 22px;
40-
font-size: 1rem;
41-
line-height: 1.5;
42-
word-wrap: break-word;
43-
max-width: 70%; /* Prevents text from hitting the other side */
35+
padding: 12px 16px;
36+
font-size: 0.95rem;
37+
line-height: 1.6;
38+
border: 1px solid var(--border);
39+
background: rgba(30, 30, 46, 0.4);
40+
backdrop-filter: blur(4px);
4441
}
4542

43+
/* Red Accents for Bot */
4644
.bot .message-bubble {
47-
background-color: #252525;
48-
color: #efefef;
49-
border-radius: 0px 18px 18px 18px;
45+
border-left: 3px solid var(--accent);
46+
color: var(--text);
5047
}
5148

49+
/* Subtle style for User */
5250
.user .message-bubble {
53-
background-color: orange;
54-
color: white;
55-
border-radius: 18px 0px 18px 18px;
56-
/* No 'order' needed if we just place the HTML correctly */
57-
}
51+
border-left: 3px solid var(--muted);
52+
color: var(--muted);
53+
}
54+
55+
.user { flex-direction: row-reverse; text-align: right; }
56+
.user .message-header { display: flex; justify-content: flex-end; }

0 commit comments

Comments
 (0)