-
Notifications
You must be signed in to change notification settings - Fork 2
/
index.html
216 lines (180 loc) · 9.03 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
<html>
<link rel="stylesheet" href="index.css" defer>
<header>
<meta charset="utf-8">
<style>
body {
font-family: arial;
margin: 0;
padding: none;
overflow: hidden;
}
.topright {
position: absolute;
top: 80px;
right: 0px;
resize: none;
overflow: visible;
}
.holder {
margin-left: 45%;
justify-content:center;
position: absolute;
top:0px;
}
.blanker {
display: flex;
justify-content:center;
//margin-left: 30%;
margin-top: 140px;
// border: 1px solid black;
z-index:1;
}
.device {
position: relative;
top: 0;
left: 0;
// border: 1px red solid;
z-index:2;
visibility: inherit;
}
.lcd {
position: relative;
top: 75px;
left: -280px;
// border: 1px green solid;
z-index: 3;
width: 190;
height: 190;
visibility: inherit;
}
#iframe {
padding-top: 40px;
}
div.emscripten { text-align: center; }
div.emscripten_border { border: 1px solid black; }
/* the canvas *must not* have any border or padding, or mouse coords will be wrong */
canvas.emscripten { border: 0px none; background-color: transparent; }
</style>
<br>
<!-- thanks to https://fsymbols.com/generators/carty/ -->
<div class="logo-container">
<a href="#">
<div class="logo" style="font-size:60%;">
██████╗░██╗░░░██╗░██████╗░░█████╗░███╗░░░███╗███████╗░░░░░░░█████╗░███████╗ ░██████╗██╗░░██╗░█████╗░░██╗░░░░░░░██╗██████╗░░█████╗░░█████╗░███╗░░░███╗
██╔══██╗╚██╗░██╔╝██╔════╝░██╔══██╗████╗░████║██╔════╝░░░░░░██╔══██╗██╔════╝ ██╔════╝██║░░██║██╔══██╗░██║░░██╗░░██║██╔══██╗██╔══██╗██╔══██╗████╗░████║
██████╔╝░╚████╔╝░██║░░██╗░███████║██╔████╔██║█████╗░░█████╗██║░░╚═╝█████╗░░ ╚█████╗░███████║██║░░██║░╚██╗████╗██╔╝██████╔╝██║░░██║██║░░██║██╔████╔██║
██╔═══╝░░░╚██╔╝░░██║░░╚██╗██╔══██║██║╚██╔╝██║██╔══╝░░╚════╝██║░░██╗██╔══╝░░ ░╚═══██╗██╔══██║██║░░██║░░████╔═████║░██╔══██╗██║░░██║██║░░██║██║╚██╔╝██║
██║░░░░░░░░██║░░░╚██████╔╝██║░░██║██║░╚═╝░██║███████╗░░░░░░╚█████╔╝███████╗ ██████╔╝██║░░██║╚█████╔╝░░╚██╔╝░╚██╔╝░██║░░██║╚█████╔╝╚█████╔╝██║░╚═╝░██║
╚═╝░░░░░░░░╚═╝░░░░╚═════╝░╚═╝░░╚═╝╚═╝░░░░░╚═╝╚══════╝░░░░░░░╚════╝░╚══════╝ ╚═════╝░╚═╝░░╚═╝░╚════╝░░░░╚═╝░░░╚═╝░░╚═╝░░╚═╝░╚════╝░░╚════╝░╚═╝░░░░░╚═╝
</div>
</a>
</div>
</header>
<script>
const IFRAME="iframe"
function nav(url) {
console.log("FRAME", url)
iframe.location=url
// iframe.style.zIndex = 20
blanker.hidden = true
}
function pad(url) {
console.log(url)
document.getElementById(IFRAME).src = "/showroom/pypad_git.html?#src/"+url
}
</script>
<body>
<div class="dosmenu dosmenu--cyan dosmenu--shadow" style="left:8px;top:0px;width:270px;">
<div class="dosmenu-inner">
Run Games in Browser !
</div>
</div>
<div class="dosmenu dosmenu--green dosmenu--shadow" style="left:8px;top:-10px;width:270px;">
<div class="dosmenu-inner">
<div id=slot1>
<h2>Testing</h2>
<ul class="bullets">
<li><a href="#" onclick=pad("test_hello.py")>Hello.py</a></li>
<li><a href="#" onclick=nav("pygbag.html")>REPL</a></li>
</ul>
</div>
<h2>Desktop Games (kbd+mouse)</h2>
<ul class="bullets">
<li><a href="#" onclick=nav("https://html-classic.itch.zone/html/8549416/index.html?-i")>StunCat (Physics)</a></li>
<li><a href="#" onclick=nav("https://html-classic.itch.zone/html/7875673/index.html")>Pyrasterize (3D)</a></li>
<li><a href="#" onclick=console.log("game3")>Game #3</a></li>
</ul>
<h2>Mobile Games (touchscreens)</h2>
<ul class="bullets">
<li><a href="#" onclick=console.log("game1")>Game #1</a></li>
<li><a href="#" onclick=console.log("game2")>Game #2</a></li>
<li><a href="#" onclick=console.log("game3")>Game #3</a></li>
</ul>
<h2>pygame scripts</h2>
<ul class="bullets">
<li><a href="pygame-scripts/org.pygame.touchpong.html" target="iframe">Mobile touchpong</a></li>
</ul>
<br />
<h2>Documentation</h2>
<ul class="bullets">
<li><a href="#" onclick="nav('https://pyga.me')">pygame-ce</a></li>
<li><a href="#" onclick="nav('https://pygame-web.github.io')">pygbag wiki</a></li>
</ul>
<br />
<h2>Get inspiration</h2>
<ul class="bullets">
<li><a href="#" onclick="nav('https://dosgames.com')">dosgames.com</a></li>
<li><a href="https://github.com/topics/pygame-wasm" target=_blank>pygame wasm (new tab)</a></li>
<li><a href="https://itch.io/c/2563651/pygame-wasm" target=_blank>pygbag on itch (new tab)</a></li>
</ul>
</div>
</div>
<div id="holder" class="holder">
<div id="blanker" class="blanker">
<!--
https://freesvg.org/gameboy
http://clipart-library.com/data_images/6324.png
-->
<img id=device class=device src="imgs/device.png"/>
<img id=lcd class=lcd src="imgs/lcd.gif" />
</div>
</div>
<canvas class="emscripten" id="canvas"
width="1px"
height="1px"
style="width: 100%; height: 100%"
oncontextmenu="event.preventDefault()" tabindex=1>
</canvas>
<!-- missing on itch frame allow-modals
allow-forms Allows form submission
allow-modals Allows to open modal windows
allow-orientation-lock Allows to lock the screen orientation
allow-pointer-lock Allows to use the Pointer Lock API
allow-popups Allows popups
allow-presentation Allows to start a presentation session
allow-same-origin Allows the iframe content to be treated as being from the same origin
allow-scripts Allows to run scripts
allow-top-navigation Allows the iframe content to navigate its top-level browsing context
allow-popups-to-escape-sandbox Allows popups to open new windows without inheriting the sandboxing
allow-top-navigation-by-user-activation Allows the iframe content to navigate its top-level browsing context, but only if initiated by user
// unrecognized xr; monetization;
// not usefull mozallowfullscreen="true";
// ! old browsers
// cross-origin-isolated; gamepad;
-->
<iframe id="iframe" class="topright" name="iframe"
sandbox="allow-same-origin allow-top-navigation allow-scripts allow-pointer-lock allow-modals"
allow="autoplay; fullscreen *; geolocation; microphone; camera; midi; xr-spatial-tracking; gyroscope; accelerometer;"
frameborder="0"
width="80%"
height="80%"
src="empty.html"
msallowfullscreen="true"
scrolling="yes"
allowfullscreen="true"
webkitallowfullscreen="true"
allowtransparency="true">
</iframe>
</body>
</html>