Skip to content

Commit b51c0a2

Browse files
authored
Merge pull request #1 from Midna3/school-screen
feat: adding school screen
2 parents f7a6c3d + 963faef commit b51c0a2

18 files changed

+468
-93
lines changed

package.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,18 @@
33
"version": "0.1.0",
44
"private": true,
55
"dependencies": {
6+
"@stitches/react": "^1.2.8",
67
"@testing-library/jest-dom": "^5.14.1",
78
"@testing-library/react": "^12.0.0",
89
"@testing-library/user-event": "^13.2.1",
910
"@types/jest": "^27.0.1",
1011
"@types/node": "^16.7.13",
1112
"@types/react": "^17.0.20",
1213
"@types/react-dom": "^17.0.9",
14+
"chart.js": "^3.7.1",
1315
"react": "^18.0.0",
16+
"react-chartjs-2": "^4.1.0",
17+
"react-circular-progressbar": "^2.0.4",
1418
"react-dom": "^18.0.0",
1519
"react-scripts": "5.0.0",
1620
"typescript": "^4.4.2",

public/Location.png

552 Bytes
Loading

public/favicon.ico

-3.78 KB
Binary file not shown.

public/index.html

Lines changed: 25 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,19 @@
11
<!DOCTYPE html>
22
<html lang="en">
3-
<head>
4-
<meta charset="utf-8" />
5-
<link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
6-
<meta name="viewport" content="width=device-width, initial-scale=1" />
7-
<meta name="theme-color" content="#000000" />
8-
<meta
9-
name="description"
10-
content="Web site created using create-react-app"
11-
/>
12-
<link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" />
13-
<!--
3+
4+
<head>
5+
<meta charset="utf-8" />
6+
<link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
7+
<meta name="viewport" content="width=device-width, initial-scale=1" />
8+
<meta name="theme-color" content="#000000" />
9+
<meta name="description" content="Web site created using create-react-app" />
10+
<link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" />
11+
<!--
1412
manifest.json provides metadata used when your web app is installed on a
1513
user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
1614
-->
17-
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
18-
<!--
15+
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
16+
<!--
1917
Notice the use of %PUBLIC_URL% in the tags above.
2018
It will be replaced with the URL of the `public` folder during the build.
2119
Only files inside the `public` folder can be referenced from the HTML.
@@ -24,12 +22,17 @@
2422
work correctly both with client-side routing and a non-root public URL.
2523
Learn how to configure a non-root public URL by running `npm run build`.
2624
-->
27-
<title>React App</title>
28-
</head>
29-
<body>
30-
<noscript>You need to enable JavaScript to run this app.</noscript>
31-
<div id="root"></div>
32-
<!--
25+
<link rel="preconnect" href="https://fonts.googleapis.com">
26+
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
27+
<link href="https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;700&display=swap" rel="stylesheet">
28+
29+
<title>React App</title>
30+
</head>
31+
32+
<body>
33+
<noscript>You need to enable JavaScript to run this app.</noscript>
34+
<div id="root"></div>
35+
<!--
3336
This HTML file is a template.
3437
If you open it directly in the browser, you will see an empty page.
3538
@@ -39,5 +42,6 @@
3942
To begin the development, run `npm start` or `yarn start`.
4043
To create a production bundle, use `npm run build` or `yarn build`.
4144
-->
42-
</body>
43-
</html>
45+
</body>
46+
47+
</html>

public/logo192.png

-5.22 KB
Binary file not shown.

public/logo512.png

-9.44 KB
Binary file not shown.

public/manifest.json

Lines changed: 0 additions & 25 deletions
This file was deleted.

public/robots.txt

Lines changed: 0 additions & 3 deletions
This file was deleted.

src/App.test.tsx

Lines changed: 0 additions & 9 deletions
This file was deleted.

src/App.tsx

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,9 @@
11
import React from 'react';
2-
import logo from './logo.svg';
3-
import './App.css';
2+
import Home from './pages/Home';
43

54
function App() {
65
return (
7-
<div className="App">
8-
<header className="App-header">
9-
<img src={logo} className="App-logo" alt="logo" />
10-
<p>
11-
Edit <code>src/App.tsx</code> and save to reload.
12-
</p>
13-
<a
14-
className="App-link"
15-
href="https://reactjs.org"
16-
target="_blank"
17-
rel="noopener noreferrer"
18-
>
19-
Learn React
20-
</a>
21-
</header>
22-
</div>
6+
<Home/>
237
);
248
}
259

src/components/Header.tsx

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import React from 'react';
2+
3+
4+
export default function Header() {
5+
return (
6+
<div style={{backgroundColor: 'black', width: '100%', height: 97}}>
7+
ALOW
8+
</div>
9+
);
10+
}

src/components/LineChart.tsx

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
import React from 'react';
2+
/* import { Line } from 'react-chartjs-2';
3+
import {Chart as ChartJS} from 'chart.js/auto' */
4+
import { Chart as ChartJS, registerables } from 'chart.js';
5+
import { Line } from 'react-chartjs-2'
6+
ChartJS.register(...registerables);
7+
8+
export type DataProp = {
9+
labels: number[];
10+
datasets: {
11+
label: string;
12+
data: number[];
13+
}[];
14+
}
15+
16+
type ChartDataProp = {
17+
Data: DataProp;
18+
}
19+
20+
export default function LineChart(props: ChartDataProp) {
21+
return (
22+
<div>
23+
<Line data={props.Data} />
24+
</div>
25+
);
26+
}

src/index.css

Lines changed: 0 additions & 13 deletions
This file was deleted.

src/index.tsx

Lines changed: 34 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,45 @@
11
import React from 'react';
22
import ReactDOM from 'react-dom';
3-
import './index.css';
3+
import { createRoot } from "react-dom/client";
4+
45
import App from './App';
6+
import { globalCss } from '@stitches/react';
7+
import Header from './components/Header';
8+
59
import reportWebVitals from './reportWebVitals';
610

7-
ReactDOM.render(
11+
12+
const rootElement = document.getElementById("root");
13+
const root = createRoot(rootElement as Element);
14+
15+
const globalStyles = globalCss({
16+
'*': {
17+
margin: 0,
18+
padding: 0,
19+
boxSizing: 'border-box'
20+
},
21+
'#root': {
22+
height: '100%',
23+
fontFamily: 'DM Sans',
24+
},
25+
'html': {
26+
height: '100%',
27+
fontFamily: 'DM Sans',
28+
},
29+
'body': {
30+
height: '100%',
31+
fontFamily: 'DM Sans',
32+
}
33+
34+
});
35+
36+
globalStyles();
37+
38+
root.render(
839
<React.StrictMode>
40+
<Header/>
941
<App />
1042
</React.StrictMode>,
11-
document.getElementById('root')
1243
);
1344

1445
// If you want to start measuring performance in your app, pass a function

src/logo.svg

Lines changed: 0 additions & 1 deletion
This file was deleted.

src/pages/Data.ts

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
export const Data = {
2+
matriculados: [
3+
{
4+
year: 2019,
5+
amount: 100,
6+
},
7+
{
8+
year: 2020,
9+
amount: 250,
10+
},
11+
{
12+
year: 2021,
13+
amount: 90,
14+
},
15+
{
16+
year: 2022,
17+
amount: 130,
18+
},
19+
],
20+
docentes: [
21+
{
22+
year: 2019,
23+
amount: 250,
24+
},
25+
{
26+
year: 2020,
27+
amount: 100,
28+
},
29+
{
30+
year: 2021,
31+
amount: 50,
32+
},
33+
{
34+
year: 2022,
35+
amount: 130,
36+
},
37+
],
38+
};

0 commit comments

Comments
 (0)