Skip to content

Commit 49bf443

Browse files
committed
2 parents ff131da + 8687fd0 commit 49bf443

10 files changed

Lines changed: 700 additions & 43 deletions

File tree

.ipynb_checkpoints/index-checkpoint.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<title>devs-sesa-beginner-hackathon-2026</title>
88
</head>
99
<body>
10-
<div id="root"></div>
10+
<div id="root" style="height:100%"></div>
1111
<script type="module" src="/src/main.tsx"></script>
1212
</body>
1313
</html>

index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
<title>devs-sesa-beginner-hackathon-2026</title>
88
</head>
99
<body>
10-
<div id="root"></div>
1110
<script src="https://cdn.jsdelivr.net/pyodide/v0.27.0/full/pyodide.js"></script>
11+
<div id="root" style="height:100%"></div>
1212
<script type="module" src="/src/main.tsx"></script>
1313
</body>
1414
</html>

package-lock.json

Lines changed: 8 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212
"dependencies": {
1313
"react": "^19.2.4",
1414
"react-dom": "^19.2.4",
15-
"react-router": "^7.14.1"
15+
"react-router": "^7.14.1",
16+
"three": "^0.184.0"
1617
},
1718
"devDependencies": {
1819
"@eslint/js": "^9.39.4",
Lines changed: 22 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,29 @@
1-
import Button from "../../components/button/Button";
1+
import { useEffect, useRef } from "react";
2+
import { main } from "./solarsystem.js";
23
import styles from "./Home.module.css";
3-
import {useState} from "react";
44

5-
// The home page of the application.
5+
function Home() {
6+
7+
const canvasRef = useRef<HTMLCanvasElement | null>(null);
68

9+
useEffect(() => {
10+
11+
if (!canvasRef.current) return;
12+
13+
main(canvasRef.current);
714

8-
// function Home() {
15+
}, []);
916

10-
// let [x, setX] = useState<number>(0);
11-
// function print() {
12-
// setX(a => a+1);
13-
// console.log(`PRINTED: ${x}`);
14-
// }
15-
16-
// return (
17-
// <div>
18-
// <header className="page"></header>
19-
// <canvas id=""></canvas>
20-
// </div>
21-
// );
22-
// }
17+
return (
18+
<>
19+
<header>
20+
<div className={styles["header-brand"]}>
21+
<h1>Glorpython</h1>
22+
</div>
23+
</header>
24+
<canvas ref={canvasRef} className={styles.solarsystem}></canvas>
25+
</>
26+
);
27+
}
2328

2429
export default Home;
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
* {
2+
margin: 0;
3+
padding: 0;
4+
border: 0;
5+
font-size: 100%;
6+
vertical-align: baseline;
7+
overflow: hidden;
8+
/* outline: 1px solid red !important; */
9+
}
10+
11+
html, body {
12+
width: 100%;
13+
height: 100%;
14+
user-select: none;
15+
}
16+
17+
header {
18+
width: 100%;
19+
position: fixed;
20+
z-index: 1;
21+
display: flex;
22+
justify-content: center;
23+
24+
.header-brand {
25+
width: 80%;
26+
margin-top: 40px;
27+
display: flex;
28+
justify-content: center;
29+
30+
h1 {
31+
font-weight: 250;
32+
font-size: 4rem;
33+
line-height: 100%;
34+
color: green;
35+
}
36+
}
37+
38+
}
39+
40+
41+
.solarsystem {
42+
width: 100%;
43+
height: 100%;
44+
display: block;
45+
position: absolute;
46+
}

0 commit comments

Comments
 (0)