Skip to content

Commit d6f75a0

Browse files
committed
Added Dark and Light Logo
1 parent 9a8b9aa commit d6f75a0

File tree

18 files changed

+63
-149
lines changed

18 files changed

+63
-149
lines changed
Binary file not shown.

Backend/EcommerceInventory/EcommerceInventory/settings.py

+4-3
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,11 @@
6767
'PAGE_SIZE':10
6868
}
6969

70-
CORS_ALLOWED_ORIGINS = [
71-
'http://localhost:3000',
72-
]
70+
# CORS_ALLOWED_ORIGINS = [
71+
# "http://*"
72+
# ]
7373

74+
CORS_ALLOW_ALL_ORIGINS = True
7475
ROOT_URLCONF = 'EcommerceInventory.urls'
7576

7677
TEMPLATES = [

Frontend/ecommerce_inventory/.env

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
REACT_APP_API_URL='http://ec2-3-110-164-200.ap-south-1.compute.amazonaws.com/api/'
1+
REACT_APP_API_URL='http://192.168.0.140:8000/api/'
-19.9 KB
Binary file not shown.
-5.22 KB
Binary file not shown.
-9.44 KB
Binary file not shown.
-35.3 KB
Binary file not shown.
-59.5 KB
Binary file not shown.
Loading
-19.3 KB
Binary file not shown.
Loading
Binary file not shown.
Loading
Loading

Frontend/ecommerce_inventory/src/layout/layout.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import { Outlet,useLocation,useNavigate } from 'react-router-dom'; // Import Out
1111
import { expandItem,activateItem,triggerPageChange } from '../redux/reducer/sidebardata';
1212
import {useDispatch} from 'react-redux';
1313

14-
const Layout = ({sidebarList,pageTitle}) => {
14+
const Layout = ({sidebarList,pageTitle,childPage}) => {
1515
const [mobileOpen, setMobileOpen] = useState(false);
1616
const [desktopOpen, setDesktopOpen] = useState(true); // State for desktop sidebar
1717
const [themeMode, setThemeMode] = useState('light');
@@ -177,7 +177,7 @@ const Layout = ({sidebarList,pageTitle}) => {
177177
className='sidebar'
178178
>
179179
<Box sx={{ display: 'flex', alignItems: 'center', marginBottom: '16px' }}>
180-
<img src={'/logo_l.png'} alt="Logo" className='logo' style={{ marginRight: '16px',width:'100%' }} />
180+
<img src={theme?.logo?.rectangle} alt="Logo" className='logo' style={{ marginRight: '16px',width:'100%' }} />
181181

182182
</Box>
183183
<List sx={{ '& .MuiListItem-root': { transition: 'background-color 0.3s' } }}>
@@ -456,7 +456,7 @@ const Layout = ({sidebarList,pageTitle}) => {
456456
{profileMenu}
457457
{themeMenuUI}
458458
<section className='main-content' style={{ padding: '20px' }}>
459-
<Outlet/>
459+
{childPage?childPage:<Outlet/>}
460460
</section>
461461
<Box
462462
component="footer"

Frontend/ecommerce_inventory/src/layout/themes.js

+53-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import { createTheme } from '@mui/material/styles';
2-
32
// Dark Theme
43
export const orangeDarkTheme = createTheme({
54
typography: {
@@ -73,6 +72,10 @@ export const orangeDarkTheme = createTheme({
7372
},
7473
},
7574
},
75+
logo:{
76+
rectangle:'/logo_light.png',
77+
square:'/logo_square_light.png',
78+
},
7679
});
7780

7881
export const orangeLightTheme = createTheme({
@@ -147,6 +150,10 @@ export const orangeLightTheme = createTheme({
147150
},
148151
},
149152
},
153+
logo:{
154+
rectangle:'/logo_dark.png',
155+
square:'/logo_square_dark.png',
156+
},
150157
});
151158

152159
export const redDarkTheme = createTheme({
@@ -224,6 +231,10 @@ export const redDarkTheme = createTheme({
224231
},
225232
},
226233
},
234+
logo:{
235+
rectangle:'/logo_light.png',
236+
square:'/logo_square_light.png',
237+
},
227238
});
228239

229240
export const redLightTheme = createTheme({
@@ -300,6 +311,11 @@ export const redLightTheme = createTheme({
300311
},
301312
},
302313
},
314+
logo:{
315+
rectangle:'/logo_dark.png',
316+
square:'/logo_square_dark.png',
317+
},
318+
303319
});
304320
export const greenDarkTheme = createTheme({
305321
typography: {
@@ -373,6 +389,10 @@ export const greenDarkTheme = createTheme({
373389
},
374390
},
375391
},
392+
logo:{
393+
rectangle:'/logo_light.png',
394+
square:'/logo_square_light.png',
395+
},
376396
});
377397
export const greenLightTheme = createTheme({
378398
typography: {
@@ -448,6 +468,11 @@ export const greenLightTheme = createTheme({
448468
},
449469
},
450470
},
471+
logo:{
472+
rectangle:'/logo_dark.png',
473+
square:'/logo_square_dark.png',
474+
},
475+
451476
});
452477

453478
export const blueDarkTheme = createTheme({
@@ -522,6 +547,11 @@ export const blueDarkTheme = createTheme({
522547
},
523548
},
524549
},
550+
logo:{
551+
rectangle:'/logo_light.png',
552+
square:'/logo_square_light.png',
553+
},
554+
525555
});
526556

527557
export const blueLightTheme = createTheme({
@@ -598,6 +628,10 @@ export const blueLightTheme = createTheme({
598628
},
599629
},
600630
},
631+
logo:{
632+
rectangle:'/logo_dark.png',
633+
square:'/logo_square_dark.png',
634+
},
601635
});
602636

