Skip to content

Commit b13d66f

Browse files
committed
styling
1 parent b4b99a9 commit b13d66f

File tree

8 files changed

+85
-6
lines changed

8 files changed

+85
-6
lines changed

Diff for: cheerpj-natives

Diff for: fonts/minecrafter/License.png

4.77 KB
Loading

Diff for: fonts/minecrafter/License.txt

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
This Font "MineCrafter" is under the creative commons license and can be used non-commercialy,
2+
as long as it is passed along unchanged and in whole, with credit to one of the following names ;
3+
4+
"PurePixel", "MadPixel"
5+
6+
If your looking to use this font commercially please contact me before using the font.
7+
8+
Enjoy and donations appreciated.
9+
10+
{http://creativecommons.org/licenses/}

Diff for: fonts/minecrafter/Minecrafter.Reg.woff2

2.7 KB
Binary file not shown.

Diff for: fonts/minecrafter/Read Me.txt

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
The font in this archive was created by madpixel with credits to mojang for original design of font.
2+
please read the license information before using this font
3+
4+
5+
LEGAL NOTICE:
6+
In using this font you must comply with the licensing terms described in the
7+
file “License.txt” included with this archive.
8+
If you redistribute the font file in this archive, it must be accompanied by
9+
all the other files from this archive, including this one and credited to madpixel.

Diff for: index.html

+17-5
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,25 @@
22
<html lang="en" style="width:100%;height:100%;">
33
<head>
44
<meta charset="utf-8">
5-
<title>Minecraft Web</title>
5+
<meta name="viewport" content="width=device-width, initial-scale=1">
6+
<title>Minecraft Web</title>
67
<script src="https://cjrtnc.leaningtech.com/3_20231218_321/cj3loader.js"></script>
8+
<link rel="stylesheet" href="style.css">
79
</head>
8-
<body style="width:100%;height:100%;margin:0;">
9-
<minecraft-client></minecraft-client>
10+
<body>
11+
<header>
12+
<h1>Minecraft Web</h1>
13+
14+
<minecraft-client></minecraft-client>
15+
16+
<a href="https://github.com/leaningtech/minecraft-web" class="github-corner" aria-label="View source on GitHub"><svg width="80" height="80" viewBox="0 0 250 250" style="fill:#fff; color:#151513; position: absolute; top: 0; border: 0; right: 0;" aria-hidden="true"><path d="M0,0 L115,115 L130,115 L142,142 L250,250 L250,0 Z"></path><path d="M128.3,109.0 C113.8,99.7 119.0,89.6 119.0,89.6 C122.0,82.7 120.5,78.6 120.5,78.6 C119.2,72.0 123.4,76.3 123.4,76.3 C127.3,80.9 125.5,87.3 125.5,87.3 C122.9,97.6 130.6,101.9 134.4,103.2" fill="currentColor" style="transform-origin: 130px 106px;" class="octo-arm"></path><path d="M115.0,115.0 C114.9,115.1 118.7,116.5 119.8,115.4 L133.7,101.6 C136.9,99.2 139.9,98.4 142.2,98.6 C133.8,88.0 127.5,74.4 143.8,58.0 C148.5,53.4 154.0,51.2 159.7,51.0 C160.3,49.4 163.2,43.6 171.4,40.1 C171.4,40.1 176.1,42.5 178.8,56.2 C183.1,58.6 187.2,61.8 190.9,65.4 C194.5,69.0 197.7,73.2 200.1,77.6 C213.8,80.2 216.3,84.9 216.3,84.9 C212.7,93.1 206.9,96.0 205.4,96.6 C205.1,102.4 203.0,107.8 198.3,112.5 C181.9,128.9 168.3,122.5 157.7,114.1 C157.9,116.9 156.7,120.9 152.7,124.9 L141.0,136.5 C139.8,137.7 141.6,141.9 141.8,141.8 Z" fill="currentColor" class="octo-body"></path></svg></a><style>.github-corner:hover .octo-arm{animation:octocat-wave 560ms ease-in-out}@keyframes octocat-wave{0%,100%{transform:rotate(0)}20%,60%{transform:rotate(-25deg)}40%,80%{transform:rotate(10deg)}}@media (max-width:500px){.github-corner:hover .octo-arm{animation:none}.github-corner .octo-arm{animation:octocat-wave 560ms ease-in-out}}</style>
17+
</header>
18+
<main>
19+
<p>
20+
<b>Minecraft Web</b> is an open-source port of Minecraft to the web using <a href="https://cheerpj.com">CheerpJ</a>, a Java runtime for modern browsers.
21+
It runs unmodified client and server JARs.
22+
</p>
23+
</main>
1024

1125
<script type="module">
1226
import MinecraftClient from "./minecraft-web.js";
@@ -17,7 +31,5 @@
1731
});
1832
MinecraftClient.register();
1933
</script>
20-
21-
<a href="https://github.com/leaningtech/minecraft-web" class="github-corner" aria-label="View source on GitHub"><svg width="80" height="80" viewBox="0 0 250 250" style="fill:#151513; color:#fff; position: absolute; top: 0; border: 0; right: 0;" aria-hidden="true"><path d="M0,0 L115,115 L130,115 L142,142 L250,250 L250,0 Z"></path><path d="M128.3,109.0 C113.8,99.7 119.0,89.6 119.0,89.6 C122.0,82.7 120.5,78.6 120.5,78.6 C119.2,72.0 123.4,76.3 123.4,76.3 C127.3,80.9 125.5,87.3 125.5,87.3 C122.9,97.6 130.6,101.9 134.4,103.2" fill="currentColor" style="transform-origin: 130px 106px;" class="octo-arm"></path><path d="M115.0,115.0 C114.9,115.1 118.7,116.5 119.8,115.4 L133.7,101.6 C136.9,99.2 139.9,98.4 142.2,98.6 C133.8,88.0 127.5,74.4 143.8,58.0 C148.5,53.4 154.0,51.2 159.7,51.0 C160.3,49.4 163.2,43.6 171.4,40.1 C171.4,40.1 176.1,42.5 178.8,56.2 C183.1,58.6 187.2,61.8 190.9,65.4 C194.5,69.0 197.7,73.2 200.1,77.6 C213.8,80.2 216.3,84.9 216.3,84.9 C212.7,93.1 206.9,96.0 205.4,96.6 C205.1,102.4 203.0,107.8 198.3,112.5 C181.9,128.9 168.3,122.5 157.7,114.1 C157.9,116.9 156.7,120.9 152.7,124.9 L141.0,136.5 C139.8,137.7 141.6,141.9 141.8,141.8 Z" fill="currentColor" class="octo-body"></path></svg></a><style>.github-corner:hover .octo-arm{animation:octocat-wave 560ms ease-in-out}@keyframes octocat-wave{0%,100%{transform:rotate(0)}20%,60%{transform:rotate(-25deg)}40%,80%{transform:rotate(10deg)}}@media (max-width:500px){.github-corner:hover .octo-arm{animation:none}.github-corner .octo-arm{animation:octocat-wave 560ms ease-in-out}}</style>
2234
</body>
2335
</html>

