-
Notifications
You must be signed in to change notification settings - Fork 7
/
index.html
131 lines (113 loc) · 2.91 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
<html>
<head>
<meta charset="UTF-8">
<title>💭💻😎</title>
<style type="text/css">
body {
font-family: "Lucida Grande";
}
canvas {
position: absolute;
right: 0;
}
textarea {
position: absolute;
top: 5px;
left: 5px;
width: 49%;
height: 90%;
font-size: 3em;
border: none;
background: #fffafa;
}
button {
font-size: 2.9em;
position: absolute;
width: 60px;
height: 60px;
bottom: 5px;
border: none;
background: none;
font-family: AppleColorEmoji;
}
button#run {
left: 5px;
}
button#refresh {
left: 75px;
}
button#about {
left: 145px;
}
#aboutPane {
position: fixed;
top: 0;
left: 0;
z-index: 10;
background: #fee;
opacity: 0.9;
width: 100%;
height: 100%;
text-align: center;
}
#aboutPane button {
margin: 0 auto;
}
#aboutPane h1 {
margin-top: 300px;
}
</style>
<script type="text/javascript">
function runCode() {
var emojinalSource = document.querySelector('textarea').value;
Emojinal.execute(emojinalSource)
}
function refresh () {
document.querySelector('textarea').value = "🎨🔄 🌜 \n\
🎨◻ 0⃣ 0⃣ ↔ ↕\n\
🎨🚿💄 2⃣5⃣5⃣ 8⃣\n\
⌚➡ ◀ ➡\n\
⌚⬆ ◀ ⬆\n\
🎨✒ ➡ ⬆ ⌚➡ ⌚⬆\n\
➡ ◀ ➕ 🎲 ➡\n\
⬆ ◀ ➕ 🎲 ⬆ \n\
🌛 \n\
⌚➡ ◀ ➡ \n\
⌚⬆ ◀ ⬆ \n\
➡ ◀ ➗ ↔ 2⃣ \n\
⬆ ◀ ➗ ↕ 2⃣"
}
function showAbout () {
document.querySelector('#aboutPane').style.display = "block"
}
function hideAbout () {
document.querySelector('#aboutPane').style.display = "none"
}
</script>
</head>
<body>
<canvas></canvas>
<textarea></textarea>
<div id="aboutPane" style="display:none;">
<h1>The Emojinal Programming Language</h1>
<p>A stack based emoji programming language experiment</p>
<p>By Ramsey Nasser and Addie Wagenknecht</p>
<p><a href="https://github.com/nasser/Emojinal">https://github.com/nasser/Emojinal</a></p>
<p>💩😝💩</p>
<button onclick="hideAbout()">🚫</button>
</div>
<button id="run" onclick="runCode()">☑</button>
<button id="refresh" onclick="refresh()">♻</button>
<button id="about" onclick="showAbout()">❓</button>
<script type="text/javascript" src="fjs/fjs-primitives.js"></script>
<script type="text/javascript" src="fjs/fjs-runtime.js"></script>
<script type="text/javascript" src="fjs/fjs.js"></script>
<script type="text/javascript" src="emojinal/peg.js"></script>
<script type="text/javascript" src="emojinal/parser.js"></script>
<script type="text/javascript" src="emojinal/processing-1.4.1-api.min.js"></script>
<script type="text/javascript" src="emojinal/graphics.js"></script>
<script type="text/javascript">
refresh();
</script>
</body>
</html>