Repository: devmahmud/material-ui-portfolio
Branch: master
Commit: 0e15e71cd64a
Files: 21
Total size: 32.3 KB
Directory structure:
gitextract_4l3ugflj/
├── .gitignore
├── LICENSE
├── README.md
├── package.json
├── public/
│ ├── index.html
│ ├── manifest.json
│ └── robots.txt
└── src/
├── App.css
├── App.js
├── App.test.js
├── components/
│ ├── Contact.js
│ ├── Footer.js
│ ├── Header.js
│ ├── Navbar.js
│ ├── Particles.js
│ ├── Portfolio.js
│ ├── Resume.js
│ └── index.js
├── index.js
├── serviceWorker.js
└── setupTests.js
================================================
FILE CONTENTS
================================================
================================================
FILE: .gitignore
================================================
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
# dependencies
/node_modules
/.pnp
.pnp.js
# testing
/coverage
# production
/build
# misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local
npm-debug.log*
yarn-debug.log*
yarn-error.log*
================================================
FILE: LICENSE
================================================
MIT License
Copyright (c) 2020 Mahmudul Alam
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
================================================
FILE: README.md
================================================
## Material UI Portfolio
A portfolio single page application using React and Material UI
### Demo of this site available here [Material-UI-Portfolio Demo](https://materialui-portfolio.netlify.app/)
#### Installing
Clone the repository using following command or download
```
git clone https://github.com/devmahmud/material-ui-portfolio.git
```
#### To install dependency
```
npm install
```
#### To start the server
```
npm start
```
#### For Production Build
```
npm run build
```
Server will be available at http://127.0.0.1:3000 in your browser
# Project snapshot
## Home page

## Sidebar

## Resume

## Portfolio

## Contact