603637

@@ -667,6 +701,10 @@ export const customTheme = createTheme({
667701
},
668702
},
669703
},
704+
logo:{
705+
rectangle:'/logo_dark.png',
706+
square:'/logo_square_dark.png',
707+
},
670708
});
671709
export const lightTheme = createTheme({
672710
typography: {
@@ -685,6 +723,7 @@ export const lightTheme = createTheme({
685723
background: {
686724
paper: 'rgba(241, 244, 250, 1)',
687725
default: 'rgba(255, 255, 255, 1)',
726+
light: 'rgba(255, 255, 255, 1)',
688727
},
689728
error: {
690729
main: 'rgba(255, 0, 0, 1)', // Set error color to red
@@ -762,6 +801,11 @@ export const lightTheme = createTheme({
762801
},
763802
},
764803
},
804+
logo:{
805+
rectangle:'/logo_dark.png',
806+
square:'/logo_square_dark.png',
807+
},
808+
765809
});
766810

767811

@@ -833,6 +877,10 @@ export const darkTheme = createTheme({
833877
},
834878
},
835879
},
880+
logo:{
881+
rectangle:'/logo_light.png',
882+
square:'/logo_square_light.png',
883+
},
836884
});
837885
export const basicTheme = createTheme({
838886
typography: {
@@ -865,6 +913,10 @@ export const basicTheme = createTheme({
865913
primary: 'rgba(255, 255, 255, 1)',
866914
},
867915
},
916+
logo:{
917+
rectangle:'/logo_light.png',
918+
square:'/logo_square_light.png',
919+
},
868920
components: {
869921
MuiButton: {
870922
styleOverrides: {

Frontend/ecommerce_inventory/src/pages/Auth.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ const Auth = () => {
1313
const [themeMode, setThemeMode] = useState('basic');
1414
const navigate=useNavigate();
1515
const {callApi,error,loading}=useApi();
16+
1617
useEffect(() => {
1718
const savedTheme = localStorage.getItem('theme') || 'basic';
1819
setThemeMode(savedTheme);
@@ -107,7 +108,7 @@ const doLogin = async(e) => {
107108
<Card sx={{ maxWidth: 400, width: '100%' }}>
108109
<CardContent>
109110
<Box sx={{ display: 'flex', justifyContent: 'center', mb: 2 }}>
110-
<img src={'/logo.png'} alt="Logo" style={{ borderRadius: '50%',width:'100px' }} />
111+
<img src={theme.logo.square} alt="Logo" style={{ borderRadius: '50%',width:'100px' }} />
111112
</Box>
112113
<Typography variant="h5" align="center" gutterBottom>
113114
EzyMarket

Frontend/ecommerce_inventory/src/pages/AuthScreen.js

-140
This file was deleted.

0 commit comments

Comments
 (0)