Repository navigation
Expand file tree
/
Copy pathplayground.html
More file actions
83 lines (70 loc) · 3.07 KB
/
Copy pathplayground.html
File metadata and controls
83 lines (70 loc) · 3.07 KB
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
<!DOCTYPE html>
<html lang="de">
<head>
<meta charset='utf-8'>
<title>Online-IDE Playground</title>
<meta name='viewport' content='width=device-width, initial-scale=1'>
<!--
A full-window IDE that takes its configuration from the link it is opened
with, so that a playground can be handed out as a URL. Everything below is
a default the URL may override.
On GitHub Pages this file is published as index.html, so the link is
https://openpatch.github.io/online-ide/?libraries=scratch — see
.github/workflows/deploy-playground.yml. The "?" button in the IDE lists
the parameters below at run time; the table it shows lives in
EmbeddedURLConfig.ts, which is also what the parser goes by.
Settings (see src/client/embedded/EmbeddedURLConfig.ts):
?libraries=scratch,nrw which class libraries to load (gng, nrw,
niedersachsen, scratch, zeichnen); empty means none
?lang=de|en|fr language of the interface and the tooltips
?theme=dark|light colours; left out, the page's colour scheme decides
?speed=max|<number> steps per second the program runs at
?id=<name> key the reader's edits are cached under in the browser
?withFileList=false and likewise withConsole, withPCode, withErrorList,
withBottomPanel, withClassDiagram, hideEditor,
hideStartPanel, cacheUserEdits, enableFileAccess
?spritesheetURL=<url> a zipped spritesheet of the reader's own graphics
?setting.<key>=<value> any single IDE setting, e.g.
?setting.compiler.shadowedSymbolErrorLevel=error
Sharing: the export button ("Als Link speichern") uploads the workspace to
json.openpatch.org and hands back a link of the form
<this page>?libraries=scratch#json=<id>
- the query says which playground it is, the fragment says what is in it.
-->
<script type="module" src="/src/client/embedded/EmbeddedStarter.ts"></script>
<style>
html, body {
height: 100%;
margin: 0;
padding: 0;
overflow: hidden;
/* the IDE covers the page; this only shows for the moment before it does */
background: #1e1e1e;
}
.jo_playground {
width: 100%;
height: 100%;
}
</style>
</head>
<body>
<div class="java-online jo_playground" data-java-online="{
'id': 'playground',
'urlConfig': true,
'jsonStore': 'https://json.openpatch.org',
'speed': 'max',
'withFileList': true,
'withConsole': true,
'withErrorList': true,
'withPCode': false,
'withClassDiagram': false,
'hideEditor': false,
'hideStartPanel': false,
'libraries': []
}">
<script type="text/plain" title="Main.java" data-type="java">
print("Hallo Welt!");
</script>
</div>
</body>
</html>