-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Adds homepage with a project description and adds a gif to the …
…README
- Loading branch information
Showing
8 changed files
with
802 additions
and
759 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
html, | ||
body { | ||
width: 100%; | ||
height: 100%; | ||
margin: 0px; | ||
border: 0; | ||
overflow: hidden; | ||
/* Disable scrollbars */ | ||
display: block; | ||
/* No floating content on sides */ | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<html> | ||
<head> | ||
<link rel="stylesheet" href="arena.css" /> | ||
<script defer type="text/javascript" src="arena.js"></script> | ||
</head> | ||
<body> | ||
<canvas id="bolas"></canvas> | ||
</body> | ||
</html> |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,76 @@ | ||
/** | ||
* Body CSS | ||
*/ | ||
|
||
html, | ||
body { | ||
width: 100%; | ||
height: 100%; | ||
margin: 0px; | ||
border: 0; | ||
overflow: hidden; | ||
/* Disable scrollbars */ | ||
display: block; | ||
/* No floating content on sides */ | ||
} | ||
|
||
html, | ||
body, | ||
input, | ||
textarea, | ||
button { | ||
-webkit-font-smoothing: antialiased; | ||
-moz-osx-font-smoothing: grayscale; | ||
text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.004); | ||
} | ||
|
||
/** | ||
* Header CSS | ||
*/ | ||
|
||
header { | ||
position: fixed; | ||
top: 0; | ||
right: 0; | ||
left: 0; | ||
z-index: 2; | ||
} | ||
|
||
.mui-appbar { | ||
background-color: #da291c; | ||
} | ||
|
||
header ul.mui-list--inline { | ||
margin-bottom: 0; | ||
} | ||
|
||
.mui--text-title { | ||
color: #046a38; | ||
} | ||
|
||
.mui-btn { | ||
background-color: #046a38; | ||
color: #ffe900; | ||
} | ||
|
||
header table { | ||
width: 100%; | ||
} | ||
|
||
/** | ||
* Content CSS | ||
*/ | ||
|
||
#content-wrapper { | ||
min-height: 100%; | ||
|
||
/* sticky footer */ | ||
box-sizing: border-box; | ||
margin-bottom: -100px; | ||
padding-bottom: 100px; | ||
} | ||
|
||
/** | ||
* Footer CSS | ||
*/ | ||
|
||
footer { | ||
box-sizing: border-box; | ||
height: 100px; | ||
background-color: #eee; | ||
border-top: 1px solid #e0e0e0; | ||
padding-top: 35px; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,91 @@ | ||
<!doctype html> | ||
<html> | ||
<head> | ||
<link rel="stylesheet" href="index.css" /> | ||
<script defer type="text/javascript" src="index.js"></script> | ||
<meta charset="utf-8" /> | ||
<meta http-equiv="X-UA-Compatible" content="IE=edge" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1" /> | ||
<title>MUI Landing Page Example</title> | ||
<link | ||
href="//cdn.muicss.com/mui-latest/css/mui.min.css" | ||
rel="stylesheet" | ||
type="text/css" | ||
/> | ||
<link href="index.css" rel="stylesheet" type="text/css" /> | ||
<script src="//cdn.muicss.com/mui-latest/js/mui.min.js"></script> | ||
</head> | ||
<body> | ||
<canvas id="bolas"></canvas> | ||
<header class="mui-appbar mui--z1"> | ||
<div class="mui-container"> | ||
<table> | ||
<tr class="mui--appbar-height"> | ||
<td class="mui--text-title">Bolas</td> | ||
</tr> | ||
</table> | ||
</div> | ||
</header> | ||
<div id="content-wrapper" class="mui--text-center"> | ||
<div class="mui--appbar-height"></div> | ||
<br /> | ||
<br /> | ||
<div class="mui--text-display3">Welcome to Bolas</div> | ||
<br /> | ||
<a href="arena.html" | ||
><button class="mui-btn mui-btn--raised">Play</button></a | ||
> | ||
<br /> | ||
<br /> | ||
<p> | ||
Welcome to Bolas, a silly physics simulator that I wrote for fun | ||
and as a demonstration of my excellent | ||
<a href="https://www.rust-lang.org/">Rust</a> | ||
and mediocre Javascript programming ability. If you just want to | ||
play with the bolas, click the button above. Continue reading | ||
for a technical explanation of how this project is implemented | ||
and deployed. | ||
</p> | ||
<p> | ||
First off, the name: "bolas" is | ||
<a href="https://pt.wikipedia.org/wiki/Portugal">Portuguese</a> | ||
for "balls". Morei em Portugal durante três anos entre 2022 e | ||
2025. Escrevi este projeto quando estava a morar lá, portanto, | ||
chamo-o "bolas". | ||
</p> | ||
<p> | ||
Why is this interesting to you, recruiter? Well, once you've | ||
played the game, you'll see there's some interesting physics | ||
simulation being done. Critically, the ball movement and | ||
collision detection logic is all done server-side, in rust. The | ||
javascript frontend merely receives a stream of updates from a | ||
<a | ||
href="https://developer.mozilla.org/en-US/docs/Web/API/WebSockets_API" | ||
>websocket</a | ||
> | ||
connection and draws the balls where it is told to. This is | ||
obviously needlessly complicated, but I hope demonstrates my | ||
knowledge of websockets, full-stack web development, and rust | ||
programming ability. Here's a link to the | ||
<a href="https://github.com/norwoodj/bolas">code</a>. | ||
</p> | ||
<p> | ||
I deploy this project on a | ||
<a href="https://www.raspberrypi.com/">Raspberry Pi</a> that | ||
runs in my house. It exposes this (and several of my other | ||
websites) behind | ||
<a href="https://cloudflare.com">Cloudflare</a> using a | ||
<a href="https://www.cloudflare.com/products/tunnel/" | ||
>cloudflared tunnel</a | ||
>. I worked at cloudflare for 5 years, and made contributed | ||
substantially to the tunnel project. Cloudflare is also where I | ||
learned how to use | ||
<a href="https://saltproject.io/index.html">salt</a>, which is | ||
how I configure said raspberry pi. The code for doing that is | ||
<a href="https://github.com/norwoodj/rpi-salt">here</a>. | ||
</p> | ||
</div> | ||
<footer> | ||
<div class="mui-container mui--text-center"> | ||
Made by <a href="https://github.com/norwoodj">John Norwood</a> | ||
</div> | ||
</footer> | ||
</body> | ||
</html> |