prismarine-web-client-mirror/index.html
AwesomestCode c9b8bb7669
Add crosshairs (#15)
* Add crosshairs

Note: this PR requires that there is an icons.png file perfectly matching the one in minecraft-assets to show the crosshair, otherwise it just doesn't show anything.

* do it the rom way
2021-03-01 03:31:30 +01:00

95 lines
2.2 KiB
HTML

<!DOCTYPE html>
<html>
<head>
<title>Prismarine Web Client</title>
<style type="text/css">
@font-face {
font-family: minecraft;
src: url(minecraftia.woff);
}
@font-face {
font-family: mojangles;
src: url(mojangles.ttf);
}
html {
overflow: hidden;
}
html, body {
height: 100%;
margin: 0;
padding: 0;
}
canvas {
height: 100%;
width: 100%;
font-size: 0;
margin: 0;
padding: 0;
}
.chat-wrapper {
position: fixed;
background-color: rgba(0, 0, 0, 0.5);
}
.chat-display-wrapper {
bottom: calc(8px * 16);
padding: 4px;
max-height: calc(90px * 8);
width: calc(320px * 4);
}
.chat-input-wrapper {
bottom: calc(2px * 16);
width: 100%;
overflow: hidden;
background-color: rgba(0, 0, 0, 0);
}
.chat {
overflow: hidden;
color: white;
font-size: 32px;
margin: 0px;
line-height: 100%;
text-shadow: 4px 4px 0px #3f3f3f;
font-family: mojangles, minecraft, monospace;
width: 100%;
max-height: calc(90px * 8)
}
input[type=text] {
background-color: rgba(0, 0, 0, 0.5);
}
li {
display: block;
}
#crosshair {
image-rendering: pixelated;
position: absolute;
top: 50%;
left: 50%;
height: calc(256px * 4);
width: calc(256px * 4);
transform: translate(calc(-50% + 120px * 4), calc(-50% + 120px * 4));
clip-path: inset(0px calc(240px * 4) calc(240px * 4) 0px);
}
</style>
</head>
<body onclick="this.requestFullscreen()">
<img id="crosshair" src="textures/icons.png">
<div class="chat-wrapper chat-display-wrapper">
<div class="chat" id="chat">
<p>Welcome to prismarine-web-client! Chat appears here.</p>
</div>
</div>
<div class="chat-wrapper chat-input-wrapper">
<div class="chat" id="chat-input">
<input type="text" class="chat" id="chatinput"></input>
</div>
</div>
<script type="text/javascript" src="index.js"></script>
</body>
</html>