Skip to content

Commit

Permalink
Minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
RUSHIGoswami committed Nov 20, 2024
1 parent 1c32b79 commit 532e7a1
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 49 deletions.
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ pnpm-debug.log*
lerna-debug.log*

node_modules
dist
dist-ssr
*.local

# Editor directories and files
Expand Down
4 changes: 2 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<!doctype html>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Vite + React</title>
<title>Rushi - Portfolio</title>
</head>
<body>
<div id="root"></div>
Expand Down
86 changes: 42 additions & 44 deletions src/App.jsx
Original file line number Diff line number Diff line change
@@ -1,40 +1,37 @@
import { ThemeProvider, createTheme } from '@mui/material/styles';
import CssBaseline from '@mui/material/CssBaseline';
import { BrowserRouter as Router } from 'react-router-dom';
import Navbar from './components/Navbar';
import Hero from './components/Hero';
import About from './components/About';
import Skills from './components/Skills';
import Projects from './components/Projects';
import Contact from './components/Contact';
import { Box, IconButton } from '@mui/material';
import { useState, useMemo } from 'react';
import Brightness4Icon from '@mui/icons-material/Brightness4';
import Brightness7Icon from '@mui/icons-material/Brightness7';

import { ThemeProvider, createTheme } from "@mui/material/styles";
import CssBaseline from "@mui/material/CssBaseline";
import { BrowserRouter as Router } from "react-router-dom";
import Navbar from "./components/Navbar";
import Hero from "./components/Hero";
import About from "./components/About";
import Skills from "./components/Skills";
import Projects from "./components/Projects";
import Contact from "./components/Contact";
import { Box } from "@mui/material";
import { useState, useMemo } from "react";
function App() {
const [mode, setMode] = useState('dark');
const [mode, setMode] = useState("dark");

const theme = useMemo(
() =>
createTheme({
palette: {
mode,
primary: {
main: mode === 'dark' ? '#7C3AED' : '#6D28D9', // Purple shade
light: mode === 'dark' ? '#8B5CF6' : '#7C3AED',
dark: mode === 'dark' ? '#5B21B6' : '#5B21B6',
main: mode === "dark" ? "#7C3AED" : "#6D28D9", // Purple shade
light: mode === "dark" ? "#8B5CF6" : "#7C3AED",
dark: mode === "dark" ? "#5B21B6" : "#5B21B6",
},
secondary: {
main: mode === 'dark' ? '#EC4899' : '#DB2777', // Pink shade
main: mode === "dark" ? "#EC4899" : "#DB2777", // Pink shade
},
background: {
default: mode === 'dark' ? '#0F172A' : '#F8FAFC', // Slate colors
paper: mode === 'dark' ? '#1E293B' : '#FFFFFF',
default: mode === "dark" ? "#0F172A" : "#F8FAFC", // Slate colors
paper: mode === "dark" ? "#1E293B" : "#FFFFFF",
},
text: {
primary: mode === 'dark' ? '#F1F5F9' : '#1E293B',
secondary: mode === 'dark' ? '#CBD5E1' : '#475569',
primary: mode === "dark" ? "#F1F5F9" : "#1E293B",
secondary: mode === "dark" ? "#CBD5E1" : "#475569",
},
},
typography: {
Expand Down Expand Up @@ -62,58 +59,59 @@ function App() {
MuiContainer: {
styleOverrides: {
root: {
'@media (min-width: 1200px)': {
maxWidth: '1400px',
"@media (min-width: 1200px)": {
maxWidth: "1400px",
},
},
},
},
MuiPaper: {
styleOverrides: {
root: {
backgroundImage: 'none',
backgroundImage: "none",
},
},
},
},
}),
[mode],
[mode]
);

const toggleColorMode = () => {
setMode((prevMode) => (prevMode === 'light' ? 'dark' : 'light'));
setMode((prevMode) => (prevMode === "light" ? "dark" : "light"));
};

return (
<ThemeProvider theme={theme}>
<CssBaseline />
<Router>
<Box
sx={{
width: '100%',
margin: 0,
<Box
sx={{
width: "100%",
margin: 0,
padding: 0,
overflow: 'hidden',
minHeight: '100vh',
bgcolor: 'background.default',
color: 'text.primary',
position: 'relative',
'&::before': {
overflow: "hidden",
minHeight: "100vh",
bgcolor: "background.default",
color: "text.primary",
position: "relative",
"&::before": {
content: '""',
position: 'fixed',
position: "fixed",
top: 0,
left: 0,
right: 0,
bottom: 0,
background: mode === 'dark'
? 'radial-gradient(circle at center, rgba(124, 58, 237, 0.1) 0%, rgba(15, 23, 42, 0) 70%)'
: 'radial-gradient(circle at center, rgba(109, 40, 217, 0.05) 0%, rgba(248, 250, 252, 0) 70%)',
pointerEvents: 'none',
background:
mode === "dark"
? "radial-gradient(circle at center, rgba(124, 58, 237, 0.1) 0%, rgba(15, 23, 42, 0) 70%)"
: "radial-gradient(circle at center, rgba(109, 40, 217, 0.05) 0%, rgba(248, 250, 252, 0) 70%)",
pointerEvents: "none",
zIndex: 1,
},
}}
>
<Box sx={{ position: 'relative', zIndex: 2 }}>
<Box sx={{ position: "relative", zIndex: 2 }}>
<Navbar colorMode={{ mode, toggleColorMode }} />
<Hero />
<About />
Expand Down
2 changes: 1 addition & 1 deletion vite.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ import react from "@vitejs/plugin-react";
// https://vite.dev/config/
export default defineConfig({
plugins: [react()],
base: "./portfolio/",
base: "/portfolio/",
});

0 comments on commit 532e7a1

Please sign in to comment.