forked from waterbearlang/waterbear
-
Notifications
You must be signed in to change notification settings - Fork 0
/
anatomy_of_a_block.html
105 lines (104 loc) · 5.08 KB
/
anatomy_of_a_block.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
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
<title>Anatomy of a block</title>
<style>
div{
margin: 2em;
border: 2px solid #FF8800;
-moz-border-radius: 10px;
-webkit-border-radius: 10px;
border-radius: 10px;
}
h1,h2,h3{
padding: 0px;
margin: 5px 10px;
}
p{
margin: 5px 20px;
}
</style>
</head>
<body>
<h1>Anatomy of a block</h1>
<section>
<h2>Trigger or Step Block</h2>
<p>A trigger is the starting point for a sequential script, a step is one piece of the sequence. The primary difference is that triggers lack flaps to snap to, as they are always the first block in a sequence, while steps always follow other blocks. A block may contain other blocks: step blocks nested in either .next or .contained, and value blocks nested in .socket. When value blocks are nested, they replace the input element of the socket.</p>
<div class="wrapper">
<h3><div class="wrapper trigger|step [group]"></h3>
<div class="block">
<h3><div class="block"></h3>
<div class="labelblock">
<h3><p></h3>
<p><em>[A block may have zero or more input sockets]</em></p>
<div class="label">
<h3><label></h3>
<p><em>[optional text]</em></p>
<div class="socket">
<h3><div class="socket [type]"></h3>
<div class="input">
<h3><input type="[type]" value="[value]" /></h3>
</div>
<h3></div></h3>
</div>
<p><em>[optional text]</em></p>
<h3></label></h3>
</div>
<h3></p></h3>
</div>
<div class="flap|trigger">
<h3><b class="flap|trigger"><em>This element is to hang styling on (for triggers) and for drag-n-drop snapping to slots (for other steps).</em></b></h3>
</div>
<div class="contained">
<h3><div class="contained"><em>Any step may have zero or more containers for subscripts, generally used for flow control</em></h3>
<div class="slot">
<h3><i class="slot"><em>This element is for snapping to on drag</em></i></h3>
</div>
<h3></div></h3>
</div>
<h3></div></h3>
</div>
<div class="next">
<h3><div class="next"></h3>
<div class="slot">
<h3><i class="slot"><em>This element is for snapping to on drag</em></i></h3>
</div>
<h3><em>Next snapped element will go here</em></h3>
<h3></div></h3>
</div>
<h3></div></h3>
</div>
</section>
<section>
<h2>Value Block</h2>
<p>Value blocks return values, are typed, and can be nested.</p>
<div class="wrapper">
<h3><div class="wrapper value [type] [group]"></h3>
<div class="block [type]">
<h3><div class="block"></h3>
<div class="labelblock">
<h3><p></h3>
<p><em>[A block may have zero or more input sockets]</em></p>
<div class="label">
<h3><label></h3>
<p><em>[optional text]</em></p>
<div class="socket">
<h3><div class="socket [type]"></h3>
<div class="input">
<h3><input type="[type]" value="[value]" /></h3>
</div>
<h3></div></h3>
</div>
<p><em>[optional text]</em></p>
<h3></label></h3>
</div>
<h3></p></h3>
</div>
<h3></div></h3>
</div>
<h3></div></h3>
</div>
</section>
</body>
</html>