EmulatorJS/index.html

134 lines
3.8 KiB
HTML
Raw Normal View History

2023-07-04 03:56:43 +00:00
<!DOCTYPE html>
<html>
<head>
2024-01-16 18:39:16 +00:00
<title>EmulatorJS Demo</title>
2023-07-04 03:56:43 +00:00
<link rel = icon href = docs/favicon.ico sizes = "16x16 32x32 48x48 64x64" type = image/vnd.microsoft.icon>
<meta name = viewport content = "width = device-width, initial-scale = 1">
<style>
2024-01-16 18:39:16 +00:00
body, html {
2023-07-04 03:56:43 +00:00
height: 100%;
2024-01-16 18:39:16 +00:00
background-color: black;
color: white;
2023-07-04 03:56:43 +00:00
}
body {
margin: 0;
overflow: hidden;
}
2024-01-16 18:39:16 +00:00
body, #box, #top {
2023-07-04 03:56:43 +00:00
display: flex;
align-items: center;
justify-content: center;
2024-01-16 18:39:16 +00:00
flex-direction: column;
2023-07-04 03:56:43 +00:00
}
#box {
color: #aaa;
height: 20em;
width: 30em;
max-width: 80%;
max-height: 80%;
background-color: #333;
border-radius: 0.4em;
border: 2px solid #555;
position: relative;
flex-direction: column;
transition-duration: 0.2s;
2024-01-16 18:39:16 +00:00
overflow: hidden;
font-family: monospace;
font-weight: bold;
font-size: 20px;
margin: 5px;
2023-07-04 03:56:43 +00:00
}
#box:hover, #box[drag] {
border-color: #38f;
color: #ddd
}
#input {
cursor: pointer;
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 100%;
opacity: 0
}
#display {
width: 100%;
height: 100%
}
select, button {
padding: 0.6em 0.4em;
margin: 0.5em;
width: 15em;
max-width: 100%;
font-family: monospace;
font-weight: bold;
font-size: 16px;
background-color: #444;
color: #aaa;
border-radius: 0.4em;
border: 1px solid #555;
cursor: pointer;
transition-duration: 0.2s
}
select:hover, button:hover {
background-color: #666;
color: #ddd
}
2024-01-16 18:39:16 +00:00
.logo {
width: 130px;
height: 130px;
filter: drop-shadow(0 0 10px white);
}
#top {
margin: 5px;
}
2023-07-04 03:56:43 +00:00
</style>
</head>
<body>
2024-01-16 18:39:16 +00:00
<div id="top">
<h1>EmulatorJS Demo</h1>
<img src="docs/Logo-light.png" alt="Logo" class="logo">
</div>
2023-07-04 03:56:43 +00:00
<div id = box>
<input type = file id = input>
Drag ROM file or click here
</div>
<script>
const div = document.createElement("div")
const sub = document.createElement("div")
const script = document.createElement("script")
sub.id = "game"
div.id = "display"
2024-01-24 05:52:01 +00:00
const topp = document.getElementById("top");
topp.remove();
2023-07-04 03:56:43 +00:00
box.remove()
div.appendChild(sub)
document.body.appendChild(div)
window.EJS_player = "#game";
window.EJS_biosUrl = "";
2024-01-24 05:52:01 +00:00
window.EJS_gameUrl = "BtnTest.gba";
window.EJS_core = "gba";
window.EJS_pathtodata = "data/";
2023-07-04 03:56:43 +00:00
window.EJS_startOnLoaded = true;
2024-01-24 05:52:01 +00:00
window.EJS_DEBUG_XX = true;
2023-07-04 03:56:43 +00:00
script.src = "data/loader.js";
document.body.appendChild(script);
2023-07-04 03:56:43 +00:00
</script>
</body>
</html>