Skip to content

Commit ed6ca8f

Browse files
authored
Merge pull request #103 from Lalitya31/feat/ui-design-system-refactor
Refactor: Enterprise-grade UI system overhaul across PDP, About, Contact, Auth & Collection pages
2 parents d836378 + 61d5a53 commit ed6ca8f

28 files changed

Lines changed: 2321 additions & 2456 deletions

frontend/src/App.css

Lines changed: 46 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,60 @@
1-
#root {
2-
max-width: 1280px;
3-
margin: 0 auto;
4-
padding: 2rem;
5-
text-align: center;
1+
/* Premium Commerce Typography System */
2+
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Poppins:wght@300;400;500;600;700;800&display=swap');
3+
4+
:root {
5+
--font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
6+
--font-secondary: 'Poppins', sans-serif;
7+
8+
/* 4-Level Type Scale */
9+
--text-hero: 48px;
10+
--text-heading: 36px;
11+
--text-subheading: 24px;
12+
--text-body: 16px;
13+
14+
/* Commerce Color Palette */
15+
--color-primary: #2563EB;
16+
--color-primary-hover: #1d4ed8;
17+
--color-primary-active: #1e40af;
618
}
719

8-
body{
20+
body {
21+
font-family: var(--font-primary);
22+
font-size: var(--text-body);
923
background-color: black;
1024
}
25+
26+
h1 {
27+
font-size: var(--text-hero);
28+
font-weight: 700;
29+
line-height: 1.2;
30+
}
31+
32+
h2 {
33+
font-size: var(--text-heading);
34+
font-weight: 600;
35+
line-height: 1.3;
36+
}
37+
38+
h3 {
39+
font-size: var(--text-subheading);
40+
font-weight: 600;
41+
line-height: 1.4;
42+
}
43+
44+
#root {
45+
width: 100%;
46+
margin: 0;
47+
padding: 0;
48+
}
49+
1150
.logo {
1251
height: 6em;
1352
padding: 1.5em;
1453
will-change: filter;
1554
transition: filter 300ms;
1655
}
1756
.logo:hover {
18-
filter: drop-shadow(0 0 2em #646cffaa);
57+
filter: drop-shadow(0 0 2em #2563EB80);
1958
}
2059
.logo.react:hover {
2160
filter: drop-shadow(0 0 2em #61dafbaa);

frontend/src/App.jsx

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import React, { useContext } from 'react';
22
import { Navigate, Route, Routes, useLocation } from 'react-router-dom';
3+
import './App.css';
34
import Registration from './pages/Registration';
45
import Home from './pages/Home';
56
import Login from './pages/Login';
@@ -177,18 +178,14 @@ function App() {
177178
)
178179
}
179180
/>
181+
182+
{/* Public routes - Legal pages should be accessible without login */}
180183
<Route
181184
path="/privicypolicy"
182185
element={
183-
userData ? (
184-
<PrivicyPolicy />
185-
) : (
186-
<Navigate to="/login" state={{ from: location.pathname }} />
187-
)
186+
<PrivicyPolicy />
188187
}
189188
/>
190-
191-
{/* public routes */}
192189
<Route
193190
path="/termsandservices"
194191
element={

frontend/src/components/Ai.jsx

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -135,34 +135,34 @@ function Ai() {
135135
];
136136

137137
return (
138-
<div className="fixed bottom-6 left-6 z-50">
138+
<div className="fixed bottom-6 right-6 z-40">
139139
{/* AI Assistant Robot */}
140140
<div
141141
className="relative cursor-pointer group"
142142
onClick={handleRobotClick}
143143
>
144-
<div className="absolute -top-2 -right-2 bg-red-500 text-white rounded-full w-5 h-5 flex items-center justify-center text-xs animate-pulse">
144+
<div className="absolute -top-2 -right-2 bg-[#EF4444] text-white rounded-full w-5 h-5 flex items-center justify-center text-xs animate-pulse">
145145
<MessageCircle size={12} />
146146
</div>
147147
<img
148148
src={robot}
149149
alt="AI Assistant Robot"
150-
className={`w-20 h-20 transition-all duration-300 ${activeAi ? 'scale-110' : 'scale-100'} group-hover:scale-110`}
151-
style={{ filter: activeAi ? "drop-shadow(0 0 10px #00d2fc)" : "drop-shadow(0 4px 8px rgba(0,0,0,0.2))" }}
150+
className="w-20 h-20 transition-all duration-300"
151+
style={{ filter: activeAi ? "drop-shadow(0 4px 6px rgba(37, 99, 235, 0.4))" : "drop-shadow(0 4px 8px rgba(0,0,0,0.2))" }}
152152
/>
153-
<div className="absolute bottom-0 left-1/2 transform -translate-x-1/2 bg-black bg-opacity-70 text-white text-xs px-2 py-1 rounded-full whitespace-nowrap opacity-0 group-hover:opacity-100 transition-opacity duration-300">
153+
<div className="absolute bottom-0 left-1/2 transform -translate-x-1/2 bg-black bg-opacity-70 text-white text-xs px-2 py-1 rounded-full whitespace-nowrap opacity-0 group-hover:opacity-100 transition-opacity duration-300" style={{ fontFamily: 'Inter, sans-serif' }}>
154154
AI Assistant
155155
</div>
156156
</div>
157157

158158
{/* Chat Interface */}
159159
{showChat && (
160-
<div className="absolute bottom-24 left-0 w-80 h-96 bg-white rounded-xl shadow-xl overflow-hidden border border-gray-200">
160+
<div className="absolute bottom-24 right-0 w-80 h-96 bg-white dark:bg-[#121826] rounded-xl shadow-xl overflow-hidden border border-gray-200 dark:border-gray-700">
161161
{/* Chat Header */}
162-
<div className="bg-gradient-to-r from-blue-600 to-indigo-700 text-white p-4 flex justify-between items-center">
162+
<div className="bg-[#2563EB] text-white p-4 flex justify-between items-center">
163163
<div className="flex items-center space-x-2">
164164
<div className="w-3 h-3 bg-green-400 rounded-full animate-pulse"></div>
165-
<h3 className="font-semibold">RIVETO AI Assistant</h3>
165+
<h3 className="font-semibold" style={{ fontFamily: 'Inter, sans-serif' }}>RIVETO AI Assistant</h3>
166166
</div>
167167
<button
168168
onClick={closeChat}
@@ -175,7 +175,7 @@ function Ai() {
175175
{/* Chat Messages */}
176176
<div
177177
ref={chatContainerRef}
178-
className="h-64 overflow-y-auto p-4 bg-gray-50"
178+
className="h-64 overflow-y-auto p-4 bg-gray-50 dark:bg-gray-800"
179179
>
180180
{chatMessages.length === 0 ? (
181181
<div className="text-center text-gray-500 my-8">
@@ -221,14 +221,15 @@ function Ai() {
221221
</div>
222222

223223
{/* Voice Control */}
224-
<div className="p-3 border-t border-gray-200 bg-white flex justify-center">
224+
<div className="p-3 border-t border-gray-200 dark:border-gray-700 bg-white dark:bg-[#121826] flex justify-center">
225225
<button
226226
onClick={handleVoiceCommand}
227227
disabled={isListening}
228228
className={`flex items-center justify-center space-x-2 px-4 py-2 rounded-full text-white ${isListening
229-
? 'bg-red-500 hover:bg-red-600'
230-
: 'bg-blue-500 hover:bg-blue-600'
231-
} transition-colors focus:outline-none focus:ring-2 focus:ring-blue-300`}
229+
? 'bg-[#EF4444] hover:bg-red-600'
230+
: 'bg-[#2563EB] hover:bg-[#1d4ed8]'
231+
} transition-all focus:outline-none focus:ring-2 focus:ring-[#2563EB]/30`}
232+
style={{ fontFamily: 'Inter, sans-serif' }}
232233
>
233234
{isListening ? (
234235
<>

frontend/src/components/Background.jsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -113,9 +113,9 @@ function Background({ heroCount }) {
113113
}}
114114
/>
115115

116-
{/* Dark gradient for contrast */}
117-
<div className="absolute inset-0 bg-gradient-to-t from-black/60 via-black/20 to-black/40" />
118-
<div className="absolute inset-0 bg-gradient-to-r from-black/30 via-transparent to-black/30" />
116+
{/* Dark gradient for contrast - Reduced opacity for better visibility */}
117+
<div className="absolute inset-0 bg-gradient-to-t from-black/30 via-black/10 to-black/20" />
118+
<div className="absolute inset-0 bg-gradient-to-r from-black/15 via-transparent to-black/15" />
119119

120120
{/* Floating Particles */}
121121
<div ref={particleContainerRef} className="absolute inset-0 pointer-events-none">
@@ -169,8 +169,8 @@ function Background({ heroCount }) {
169169
}}
170170
/>
171171

172-
{/* Vignette effect */}
173-
<div className="absolute inset-0 bg-[radial-gradient(ellipse_at_center,transparent_0%,rgba(0,0,0,0.4)_100%)]" />
172+
{/* Vignette effect - Reduced for better visibility */}
173+
<div className="absolute inset-0 bg-[radial-gradient(ellipse_at_center,transparent_0%,rgba(0,0,0,0.2)_100%)]" />
174174
</div>
175175
);
176176
}

0 commit comments

Comments
 (0)