Diff for: minecraft-web.js

+5
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,11 @@ template.innerHTML = `
4444
:host([hidden]) {
4545
display: none;
4646
}
47+
48+
canvas {
49+
width: inherit;
50+
height: inherit;
51+
}
4752
</style>
4853
<canvas width="854" height="480" tabindex="-1"></canvas>
4954
<div data-display style="width:100%;height:100%;position:absolute;top:0;left:0px;visibility:hidden;"></div>

Diff for: style.css

+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
html, body {
2+
height: 100%;
3+
margin: 0;
4+
padding: 0;
5+
6+
font-family: system-ui, sans-serif;
7+
}
8+
9+
@font-face {
10+
font-family: "Minecrafter";
11+
src: url("fonts/minecrafter/Minecrafter.Reg.woff2"), sans-serif;
12+
}
13+
14+
header {
15+
background: #171615;
16+
color: white;
17+
padding: 1rem;
18+
19+
display: flex;
20+
flex-direction: column;
21+
justify-content: center;
22+
align-items: center;
23+
}
24+
25+
header h1 {
26+
color: #c6b8b4;
27+
font: 48px Minecrafter;
28+
transform: perspective(24px) translateZ(0) rotate3d(1, 0, 0, 2deg);
29+
text-shadow: 0px 5px 4px black;
30+
}
31+
32+
main {
33+
margin: 0 auto;
34+
max-width: 60ch;
35+
width: 90%;
36+
line-height: 1.4;
37+
}
38+
39+
@media (max-width: 900px) {
40+
minecraft-client {
41+
width: 100%;
42+
}
43+
}

0 commit comments

Comments
 (0)