## Author
<blockquote>
Mahmudul alam
Email: expelmahmud@gmail.com
</blockquote>
========Thank You !!!=========
================================================
FILE: package.json
================================================
{
"name": "portfolio",
"version": "0.1.0",
"private": true,
"dependencies": {
"@material-ui/core": "^4.10.2",
"@material-ui/icons": "^4.9.1",
"@material-ui/styles": "^4.10.0",
"@testing-library/jest-dom": "^4.2.4",
"@testing-library/react": "^9.5.0",
"@testing-library/user-event": "^7.2.1",
"i": "^0.3.6",
"npm": "^6.14.5",
"react": "^16.13.1",
"react-dom": "^16.13.1",
"react-particles-js": "^3.2.1",
"react-router-dom": "^5.2.0",
"react-scripts": "3.4.1",
"react-typed": "^1.2.0"
},
"scripts": {
"start": "react-scripts --openssl-legacy-provider start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"
},
"eslintConfig": {
"extends": "react-app"
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
}
}
================================================
FILE: public/index.html
================================================
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="description" content="Portfolio application" />
<title>Portfolio</title>
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
<div id="root"></div>
<!--
This HTML file is a template.
If you open it directly in the browser, you will see an empty page.
You can add webfonts, meta tags, or analytics to this file.
The build step will place the bundled scripts into the <body> tag.
To begin the development, run `npm start` or `yarn start`.
To create a production bundle, use `npm run build` or `yarn build`.
-->
</body>
</html>
================================================
FILE: public/manifest.json
================================================
{
"short_name": "React App",
"name": "Create React App Sample",
"icons": [
{
"src": "favicon.ico",
"sizes": "64x64 32x32 24x24 16x16",
"type": "image/x-icon"
},
{
"src": "logo192.png",
"type": "image/png",
"sizes": "192x192"
},
{
"src": "logo512.png",
"type": "image/png",
"sizes": "512x512"
}
],
"start_url": ".",
"display": "standalone",
"theme_color": "#000000",
"background_color": "#ffffff"
}
================================================
FILE: public/robots.txt
================================================
# https://www.robotstxt.org/robotstxt.html
User-agent: *
Disallow:
================================================
FILE: src/App.css
================================================
body {
background: url(coffee-apple.jpg) no-repeat center center fixed;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
}
================================================
FILE: src/App.js
================================================
import React from "react";
import { Route, Switch } from "react-router-dom";
import CssBaseline from "@material-ui/core/CssBaseline";
import Home from "./components";
import Resume from "./components/Resume";
import Navbar from "./components/Navbar";
import Portfolio from "./components/Portfolio";
import Contact from "./components/Contact";
import "./App.css";
function App() {
return (
<React.Fragment>
<CssBaseline />
<Navbar />
<Switch>
<Route exact path="/" component={Home} />
<Route exact path="/resume" component={Resume} />
<Route exact path="/portfolio" component={Portfolio} />
<Route exact path="/contact" component={Contact} />
</Switch>
</React.Fragment>
);
}
export default App;
================================================
FILE: src/App.test.js
================================================
import React from 'react';
import { render } from '@testing-library/react';
import App from './App';
test('renders learn react link', () => {
const { getByText } = render(<App />);
const linkElement = getByText(/learn react/i);
expect(linkElement).toBeInTheDocument();
});
================================================
FILE: src/components/Contact.js
================================================
import React from "react";
import { makeStyles, withStyles } from "@material-ui/core/styles";
import Box from "@material-ui/core/Box";
import TextField from "@material-ui/core/TextField";
import Typography from "@material-ui/core/Typography";
import Grid from "@material-ui/core/Grid";
import Button from "@material-ui/core/Button";
import Send from "@material-ui/icons/Send";
const useStyles = makeStyles((theme) => ({
contactContainer: {
background: "#233",
height: "100vh",
},
heading: {
color: "tomato",
textAlign: "center",
textTransform: "uppercase",
marginBottom: "1rem",
},
form: {
top: "50%",
left: "50%",
transform: "translate(-50%, -50%)",
position: "absolute",
},
input: {
color: "#fff",
},
button: {
marginTop: "1rem",
color: "tomato",
borderColor: "tan",
},
field: {
margin: "1rem 0rem",
},
}));
const InputField = withStyles({
root: {
"& label.Mui-focused": {
color: "tomato",
},
"& label": {
color: "tan",
},
"& .MuiOutlinedInput-root": {
"& fieldset": {
borderColor: "tan",
},
"&:hover fieldset": {
borderColor: "tan",
},
"&.Mui-focused fieldset": {
color: "#fff",
borderColor: "tan",
},
},
},
})(TextField);
const Contact = () => {
const classes = useStyles();
return (
<Box component="div" className={classes.contactContainer}>
<Grid container justify="center">
<Box component="form" className={classes.form}>
<Typography variant="h5" className={classes.heading}>
Hire or Contact me...
</Typography>
<InputField
fullWidth={true}
label="Name"
variant="outlined"
inputProps={{ className: classes.input }}
/>
<InputField
fullWidth={true}
label="Email"
variant="outlined"
inputProps={{ className: classes.input }}
className={classes.field}
/>
<InputField
fullWidth={true}
label="Message"
variant="outlined"
multiline
rows={4}
inputProps={{ className: classes.input }}
/>
<Button
variant="outlined"
fullWidth={true}
endIcon={<Send />}
className={classes.button}
>
Contact Me
</Button>
</Box>
</Grid>
</Box>
);
};
export default Contact;
================================================
FILE: src/components/Footer.js
================================================
import React from "react";
import { makeStyles } from "@material-ui/core/styles";
import BottomNavigation from "@material-ui/core/BottomNavigation";
import BottomNavigationAction from "@material-ui/core/BottomNavigationAction";
import Facebook from "@material-ui/icons/Facebook";
import Twitter from "@material-ui/icons/Twitter";
import Instagram from "@material-ui/icons/Instagram";
const useStyles = makeStyles({
bottomNavContainer: {
background: "#222",
height: "55px",
overflow: "hidden",
},
root: {
"& .MuiSvgIcon-root": {
fill: "tan",
"&:hover": {
fill: "tomato",
fontSize: "1.8rem",
},
},
},
});
const Footer = () => {
const classes = useStyles();
return (
<BottomNavigation className={classes.bottomNavContainer}>
<BottomNavigationAction icon={<Facebook />} className={classes.root} />
<BottomNavigationAction icon={<Twitter />} className={classes.root} />
<BottomNavigationAction icon={<Instagram />} className={classes.root} />
</BottomNavigation>
);
};
export default Footer;
================================================
FILE: src/components/Header.js
================================================
import React from "react";
import Typography from "@material-ui/core/Typography";
import Avatar from "@material-ui/core/Avatar";
import Grid from "@material-ui/core/Grid";
import Box from "@material-ui/core/Box";
import Typed from "react-typed";
import { makeStyles } from "@material-ui/core/styles";
import avatar from "../avatar.png";
const useStyles = makeStyles((theme) => ({
avatar: {
width: theme.spacing(15),
height: theme.spacing(15),
margin: theme.spacing(1),
},
title: {
color: "tomato",
},
subtitle: {
color: "tan",
textTransform: "uppercase",
},
typedContainer: {
position: "absolute",
top: "50%",
left: "50%",
transform: "translate(-50%,-50%)",
width: "100vw",
textAlign: "center",
zIndex: 1,
},
}));
const Header = () => {
const classes = useStyles();
return (
<Box className={classes.typedContainer}>
<Grid container justify="center">
<Avatar className={classes.avatar} src={avatar} alt="Mahmudul Alam" />
</Grid>
<Typography className={classes.title} variant="h4">
<Typed strings={["Mahmudul Alam"]} typeSpeed={40} />
</Typography>
<Typography className={classes.subtitle} variant="h5">
<Typed
strings={[
"Frontend Developer",
"Backend Developer",
"Native App Developer",
]}
typeSpeed={40}
backSpeed={50}
loop
/>
</Typography>
</Box>
);
};
export default Header;
================================================
FILE: src/components/Navbar.js
================================================
import React, { useState } from "react";
import { Link } from "react-router-dom";
import Drawer from "@material-ui/core/Drawer";
import Box from "@material-ui/core/Box";
import AppBar from "@material-ui/core/AppBar";
import Toolbar from "@material-ui/core/Toolbar";
import IconButton from "@material-ui/core/IconButton";
import List from "@material-ui/core/List";
import ListItem from "@material-ui/core/ListItem";
import ListItemIcon from "@material-ui/core/ListItemIcon";
import ListItemText from "@material-ui/core/ListItemText";
import Avatar from "@material-ui/core/Avatar";
import Divider from "@material-ui/core/Divider";
import Typography from "@material-ui/core/Typography";
import ArrowBack from "@material-ui/icons/ArrowBack";
import AssignmentInd from "@material-ui/icons/AssignmentInd";
import Home from "@material-ui/icons/Home";
import Apps from "@material-ui/icons/Apps";
import ContactMail from "@material-ui/icons/ContactMail";
import { makeStyles } from "@material-ui/core/styles";
import avatar from "../avatar.png";
import Footer from "../components/Footer";
const useStyles = makeStyles((theme) => ({
appbar: {
background: "#222",
margin: 0,
},
arrow: {
color: "tomato",
},
title: {
color: "tan",
},
menuSliderContainer: {
width: 250,
background: "#511",
height: "100%",
},
avatar: {
display: "block",
margin: "0.5rem auto",
width: theme.spacing(13),
height: theme.spacing(13),
},
listItem: {
color: "tan",
},
}));
const menuItems = [
{ listIcon: <Home />, listText: "Home", listPath: "/" },
{ listIcon: <AssignmentInd />, listText: "Resume", listPath: "/resume" },
{ listIcon: <Apps />, listText: "Portfolio", listPath: "/portfolio" },
{ listIcon: <ContactMail />, listText: "Contact", listPath: "/contact" },
];
const Navbar = () => {
const [open, setOpen] = useState(false);
const classes = useStyles();
const sideList = () => (
<Box className={classes.menuSliderContainer} component="div">
<Avatar className={classes.avatar} src={avatar} alt="Mahmudul Alam" />
<Divider />
<List>
{menuItems.map((item, i) => (
<ListItem
button
key={i}
className={classes.listItem}
onClick={() => setOpen(false)}
component={Link}
to={item.listPath}
>
<ListItemIcon className={classes.listItem}>
{item.listIcon}
</ListItemIcon>
<ListItemText primary={item.listText} />
</ListItem>
))}
</List>
</Box>
);
return (
<React.Fragment>
<Box component="nav">
<AppBar position="static" className={classes.appbar}>
<Toolbar>
<IconButton onClick={() => setOpen(true)}>
<ArrowBack className={classes.arrow} />
</IconButton>
<Typography variant="h5" className={classes.title}>
Portfolio
</Typography>
</Toolbar>
</AppBar>
</Box>
<Drawer open={open} anchor="right" onClose={() => setOpen(false)}>
{sideList()}
<Footer />
</Drawer>
</React.Fragment>
);
};
export default Navbar;
================================================
FILE: src/components/Particles.js
================================================
import React from "react";
import { Particles as ReactParticles } from "react-particles-js";
import { makeStyles } from "@material-ui/core/styles";
const useStyles = makeStyles((theme) => ({
particlesCanvas: {
position: "fixed",
opacity: "0.3"
},
}));
const Particles = () => {
const classes = useStyles();
return (
<ReactParticles
canvasClassName={classes.particlesCanvas}
params={{
particles: {
number: {
value: 45,
density: {
enable: true,
value_area: 800,
},
},
shape: {
type: "circle",
stroke: {
width: 1,
color: "tomato",
},
},
size: {
value: 8,
random: true,
anim: {
enable: false,
speed: 6,
size_min: 0,
sync: true,
},
},
opacity: {
value: 0.5,
random: true,
anim: {
enable: true,
speed: 1,
opacity_min: 0.1,
sync: false,
},
},
},
}}
/>
);
};
export default Particles;
================================================
FILE: src/components/Portfolio.js
================================================
import React from "react";
import { makeStyles } from "@material-ui/core/styles";
import Box from "@material-ui/core/Box";
import Grid from "@material-ui/core/Grid";
import Card from "@material-ui/core/Card";
import CardActionArea from "@material-ui/core/CardActionArea";
import CardActions from "@material-ui/core/CardActions";
import CardContent from "@material-ui/core/CardContent";
import CardMedia from "@material-ui/core/CardMedia";
import Button from "@material-ui/core/Button";
import Typography from "@material-ui/core/Typography";
import project1 from "../images/html-css-javascript-lg.jpg";
import project2 from "../images/html-css-javascript.jpg";
import project3 from "../images/javascript-fullstack.jpg";
import project4 from "../images/mern-stack.jpg";
import project5 from "../images/react-redux.jpg";
import project6 from "../images/react.png";
const useStyles = makeStyles((theme) => ({
mainContainer: {
background: "#233",
height: "100%",
},
cardContainer: {
maxWidth: 345,
margin: "3rem auto",
},
}));
const projects = [
{
name: "Project 1",
description: `Lorem ipsum dolor sit, amet consectetur adipisicing elit. Quis
consequatur magni quod nesciunt necessitatibus molestiae non
eligendi, magnam est aliquam recusandae? Magnam soluta minus
iste alias sunt veritatis nisi dolores!`,
image: project1,
},
{
name: "Project 2",
description: `Lorem ipsum dolor sit, amet consectetur adipisicing elit. Quis\
consequatur magni quod nesciunt necessitatibus molestiae non\
eligendi, magnam est aliquam recusandae? Magnam soluta minus\
iste alias sunt veritatis nisi dolores!`,
image: project2,
},
{
name: "Project 3",
description: `Lorem ipsum dolor sit, amet consectetur adipisicing elit. Quis\
consequatur magni quod nesciunt necessitatibus molestiae non\
eligendi, magnam est aliquam recusandae? Magnam soluta minus\
iste alias sunt veritatis nisi dolores!`,
image: project3,
},
{
name: "Project 4",
description: `Lorem ipsum dolor sit, amet consectetur adipisicing elit. Quis\
consequatur magni quod nesciunt necessitatibus molestiae non\
eligendi, magnam est aliquam recusandae? Magnam soluta minus\
iste alias sunt veritatis nisi dolores!`,
image: project4,
},
{
name: "Project 5",
description: `Lorem ipsum dolor sit, amet consectetur adipisicing elit. Quis\
consequatur magni quod nesciunt necessitatibus molestiae non\
eligendi, magnam est aliquam recusandae? Magnam soluta minus\
iste alias sunt veritatis nisi dolores!`,
image: project5,
},
{
name: "Project 6",
description: `Lorem ipsum dolor sit, amet consectetur adipisicing elit. Quis\
consequatur magni quod nesciunt necessitatibus molestiae non\
eligendi, magnam est aliquam recusandae? Magnam soluta minus\
iste alias sunt veritatis nisi dolores!`,
image: project6,
},
];
const Portfolio = () => {
const classes = useStyles();
return (
<Box component="div" className={classes.mainContainer}>
<Grid container justify="center">
{/* Projects */}
{projects.map((project, i) => (
<Grid item xs={12} sm={8} md={4} key={i}>
<Card className={classes.cardContainer}>
<CardActionArea>
<CardMedia
component="img"
alt="Project 1"
height="140"
image={project.image}
/>
<CardContent>
<Typography variant="h5" gutterBottom>
{project.name}
</Typography>
<Typography variant="body2" color="textSecondary">
{project.description}
</Typography>
</CardContent>
</CardActionArea>
<CardActions>
<Button size="small" color="primary">
Share
</Button>
<Button size="small" color="primary">
Live Demo
</Button>
</CardActions>
</Card>
</Grid>
))}
</Grid>
</Box>
);
};
export default Portfolio;
================================================
FILE: src/components/Resume.js
================================================
import React from "react";
import { makeStyles } from "@material-ui/core/styles";
import Typography from "@material-ui/core/Typography";
import Box from "@material-ui/core/Box";
const useStyles = makeStyles((theme) => ({
mainContainer: {
background: "#233",
},
timeLine: {
position: "relative",
padding: "1rem",
margin: "o auto",
"&:before": {
content: "''",
position: "absolute",
height: "100%",
border: "1px solid tan",
right: "40px",
top: 0,
},
"&:after": {
content: "''",
display: "table",
clear: "both",
},
[theme.breakpoints.up("md")]: {
padding: "2rem",
"&:before": {
left: "calc(50% - 1px)",
right: "auto",
},
},
},
timeLineItem: {
padding: "1rem",
borderBottom: "2px solid tan",
position: "relative",
margin: "1rem 3rem 1rem 1rem",
clear: "both",
"&:after": {
content: "''",
position: "absolute",
},
"&:before": {
content: "''",
position: "absolute",
right: "-0.625rem",
top: "calc(50% - 5px)",
borderStyle: "solid",
borderColor: "tomato tomato transparent transparent",
borderWidth: "0.625rem",
transform: "rotate(45deg)",
},
[theme.breakpoints.up("md")]: {
width: "44%",
margin: "1rem",
"&:nth-of-type(2n)": {
float: "right",
margin: "1rem",
borderColor: "tan",
},
"&:nth-of-type(2n):before": {
right: "auto",
left: "-0.625rem",
borderColor: "transparent transparent tomato tomato",
},
},
},
timeLineYear: {
textAlign: "center",
maxWidth: "9.375rem",
margin: "0 3rem 0 auto",
fontSize: "1.8rem",
color: "#fff",
background: "tomato",
lineHeight: 1,
padding: "0.5rem 1rem",
"&:before": {
display: "none",
},
[theme.breakpoints.up("md")]: {
textAlign: "center",
margin: "0 auto",
"&:nth-of-type(2n)": {
float: "none",
margin: "0 auto",
},
"&:nth-of-type(2n):before": {
display: "none",
},
},
},
heading: {
color: "tomato",
padding: "3rem 0",
textTransform: "uppercase",
},
subHeading: {
color: "#fff",
padding: 0,
textTransform: "uppercase",
},
body1: {
color: "tomato",
},
subtitle1: {
color: "tan",
},
}));
const Resume = () => {
const classes = useStyles();
return (
<Box component="header" className={classes.mainContainer}>
<Typography variant="h4" align="center" className={classes.heading}>
Working Experience
</Typography>
<Box component="div" className={classes.timeLine}>
<Typography
variant="h2"
className={`${classes.timeLineYear} ${classes.timeLineItem}`}
>
2013
</Typography>
<Box component="div" className={classes.timeLineItem}>
<Typography
variant="h5"
align="center"
className={classes.subHeading}
>
web design
</Typography>
<Typography variant="body1" align="center" className={classes.body1}>
company name where worked
</Typography>
<Typography
variant="subtitle1"
align="center"
className={classes.subtitle1}
>
Lorem ipsum dolor sit amet consectetur adipisicing elit. Vero quas
ipsa, laudantium totam perferendis possimus voluptatibus tenetur.
Quasi voluptatibus, nam vitae eaque ad, officia laboriosam
repudiandae, rerum necessitatibus nisi mollitia.
</Typography>
</Box>
<Typography
variant="h2"
className={`${classes.timeLineYear} ${classes.timeLineItem}`}
>
2014
</Typography>
<Box component="div" className={classes.timeLineItem}>
<Typography
variant="h5"
align="center"
className={classes.subHeading}
>
html & css
</Typography>
<Typography variant="body1" align="center" className={classes.body1}>
company name where worked
</Typography>
<Typography
variant="subtitle1"
align="center"
className={classes.subtitle1}
>
Lorem ipsum dolor sit amet consectetur adipisicing elit. Vero quas
ipsa, laudantium totam perferendis possimus voluptatibus tenetur.
Quasi voluptatibus, nam vitae eaque ad, officia laboriosam
repudiandae, rerum necessitatibus nisi mollitia.
</Typography>
</Box>
<Typography
variant="h2"
className={`${classes.timeLineYear} ${classes.timeLineItem}`}
>
2015
</Typography>
<Box component="div" className={classes.timeLineItem}>
<Typography
variant="h5"
align="center"
className={classes.subHeading}
>
Fullstack Javascript
</Typography>
<Typography variant="body1" align="center" className={classes.body1}>
company name where worked
</Typography>
<Typography
variant="subtitle1"
align="center"
className={classes.subtitle1}
>
Lorem ipsum dolor sit amet consectetur adipisicing elit. Vero quas
ipsa, laudantium totam perferendis possimus voluptatibus tenetur.
Quasi voluptatibus, nam vitae eaque ad, officia laboriosam
repudiandae, rerum necessitatibus nisi mollitia.
</Typography>
</Box>
<Typography
variant="h2"
className={`${classes.timeLineYear} ${classes.timeLineItem}`}
>
2017
</Typography>
<Box component="div" className={classes.timeLineItem}>
<Typography
variant="h5"
align="center"
className={classes.subHeading}
>
Django & React
</Typography>
<Typography variant="body1" align="center" className={classes.body1}>
company name where worked
</Typography>
<Typography
variant="subtitle1"
align="center"
className={classes.subtitle1}
>
Lorem ipsum dolor sit amet consectetur adipisicing elit. Vero quas
ipsa, laudantium totam perferendis possimus voluptatibus tenetur.
Quasi voluptatibus, nam vitae eaque ad, officia laboriosam
repudiandae, rerum necessitatibus nisi mollitia.
</Typography>
</Box>
</Box>
</Box>
);
};
export default Resume;
================================================
FILE: src/components/index.js
================================================
import React from "react";
import Header from "./Header";
import Particles from "./Particles";
const Home = () => {
return (
<React.Fragment>
<Header />
<Particles />
</React.Fragment>
);
};
export default Home;
================================================
FILE: src/index.js
================================================
import React from "react";
import ReactDOM from "react-dom";
import {BrowserRouter as Router} from 'react-router-dom'
import App from "./App";
import * as serviceWorker from "./serviceWorker";
ReactDOM.render(<Router><App /></Router>, document.getElementById("root"));
// If you want your app to work offline and load faster, you can change
// unregister() to register() below. Note this comes with some pitfalls.
// Learn more about service workers: https://bit.ly/CRA-PWA
serviceWorker.unregister();
================================================
FILE: src/serviceWorker.js
================================================
// This optional code is used to register a service worker.
// register() is not called by default.
// This lets the app load faster on subsequent visits in production, and gives
// it offline capabilities. However, it also means that developers (and users)
// will only see deployed updates on subsequent visits to a page, after all the
// existing tabs open on the page have been closed, since previously cached
// resources are updated in the background.
// To learn more about the benefits of this model and instructions on how to
// opt-in, read https://bit.ly/CRA-PWA
const isLocalhost = Boolean(
window.location.hostname === 'localhost' ||
// [::1] is the IPv6 localhost address.
window.location.hostname === '[::1]' ||
// 127.0.0.0/8 are considered localhost for IPv4.
window.location.hostname.match(
/^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/
)
);
export function register(config) {
if (process.env.NODE_ENV === 'production' && 'serviceWorker' in navigator) {
// The URL constructor is available in all browsers that support SW.
const publicUrl = new URL(process.env.PUBLIC_URL, window.location.href);
if (publicUrl.origin !== window.location.origin) {
// Our service worker won't work if PUBLIC_URL is on a different origin
// from what our page is served on. This might happen if a CDN is used to
// serve assets; see https://github.com/facebook/create-react-app/issues/2374
return;
}
window.addEventListener('load', () => {
const swUrl = `${process.env.PUBLIC_URL}/service-worker.js`;
if (isLocalhost) {
// This is running on localhost. Let's check if a service worker still exists or not.
checkValidServiceWorker(swUrl, config);
// Add some additional logging to localhost, pointing developers to the
// service worker/PWA documentation.
navigator.serviceWorker.ready.then(() => {
console.log(
'This web app is being served cache-first by a service ' +
'worker. To learn more, visit https://bit.ly/CRA-PWA'
);
});
} else {
// Is not localhost. Just register service worker
registerValidSW(swUrl, config);
}
});
}
}
function registerValidSW(swUrl, config) {
navigator.serviceWorker
.register(swUrl)
.then(registration => {
registration.onupdatefound = () => {
const installingWorker = registration.installing;
if (installingWorker == null) {
return;
}
installingWorker.onstatechange = () => {
if (installingWorker.state === 'installed') {
if (navigator.serviceWorker.controller) {
// At this point, the updated precached content has been fetched,
// but the previous service worker will still serve the older
// content until all client tabs are closed.
console.log(
'New content is available and will be used when all ' +
'tabs for this page are closed. See https://bit.ly/CRA-PWA.'
);
// Execute callback
if (config && config.onUpdate) {
config.onUpdate(registration);
}
} else {
// At this point, everything has been precached.
// It's the perfect time to display a
// "Content is cached for offline use." message.
console.log('Content is cached for offline use.');
// Execute callback
if (config && config.onSuccess) {
config.onSuccess(registration);
}
}
}
};
};
})
.catch(error => {
console.error('Error during service worker registration:', error);
});
}
function checkValidServiceWorker(swUrl, config) {
// Check if the service worker can be found. If it can't reload the page.
fetch(swUrl, {
headers: { 'Service-Worker': 'script' },
})
.then(response => {
// Ensure service worker exists, and that we really are getting a JS file.
const contentType = response.headers.get('content-type');
if (
response.status === 404 ||
(contentType != null && contentType.indexOf('javascript') === -1)
) {
// No service worker found. Probably a different app. Reload the page.
navigator.serviceWorker.ready.then(registration => {
registration.unregister().then(() => {
window.location.reload();
});
});
} else {
// Service worker found. Proceed as normal.
registerValidSW(swUrl, config);
}
})
.catch(() => {
console.log(
'No internet connection found. App is running in offline mode.'
);
});
}
export function unregister() {
if ('serviceWorker' in navigator) {
navigator.serviceWorker.ready
.then(registration => {
registration.unregister();
})
.catch(error => {
console.error(error.message);
});
}
}
================================================
FILE: src/setupTests.js
================================================
// jest-dom adds custom jest matchers for asserting on DOM nodes.
// allows you to do things like:
// expect(element).toHaveTextContent(/react/i)
// learn more: https://github.com/testing-library/jest-dom
import '@testing-library/jest-dom/extend-expect';
gitextract_4l3ugflj/
├── .gitignore
├── LICENSE
├── README.md
├── package.json
├── public/
│ ├── index.html
│ ├── manifest.json
│ └── robots.txt
└── src/
├── App.css
├── App.js
├── App.test.js
├── components/
│ ├── Contact.js
│ ├── Footer.js
│ ├── Header.js
│ ├── Navbar.js
│ ├── Particles.js
│ ├── Portfolio.js
│ ├── Resume.js
│ └── index.js
├── index.js
├── serviceWorker.js
└── setupTests.js
SYMBOL INDEX (5 symbols across 2 files)
FILE: src/App.js
function App (line 12) | function App() {
FILE: src/serviceWorker.js
function register (line 23) | function register(config) {
function registerValidSW (line 57) | function registerValidSW(swUrl, config) {
function checkValidServiceWorker (line 101) | function checkValidServiceWorker(swUrl, config) {
function unregister (line 131) | function unregister() {
Condensed preview — 21 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (36K chars).
[
{
"path": ".gitignore",
"chars": 310,
"preview": "# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.\n\n# dependencies\n/node_modules\n/.pn"
},
{
"path": "LICENSE",
"chars": 1069,
"preview": "MIT License\n\nCopyright (c) 2020 Mahmudul Alam\n\nPermission is hereby granted, free of charge, to any person obtaining a c"
},
{
"path": "README.md",
"chars": 1317,
"preview": "## Material UI Portfolio\n\nA portfolio single page application using React and Material UI\n\n### Demo of this site availab"
},
{
"path": "package.json",
"chars": 1021,
"preview": "{\n \"name\": \"portfolio\",\n \"version\": \"0.1.0\",\n \"private\": true,\n \"dependencies\": {\n \"@material-ui/core\": \"^4.10.2\""
},
{
"path": "public/index.html",
"chars": 781,
"preview": "<!DOCTYPE html>\n<html lang=\"en\">\n <head>\n <meta charset=\"utf-8\" />\n <meta name=\"viewport\" content=\"width=device-w"
},
{
"path": "public/manifest.json",
"chars": 492,
"preview": "{\n \"short_name\": \"React App\",\n \"name\": \"Create React App Sample\",\n \"icons\": [\n {\n \"src\": \"favicon.ico\",\n "
},
{
"path": "public/robots.txt",
"chars": 67,
"preview": "# https://www.robotstxt.org/robotstxt.html\nUser-agent: *\nDisallow:\n"
},
{
"path": "src/App.css",
"chars": 196,
"preview": "body {\n background: url(coffee-apple.jpg) no-repeat center center fixed;\n -webkit-background-size: cover;\n -moz-backg"
},
{
"path": "src/App.js",
"chars": 766,
"preview": "import React from \"react\";\nimport { Route, Switch } from \"react-router-dom\";\nimport CssBaseline from \"@material-ui/core/"
},
{
"path": "src/App.test.js",
"chars": 280,
"preview": "import React from 'react';\nimport { render } from '@testing-library/react';\nimport App from './App';\n\ntest('renders lear"
},
{
"path": "src/components/Contact.js",
"chars": 2552,
"preview": "import React from \"react\";\nimport { makeStyles, withStyles } from \"@material-ui/core/styles\";\nimport Box from \"@material"
},
{
"path": "src/components/Footer.js",
"chars": 1084,
"preview": "import React from \"react\";\nimport { makeStyles } from \"@material-ui/core/styles\";\nimport BottomNavigation from \"@materia"
},
{
"path": "src/components/Header.js",
"chars": 1520,
"preview": "import React from \"react\";\nimport Typography from \"@material-ui/core/Typography\";\nimport Avatar from \"@material-ui/core/"
},
{
"path": "src/components/Navbar.js",
"chars": 3231,
"preview": "import React, { useState } from \"react\";\nimport { Link } from \"react-router-dom\";\nimport Drawer from \"@material-ui/core/"
},
{
"path": "src/components/Particles.js",
"chars": 1257,
"preview": "import React from \"react\";\nimport { Particles as ReactParticles } from \"react-particles-js\";\nimport { makeStyles } from "
},
{
"path": "src/components/Portfolio.js",
"chars": 4240,
"preview": "import React from \"react\";\nimport { makeStyles } from \"@material-ui/core/styles\";\nimport Box from \"@material-ui/core/Box"
},
{
"path": "src/components/Resume.js",
"chars": 6814,
"preview": "import React from \"react\";\nimport { makeStyles } from \"@material-ui/core/styles\";\nimport Typography from \"@material-ui/c"
},
{
"path": "src/components/index.js",
"chars": 238,
"preview": "import React from \"react\";\nimport Header from \"./Header\";\nimport Particles from \"./Particles\";\n\nconst Home = () => {\n r"
},
{
"path": "src/index.js",
"chars": 504,
"preview": "import React from \"react\";\nimport ReactDOM from \"react-dom\";\nimport {BrowserRouter as Router} from 'react-router-dom'\nim"
},
{
"path": "src/serviceWorker.js",
"chars": 5086,
"preview": "// This optional code is used to register a service worker.\n// register() is not called by default.\n\n// This lets the ap"
},
{
"path": "src/setupTests.js",
"chars": 255,
"preview": "// jest-dom adds custom jest matchers for asserting on DOM nodes.\n// allows you to do things like:\n// expect(element).to"
}
]
About this extraction
This page contains the full source code of the devmahmud/material-ui-portfolio GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 21 files (32.3 KB), approximately 8.3k tokens, and a symbol index with 5 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.