-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.html
184 lines (158 loc) · 6.09 KB
/
main.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
<head>
<title>8-bit Builder</title>
<!-- <link rel="icon" type="image/x-icon" href="favicon.ico" />
<link rel="shortcut icon" type="image/x-icon" href="favicon.ico" /> -->
</head>
<body>
{{> container}}
</body>
<!-- if not logged in show landing, else main page -->
<template name="container">
{{ #if show_landing }}
{{> landing}}
{{ else }}
{{> main_page}}
{{ /if }}
</template>
<!-- wlecom header, and main interface -->
<template name="main_page">
{{> welcome}}
{{> interface}}
</template>
<!-- shows login page if not logged in, else welcom header with project options -->
<template name="landing">
{{ #if show_login}}
{{> login}}
{{ else }}
{{> welcome}}
{{ /if }}
</template>
<!-- login/create account box -->
<template name="login">
<header style=" text-align: center;" >
<h1 style="margin:110px 0px; font-size:75px;">8-bit Builder!</h1>
</header>
<div id="form-wrapper">
<label for="username">Username:</label>
<input type="text" id="username"><br><br>
<label for="password">Password:</label>
<input type="password" id="password"><br><br><br>
<button id="create"><span>Create Account</span></button>
<button id="login">Log In</button>
</div>
</template>
<!-- this is the welcome header if also shows project options -->
<template name ="welcome">
<header class="page-header bottomborder headerrow">
<div class="headercolumn">
<h1>8-bit Builder!</h1>
</div>
<div class="headercolumn welcome">
<p>Welcome {{name}}!</p>
<button id="logout">Log Out</button>
<button id="deleteAccount">Delete Account</button>
</div>
</header>
{{ #if show_landing}}
{{> project}}
{{ /if }}
</template>
<!-- project options -->
<template name="project">
<div id="form-wrapper">
<br>
<label for="project_status">Work on:</label>
<select id="project_status">
<option></option>
<option>New Project</option>
<option>Saved Project</option>
</select>
<br>
<br>
<label for="project_name">Project name:</label>
<input type="text" id="project_name" />
<br>
<br>
<button id="go">Go</button>
</div>
</template>
<!-- this is where buld table will render -->
<template name="table">
<div id="canvas" style="width:100%; height:100%; min-width: 100px;">
</div>
</template>
<!-- main content -->
<template name="interface">
<div class="row">
<div id="menu">
<br/>
<ul class="actions">
<li>
<input type="radio" id='add' name='mode' value='add' checked/>
<label for="add">Add</label>
<br/>
</li>
<li>
<input type="radio" id="move" name="mode" value="move" />
<label for="move">Move</label>
<br/>
</li>
<li>
<input type="radio" id="delete" name="mode" value="delete" />
<label for="delete">Delete</label>
<br/>
</li>
</ul>
<br>
<div id="blockoptions">
<button id="rotate">Rotate</button>
<div class="color">
<label>Texture:</label>
<select id="color">
<!--<option value="stone">stone</option>-->
<option class="texture" value="textures/brick.png">brick</option>
<option class="texture" value="textures/emerald_block.png">green block</option>
<option class="texture" value="textures/lapis_block.png">blue block</option>
<option class="texture" value="textures/planks_oak.png">oak panels</option>
<option class="texture" value="textures/planks_spruce.png">spruce panels</option>
<option class="texture" value="textures/stone.png">stone</option>
<option class="texture" value="textures/glass.png">glass</option>
<option class="texture" value="textures/glass_blue.png">blue glass</option>
<option class="texture" value="textures/glass_green.png">green glass</option>
<option class="texture" value="textures/glass_red.png">red glass</option>
<option class="tile" value="tiles/dirt.png">dirt</option>
<option class="tile" value="tiles/dirt_full.png">grass</option>
<option class="tile" value="tiles/cobblestone.png">cobblestone</option>
<option class="tile" value="tiles/clay.png">clay</option>
<option class="tile" value="tiles/gravel.png">gravel</option>
<option class="tile" value="tiles/red_sand.png">sand</option>
<option class="tile" value="tiles/snow.png">snow</option>
</select>
</div>
<div class="shape">
<label>Shape:</label>
<select id="geo">
<option value="square">block</option>
<option value="rectangle">double block</option>
<option value="quarterBlock">tall block</option>
<option value="wall">wall</option>
<option value="floor">floor</option>
<option value="cylinder">cylinder</option>
<option value="pyramid">pyramid</option>
<option value="sphere">sphere</option>
<option value="tile">tile</option>
</select>
</div>
</div>
<div id="smallScene"></div>
<div id="dboptions">
<button class="options" id="save">Save</button>
<br>
<br>
<br>
<button class="options" id="clear">Clear</button>
</div>
{{> table}}
</div>
</div>
</template>