forked from dart-lang/dart-pad
-
Notifications
You must be signed in to change notification settings - Fork 0
/
embed-html.html
327 lines (309 loc) · 15.9 KB
/
embed-html.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
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
<!DOCTYPE html>
<!-- Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
for details. All rights reserved. Use of this source code is governed by a
BSD-style license that can be found in the LICENSE file. -->
<html>
<head>
<meta charset="utf-8">
<link rel="shortcut icon" type="image/png" sizes="32x32" href="dart-32.png">
<link rel="shortcut icon" type="image/png" sizes="64x64" href="dart-64.png">
<link rel="shortcut icon" type="image/png" sizes="192x192" href="dart-192.png">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
<meta name="mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-capable" content="yes">
<title>DartPad</title>
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Roboto&family=Roboto+Mono&display=swap" rel="stylesheet">
<!-- codemirror -->
<link href="packages/codemirror/css/codemirror.css" rel="stylesheet" media="screen">
<link href="styles/cm-scrollbars.css" rel="stylesheet" media="screen">
<link href="styles/cm-hints.css" rel="stylesheet" media="screen">
<link href="styles/cm-dartpad-dark.css" rel="stylesheet" media="screen">
<link href="styles/cm-dartpad-light.css" rel="stylesheet" media="screen">
<script src="packages/codemirror/codemirror.js" defer></script>
<script src="scripts/dart_pad_search.js" defer></script>
<script src="packages/split/split.min.js" defer></script>
<!-- check that local storage is enabled -->
<script src="scripts/check_localstorage.js"></script>
<script defer src="scripts/embed_html.dart.js"></script>
<script defer src="scripts/ga.js"></script>
<script type="text/javascript" src="scripts/dark_mode.js"></script>
<!-- begin Material Design -->
<script src="packages/mdc_web/material-components-web.min.js"></script>
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<!-- end Material Design -->
</head>
<body class="d-flex flex-column">
<div id="progress-bar" role="progressbar" class="mdc-linear-progress hide">
<div class="mdc-linear-progress__buffering-dots"></div>
<div class="mdc-linear-progress__buffer"></div>
<div class="mdc-linear-progress__bar mdc-linear-progress__primary-bar">
<span class="mdc-linear-progress__bar-inner"></span>
</div>
<div class="mdc-linear-progress__bar mdc-linear-progress__secondary-bar">
<span class="mdc-linear-progress__bar-inner"></span>
</div>
</div>
<div id="navbar">
<nav>
<div class="mdc-tab-bar" role="tablist">
<div class="mdc-tab-scroller">
<div class="mdc-tab-scroller__scroll-area">
<div class="mdc-tab-scroller__scroll-content">
<button id="editor-tab" class="mdc-tab mdc-tab--active" role="tab" aria-selected="true" selected
tabindex="0">
<span class="mdc-tab__content">
<span class="mdc-tab__text-label">Dart</span>
</span>
<span class="mdc-tab-indicator mdc-tab-indicator--active">
<span class="mdc-tab-indicator__content mdc-tab-indicator__content--underline"></span>
</span>
<span class="mdc-tab__ripple"></span>
</button>
<button id="html-tab" class="mdc-tab mdc-tab" role="tab" tabindex="0">
<span class="mdc-tab__content">
<span class="mdc-tab__text-label">HTML</span>
</span>
<span class="mdc-tab-indicator mdc-tab-indicator">
<span class="mdc-tab-indicator__content mdc-tab-indicator__content--underline"></span>
</span>
<span class="mdc-tab__ripple"></span>
</button>
<button id="css-tab" class="mdc-tab mdc-tab" role="tab" tabindex="0">
<span class="mdc-tab__content">
<span class="mdc-tab__text-label">CSS</span>
</span>
<span class="mdc-tab-indicator mdc-tab-indicator">
<span class="mdc-tab-indicator__content mdc-tab-indicator__content--underline"></span>
</span>
<span class="mdc-tab__ripple"></span>
</button>
<button id="solution-tab" class="mdc-tab mdc-tab" role="tab" tabindex="0" hidden>
<span class="mdc-tab__content">
<span class="mdc-tab__text-label">Solution</span>
</span>
<span class="mdc-tab-indicator mdc-tab-indicator">
<span class="mdc-tab-indicator__content mdc-tab-indicator__content--underline"></span>
</span>
<span class="mdc-tab__ripple"></span>
</button>
<button id="test-tab" class="mdc-tab mdc-tab" role="tab" tabindex="0">
<span class="mdc-tab__content">
<span class="mdc-tab__text-label">Tests</span>
</span>
<span class="mdc-tab-indicator mdc-tab-indicator">
<span class="mdc-tab-indicator__content mdc-tab-indicator__content--underline"></span>
</span>
<span class="mdc-tab__ripple"></span>
</button>
</div>
</div>
</div>
</div>
</nav>
<div class="nav-buttons">
<button id="install-button" class="mdc-button">Install SDK</button>
<button id="show-hint" class="mdc-button">Hint</button>
<button id="format-code" class="mdc-button">Format</button>
<button id="reload-gist" class="mdc-button">Reset</button>
<button id="execute" class="mdc-button mdc-button--raised">
<i class="material-icons mdc-button__icon">play_arrow</i>
Run
</button>
<div class="position-relative text-right pr-2">
<button id="menu-button" class="mdc-icon-button material-icons">more_vert</button>
<div id="main-menu" class="mdc-menu mdc-menu-surface">
<ul class="mdc-list" role="menu" aria-hidden="true" aria-orientation="vertical" tabindex="-1">
<li id="show-test-menu-item" class="mdc-list-item" role="menuitem">
<span id="show-test-checkmark" class="mdc-list-item__graphic hide">
<i class="material-icons mdc-select__icon" tabindex="-1" role="button">check</i>
</span>
<span class="mdc-list-item__text">Show tests</span>
</li>
<li id="editable-test-solution-menu-item" class="mdc-list-item" role="menuitem">
<span id="editable-test-solution-checkmark" class="mdc-list-item__graphic hide">
<i class="material-icons mdc-select__icon" tabindex="-1" role="button">check</i>
</span>
<span class="mdc-list-item__text">Editable test/solution</span>
</li>
</ul>
</div>
</div>
</div>
</div>
<section id="tab-container">
<div id="editor-and-console-container">
<div id="editor-container">
<div id="search-dialog" class="search-embed-html" hidden>
<div id="find-col1">
<button id="open-replace" title="Toggle Replace"
class="mdc-icon-button material-icons">expand_more
</button>
</div>
<div id="find-col2">
<div id="find-row">
<span id="find-options">
<input type="text" id="find-text" placeholder="Find"
tabindex="1" autocomplete="off" spellcheck="false">
<button id="find-match-case" title="Match Case"
class="simple-icon-button"
aria-pressed="false">
</button>
<button id="find-wholeword" title="Match Whole Word"
class="simple-icon-button"
aria-pressed="false">
</button>
<button id="find-regex" title="Use Regular Expression"
class="simple-icon-button"
aria-pressed="false">
</button>
</span>
<span id="search-results">
No Results
</span>
<button id="find-previous" title="Previous Match (Shift-F4)"
class="mdc-icon-button material-icons">north
</button>
<button id="find-next" title="Next Match (F4)"
class="mdc-icon-button material-icons">south
</button>
<button id="find-close" title="Close (Escape)"
class="mdc-icon-button material-icons">close
</button>
</div>
<div id="replace-row">
<span id="replace-options">
<input type="text" id="replace-text" placeholder="Replace"
tabindex="2" autocomplete="off" spellcheck="false">
</span>
<button id="replace-once"
class="mdc-icon-button"
title="Replace (Enter)">
</button>
<button id="replace-all"
class="mdc-icon-button"
title="Replace All">
</button>
</div>
</div>
</div>
<div id="user-code-view" class="flex-auto d-flex flex-row no-overflow">
<div id="user-code-editor" spellcheck="false"></div>
</div>
</div>
<div class="editor-button-group">
<div id="dartbusy" class="busylight"></div>
<button id="copy-code" title="Copy code" class="mdc-icon-button material-icons">file_copy</button>
<button id="open-in-dartpad" title="Full screen" class="mdc-icon-button material-icons">launch</button>
</div> <div id="console-output-footer" class="footer-top-border" hidden>
<div id="console-output-header">
<span class="view-label">
Console <span id="unread-console-counter" class="Counter" hidden></span>
</span>
<div id="console-expand-icon-container">
<button id="console-clear-button" title="Clear console" class="console-clear-icon mdc-icon-button"></button>
<button id="console-expand-icon" title="Expand console" class="mdc-icon-button material-icons">
expand_less
</button>
</div>
</div>
<div id="console-output-container" class="console custom-scrollbar" hidden></div>
</div>
</div>
<div id="web-output">
<span id="web-output-label" class="view-label">UI Output</span>
<!-- allow-popups allows plugins like url_launcher to open popups. -->
<iframe id="frame" sandbox="allow-scripts allow-popups" class="flex-auto">
</iframe>
</div>
<div class="mdc-snackbar">
<div class="mdc-snackbar__surface">
<div class="mdc-snackbar__label"
role="status"
aria-live="polite">
</div>
</div>
</div>
</section>
<footer flex layout horizontal class="footer">
<div id="feature-message" class="info-message"></div>
<div id="issues-message" class="info-message"></div>
<button id="issues-toggle" class="mdc-button mdc-button--dense mdc-button--outlined" hidden></button>
</footer>
<div id="flash-container" class="position-fixed right-2 bottom-6">
<div id="test-result-box" class="flash flash-warn" hidden>
<div title="Close" class="close-flash-container">
<button class="close-flash-button mdc-icon-button material-icons">close</button>
</div>
<div class="message-container custom-scrollbar"></div>
</div>
<div id="hint-box" class="flash" hidden>
<div title="Close" class="close-flash-container">
<button class="close-flash-button mdc-icon-button material-icons">close</button>
</div>
<div class="message-container custom-scrollbar"></div>
</div>
<div id="issues" hidden></div>
</div>
<div class="mdc-dialog"
role="alertdialog"
aria-modal="true"
aria-labelledby="my-dialog-title"
aria-describedby="my-dialog-content">
<div class="mdc-dialog__container">
<div class="mdc-dialog__surface">
<h2 class="mdc-dialog__title" id="my-dialog-title"></h2>
<div class="mdc-dialog__content" id="my-dialog-content"></div>
<footer class="mdc-dialog__actions">
<button type="button" id="dialog-left-button" class="mdc-button mdc-dialog__button">
<span class="mdc-button__label">No</span>
</button>
<button type="button" id="dialog-right-button" class="mdc-button mdc-dialog__button">
<span class="mdc-button__label">Yes</span>
</button>
</footer>
</div>
</div>
<div class="mdc-dialog__scrim"></div>
</div>
<div id="keyboard-dialog"
class="mdc-dialog"
role="alertdialog"
aria-modal="true"
aria-labelledby="my-dialog-title"
aria-describedby="my-dialog-content">
<div class="mdc-dialog__container">
<div class="mdc-dialog__surface">
<h2 class="mdc-dialog__title">Keyboard shortcuts</h2>
<div class="mdc-dialog__content">
<div class="keyboard-container">
<div id="keyboard-map-info">
</div>
<div id="vim-switch-container">
<div class="mdc-switch">
<div class="mdc-switch__track"></div>
<div class="mdc-switch__thumb-underlay">
<div class="mdc-switch__thumb">
<input type="checkbox"
id="vim-switch"
class="mdc-switch__native-control"
role="switch">
</div>
</div>
</div>
<label for="vim-switch">Use Vim Keyboard Mapping</label>
</div>
</div>
</div>
<footer class="mdc-dialog__actions">
<button type="button" id="keyboard-ok-button"
class="mdc-button mdc-dialog__button">
<span class="mdc-button__label">OK</span>
</button>
</footer>
</div>
</div>
<div class="mdc-dialog__scrim"></div>
</div>
</body>
</html>