Commit c14945dc authored by Ondřej Bazala's avatar Ondřej Bazala
Browse files

Initial commit

parents
# 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*
# PV247
Team project.
\ No newline at end of file
{
"name": "pv247-project",
"version": "0.1.0",
"private": true,
"dependencies": {
"@emotion/react": "^11.4.1",
"@emotion/styled": "^11.3.0",
"@mui/icons-material": "^5.0.1",
"@mui/material": "^5.0.2",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react-router-dom": "^5.3.0",
"react-scripts": "4.0.3"
},
"devDependencies": {
"@types/node": "^12.0.0",
"@types/react": "^17.0.0",
"@types/react-dom": "^17.0.0",
"@types/react-router-dom": "^5.3.1",
"eslint-config-haaxor1689s-config": "^1.3.0",
"typescript": "^4.1.2"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject",
"lint": "eslint \"./src/**/*.{ts,tsx}\" && prettier \"./src/**/*.{ts,tsx}\" --check"
},
"eslintConfig": {
"extends": "haaxor1689s-config"
},
"prettier": "prettier-config-haaxor1689s-config",
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
}
}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="theme-color" content="#000000" />
<meta
name="description"
content="Web site created using create-react-app"
/>
<!--
manifest.json provides metadata used when your web app is installed on a
user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
-->
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
<!--
Notice the use of %PUBLIC_URL% in the tags above.
It will be replaced with the URL of the `public` folder during the build.
Only files inside the `public` folder can be referenced from the HTML.
Unlike "/favicon.ico" or "favicon.ico", "%PUBLIC_URL%/favicon.ico" will
work correctly both with client-side routing and a non-root public URL.
Learn how to configure a non-root public URL by running `npm run build`.
-->
<title>PV247</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>
{
"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"
}
# https://www.robotstxt.org/robotstxt.html
User-agent: *
Disallow:
import {
AppBar,
Button,
Container,
CssBaseline,
ThemeProvider,
Toolbar
} from '@mui/material';
import { BrowserRouter, Link, Route, Switch } from 'react-router-dom';
import Home from './pages/Home';
import theme from './theme';
const App = () => (
<ThemeProvider theme={theme}>
<BrowserRouter>
<CssBaseline />
<AppBar position="fixed">
<Container maxWidth="sm">
<Toolbar disableGutters sx={{ gap: 2 }}>
<Button component={Link} to="/">
Home
</Button>
</Toolbar>
</Container>
</AppBar>
<Container
maxWidth="sm"
component="main"
sx={{
display: 'flex',
flexDirection: 'column',
justifyContent: 'center',
alignItems: 'center',
height: '100vh',
pt: 8,
gap: 2
}}
>
<Switch>
<Route path="/" exact component={Home} />
</Switch>
</Container>
</BrowserRouter>
</ThemeProvider>
);
export default App;
import { StrictMode } from 'react';
import ReactDOM from 'react-dom';
import App from './App';
ReactDOM.render(
<StrictMode>
<App />
</StrictMode>,
document.getElementById('root')
);
import { Box, Typography } from '@mui/material';
const Home = () => (
<Box sx={{ display: 'flex', alignItems: 'center' }}>
<Typography variant="h1" fontWeight="bolder">
Pokemon game?
</Typography>
</Box>
);
export default Home;
/// <reference types="react-scripts" />
import { createTheme } from '@mui/material';
declare module '@mui/material/styles' {
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions
interface Palette {
playerX?: string;
playerO?: string;
}
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions
interface PaletteOptions {
playerX?: string;
playerO?: string;
}
}
const theme = createTheme({
palette: {
primary: { main: '#f2d45c' },
playerX: '#f25a5a',
playerO: '#5a8cf2',
mode: 'dark'
}
});
export default theme;
{
"compilerOptions": {
"target": "es5",
"lib": ["dom", "dom.iterable", "esnext"],
"allowJs": true,
"skipLibCheck": true,
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,
"strict": true,
"forceConsistentCasingInFileNames": true,
"noFallthroughCasesInSwitch": true,
"module": "esnext",
"moduleResolution": "node",
"resolveJsonModule": true,
"isolatedModules": true,
"noEmit": true,
"jsx": "react-jsx"
},
"include": ["src"]
}
This diff is collapsed.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment