forked from Code4Community/phaser-code-editor-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
128 lines (120 loc) · 5.56 KB
/
index.html
File metadata and controls
128 lines (120 loc) · 5.56 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
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
<!DOCTYPE html>
<html>
<head>
<link
rel="stylesheet"
href="https://cdn.jsdelivr.net/npm/bootstrap@4.5.3/dist/css/bootstrap.min.css"
integrity="sha384-TX8t27EcRE3e/ihU7zmQxVncDAy5uIKz4rEkgIXeMed4M0jlfIDPvg6uqKI2xXr2"
crossorigin="anonymous"
/>
<link rel="preconnect" href="https://fonts.gstatic.com" />
<link
href="https://fonts.googleapis.com/css2?family=Oswald:wght@300&display=swap"
rel="stylesheet"
/>
<style>
.popover {
color: #757575 !important;
max-width: 45%;
}
</style>
<title>Polly's Treasure</title>
</head>
<body onunload="saveCode()">
<nav id="navbar" class="navbar navbar-light bg-light">
<a id="brand" class="navbar-brand" href="index.html"
>Polly's Treasure <img src="parrot.png" width="50" height="50"
/></a>
<ul class="nav me-auto">
<li class="nav-item">
<div class="dropdown">
<button
class="btn btn-default dropdown-toggle"
type="button"
id="dropdownMenuButton"
data-toggle="dropdown"
aria-haspopup="true"
aria-expanded="true"
value="1"
>
Level 1
<span class="caret"></span>
</button>
<ul class="dropdown-menu" aria-labelledby="dropdownMenuButton">
</ul>
</div>
</li>
<li class="nav-item">
<div class="container">
<span
type="button"
class="btn btn-lg btn-success"
href="#"
id="instructions"
data-toggle="popover"
title="Instructions"
data-html="true"
data-content="<div style='overflow-y:scroll; height:90vh'><span class='first_instructs'>
<h3><center>🦜 Tell Polly how to move with Code ⌨️<br>
Find pieces of the Treasure Map 🏴☠️ <br>
Avoid cannons and rocks 🪨 <br>
<b>💰 Reach the Treasure Map piece to WIN! 🏆</b></center><br><br></h3>
<strong>Actions:</strong><br>
<code>moveLeft</code>  <code> moveRight</code>  <code> moveUp</code>  <code> moveDown</code>  <code> wait</code><br>
Use these instructions to move Polly 🏃➡️<br>
For example, type <code>moveLeft</code> in the code window to make Polly move one square to the left 🦜 <br><br>
<strong>Looping:</strong><br>
<code>forever times</code>  <code># times</code>  <code> end</code><br>
These will run some code many times in a row 🔂 <br>
You can use <code>forever</code> or specify a number before <code>times</code> to run some commands many times in a row 🔢 Be sure to write <code>end</code> below the chunk of code!<br><br>
For example, type<br>
<code>5 times</code> <br>
<code>moveRight</code> <br>
<code>end</code> <br>
in the code window to make Polly move one square to the right, FIVE times 🏎️ <br><br>
<strong>Conditionals:</strong><br>
<code> if</code>  <code> else</code>  <code> end</code><br>
These will run some code if a certain condition is true or false. 🔀 <br><br>
The supported conditions are:<br>
<code> safeUp()</code>  <code> safeDown()</code>  <code> safeLeft()</code>  <code> safeRight()</code>  <code> safeWait() </code>  <code> switch()</code>  <br><br>
For example, type<br>
<code>if safeLeft()</code> <br>
<code>moveLeft</code> <br>
<code>else</code> <br>
<code>moveRight</code> <br>
<code>end</code> <br>
in the code window to make Polly move one square to the left only if it is safe, and to move to the right otherwise 🤖 <br><br>
</div>"
>Instructions</span
>
</div>
</li>
</ul>
</nav>
<div id="alert-container"></div>
<script
src="https://code.jquery.com/jquery-3.2.1.slim.min.js"
integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN"
crossorigin="anonymous"
></script>
<script
src="https://cdn.jsdelivr.net/npm/popper.js@1.12.9/dist/umd/popper.min.js"
integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q"
crossorigin="anonymous"
></script>
<script
src="https://cdn.jsdelivr.net/npm/bootstrap@4.0.0/dist/js/bootstrap.min.js"
integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl"
crossorigin="anonymous"
></script>
<script>
$(function () {
$('[data-toggle="popover"]').popover();
});
$(".dropdown-menu li a").click(function(){
$(this).parents(".dropdown").find('.btn').html($(this).text() + ' <span class="caret"></span>');
$(this).parents(".dropdown").find('.btn').val($(this).data('value'));
});
</script>
</body>
</html>