-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
209 lines (200 loc) · 9.24 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
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
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>TREM Plugin Generator</title>
<link href="./cdn/css/material.css" rel="stylesheet">
<link href="./cdn/css/icon.css" rel="stylesheet">
<link href="./css/core.css" rel="stylesheet">
<script src="./cdn/js/blockly.js" defer></script>
<script src="./cdn/js/blocks.js" defer></script>
<script src="./cdn/js/javascript.js" defer></script>
<script src="./cdn/js/zh-Hant.js" defer></script>
<script src="./cdn/js/material.js" defer></script>
<script src="./cdn/js/jszip.js" defer></script>
<script src="./js/core.js" defer></script>
<script src="./js/blocks.js" defer></script>
</head>
<body class="mdc-typography">
<header class="mdc-top-app-bar mdc-top-app-bar--fixed">
<div class="mdc-top-app-bar__row">
<section class="mdc-top-app-bar__section mdc-top-app-bar__section--align-start">
<span class="mdc-top-app-bar__title">
<div class="main-title">TREM Plugin 製作 v0.1.1</div>
<div class="sub-title"></div>
</span>
</section>
<section class="mdc-top-app-bar__section mdc-top-app-bar__section--align-end">
<button id="settingsBtn" class="mdc-button mdc-button--raised">
<span class="mdc-button__ripple"></span>
<i class="material-icons mdc-button__icon">settings</i>
<span class="mdc-button__label">專案設定</span>
</button>
<button class="mdc-button mdc-button--raised" id="importBtn">
<span class="mdc-button__ripple"></span>
<i class="material-icons mdc-button__icon">upload</i>
<span class="mdc-button__label">匯入</span>
</button>
<button class="mdc-button mdc-button--raised" id="exportBtn">
<span class="mdc-button__ripple"></span>
<i class="material-icons mdc-button__icon">save</i>
<span class="mdc-button__label">匯出積木</span>
</button>
<button class="mdc-button mdc-button--raised" id="downloadBtn">
<span class="mdc-button__ripple"></span>
<i class="material-icons mdc-button__icon">download</i>
<span class="mdc-button__label">下載專案</span>
</button>
</section>
</div>
</header>
<main class="main-content">
<div class="content-container">
<div id="blocklyDiv"></div>
<div class="output-panel">
<textarea id="codeOutput" readonly></textarea>
</div>
</div>
</main>
<input type="file" id="importInput" accept=".json" style="display: none">
<xml id="toolbox" style="display: none">
<category name="邏輯" colour="%{BKY_LOGIC_HUE}">
<block type="controls_if"></block>
<block type="logic_compare"></block>
<block type="logic_operation"></block>
<block type="logic_negate"></block>
</category>
<category name="迴圈" colour="%{BKY_LOOPS_HUE}">
<block type="controls_repeat_ext"></block>
<block type="controls_whileUntil"></block>
<block type="controls_for"></block>
</category>
<category name="數學" colour="%{BKY_MATH_HUE}">
<block type="math_number"></block>
<block type="math_arithmetic"></block>
<block type="math_single"></block>
</category>
<category name="文字" colour="%{BKY_TEXTS_HUE}">
<block type="text"></block>
<block type="text_join"></block>
</category>
<category name="變數" custom="VARIABLE" colour="%{BKY_VARIABLES_HUE}">
</category>
<category name="函數" custom="PROCEDURE" colour="%{BKY_PROCEDURES_HUE}">
</category>
<category name="事件" colour="#4A90E2">
<block type="script_init"></block>
<block type="custom_event"></block>
</category>
<category name="輸出" colour="#FF6B6B">
<block type="custom_log"></block>
</category>
<category name="地圖" colour="#27AE60">
<block type="map_load"></block>
<block type="map_init_settings">
<value name="LONGITUDE">
<shadow type="math_number">
<field name="NUM">120</field>
</shadow>
</value>
<value name="LATITUDE">
<shadow type="math_number">
<field name="NUM">23</field>
</shadow>
</value>
<value name="ZOOM">
<shadow type="math_number">
<field name="NUM">7</field>
</shadow>
</value>
<value name="PITCH">
<shadow type="math_number">
<field name="NUM">0</field>
</shadow>
</value>
<value name="BEARING">
<shadow type="math_number">
<field name="NUM">0</field>
</shadow>
</value>
</block>
<block type="map_flyto">
<value name="LONGITUDE">
<shadow type="math_number">
<field name="NUM">120</field>
</shadow>
</value>
<value name="LATITUDE">
<shadow type="math_number">
<field name="NUM">23</field>
</shadow>
</value>
<value name="ZOOM">
<shadow type="math_number">
<field name="NUM">7</field>
</shadow>
</value>
</block>
<block type="map_marker">
<value name="LONGITUDE">
<shadow type="math_number">
<field name="NUM">120</field>
</shadow>
</value>
<value name="LATITUDE">
<shadow type="math_number">
<field name="NUM">23</field>
</shadow>
</value>
</block>
<block type="map_event"></block>
<block type="map_get_state"></block>
</category>
</xml>
<div id="projectInfoDialog" class="mdc-dialog">
<div class="mdc-dialog__container">
<div class="mdc-dialog__surface">
<h2 class="mdc-dialog__title">專案資訊設定</h2>
<div class="mdc-dialog__content">
<label class="mdc-text-field mdc-text-field--filled" for="projectName">
<span class="mdc-text-field__ripple"></span>
<span class="mdc-floating-label">專案名稱</span>
<input id="projectName" class="mdc-text-field__input" type="text" required>
<span class="mdc-line-ripple"></span>
</label>
<label class="mdc-text-field mdc-text-field--filled" for="projectVersion">
<span class="mdc-text-field__ripple"></span>
<span class="mdc-floating-label">版本</span>
<input id="projectVersion" class="mdc-text-field__input" type="text" required>
<span class="mdc-line-ripple"></span>
</label>
<label class="mdc-text-field mdc-text-field--filled" for="projectAuthor">
<span class="mdc-text-field__ripple"></span>
<span class="mdc-floating-label">作者</span>
<input id="projectAuthor" class="mdc-text-field__input" type="text" required>
<span class="mdc-line-ripple"></span>
</label>
<label class="mdc-text-field mdc-text-field--filled mdc-text-field--textarea"
for="projectDescription">
<span class="mdc-text-field__ripple"></span>
<span class="mdc-floating-label">說明</span>
<textarea id="projectDescription" class="mdc-text-field__input" rows="5" required></textarea>
<span class="mdc-line-ripple"></span>
</label>
</div>
<div class="mdc-dialog__actions">
<button type="button" class="mdc-button mdc-dialog__button" data-mdc-dialog-action="close">
<span class="mdc-button__ripple"></span>
<span class="mdc-button__label">取消</span>
</button>
<button type="button" class="mdc-button mdc-dialog__button" data-mdc-dialog-action="accept">
<span class="mdc-button__ripple"></span>
<span class="mdc-button__label">確認</span>
</button>
</div>
</div>
</div>
<div class="mdc-dialog__scrim"></div>
</div>
</body>
</html>