Skip to content

Commit 7f8b35c

Browse files
author
Peter Blood
committed
Improve layout and add GitHub link
1 parent 40a495e commit 7f8b35c

File tree

2 files changed

+30
-1
lines changed

2 files changed

+30
-1
lines changed

app.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,7 @@ function drawAsteroid(asteroid) {
297297
}
298298

299299
function fontSize(size) {
300-
g.font = size + 'px Montserrat, Roboto, sans-serif';
300+
g.font = size + 'px monospace, sans-serif';
301301
}
302302

303303
function drawCenteredText(text, x, y, stroke = false) {

index.html

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,40 @@
2525

2626
canvas {
2727
outline: 1px solid white;
28+
margin: auto;
29+
position: absolute;
30+
top: 0;
31+
bottom: 0;
32+
left: 0;
33+
right: 0;
34+
}
35+
36+
#footer {
37+
display: block;
38+
position: absolute;
39+
left: 0;
40+
right: 0;
41+
bottom: 5px;
42+
text-align: center;
43+
}
44+
45+
a {
46+
color: white;
47+
text-decoration: none;
48+
font-family: monospace;
49+
font-size: 1em;
50+
}
51+
52+
a:hover {
53+
text-decoration: underline;
2854
}
2955
</style>
3056
</head>
3157

3258
<body>
59+
<div id="footer">
60+
<a href="https://github.com/Rayzr522/asteroids">Made with <span style="color:salmon">&lt;3</span> by Rayzr</a>
61+
</div>
3362
<div id="game"></div>
3463
<script type="text/javascript" src="app.js"></script>
3564
</body>

0 commit comments

Comments
 (0)