-
Notifications
You must be signed in to change notification settings - Fork 129
/
index.html
executable file
·332 lines (306 loc) · 14 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
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
328
329
330
331
332
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="Learn how to create awesome looking apps with Onsen UI and AngularJS, Angular 2+, React, Vue 2/3 or Vanilla JS in this playground.">
<title>Onsen UI Playground</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/platform/1.3.3/platform.min.js"></script>
<script>
if ((/^(ios|android)/i).test(platform.os.family) && screen.width <= 699) {
location.href = location.pathname.replace('index.html', '') + 'tabs.html' + location.search;
}
</script>
<link rel="canonical" href="https://onsen.io/playground/" />
<link rel="stylesheet" href="css/split.css">
<link rel="stylesheet" href="css/common.css">
<link rel="stylesheet" href="css/header.css">
<link rel="stylesheet" href="css/dropdown.css">
<link rel="stylesheet" href="css/default.css">
<link rel="stylesheet" href="css/dark-skin.css">
<link rel="stylesheet" href="vendor/highlight/chrome.css">
<link rel="stylesheet" href="vendor/highlight/monokai.css">
<script defer src="vendor/emmet/emmet.min.js"></script>
<script defer type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/split.js/1.2.0/split.min.js"></script>
<script defer src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.9.0/highlight.min.js"></script>
<script defer src="https://cdnjs.cloudflare.com/ajax/libs/marked/0.3.6/marked.min.js"></script>
<script defer src="https://cdnjs.cloudflare.com/ajax/libs/ace/1.2.6/ace.js" type="text/javascript" charset="utf-8"></script>
<script defer src="https://cdnjs.cloudflare.com/ajax/libs/ace/1.2.6/ext-emmet.js"></script>
<script defer src="https://cdnjs.cloudflare.com/ajax/libs/ace/1.2.6/ext-language_tools.js" type="text/javascript" charset="utf-8"></script>
<script defer src="https://unpkg.com/srcdoc-polyfill@1.0.0/srcdoc-polyfill.min.js"></script>
<script src="js/app.js"></script>
<script src="js/util.js"></script>
<script src="js/config.js"></script>
<script src="js/setup.js"></script>
<script src="js/services.js"></script>
<script src="js/listeners.js"></script>
<script src="js/modules.js"></script>
<!-- Hotjar -->
<script>
(function(h,o,t,j,a,r){
h.hj=h.hj||function(){(h.hj.q=h.hj.q||[]).push(arguments)};
h._hjSettings={hjid:100912,hjsv:5};
a=o.getElementsByTagName('head')[0];
r=o.createElement('script');r.async=1;
r.src=t+h._hjSettings.hjid+j+h._hjSettings.hjsv;
a.appendChild(r);
})(window,document,'//static.hotjar.com/c/hotjar-','.js?sv=');
</script>
</head>
<body class="full">
<base target="_blank">
<header>
<div id="h1" class="design-2016">
<div id="monaca-bar">
<div class="wrapper">
<ul>
<li class="dropdown">
<a href="https://monaca.io/">Monaca Toolkit</a>
</li>
</ul>
</div>
</div>
</div>
<nav id="h2" class="design-2016">
<div class="title">
<a href="https://onsen.io/"><span class="logo"></span></a>
<a href="." target="_self">
<span class="subtitle">
<span i18n content="Playground" content-ja="プレイグラウンド"></span>
</span>
</a>
</div>
<ul class="header-links">
<li>
<a href="https://onsen.io/v2/guide/" i18n content="Guide" content-ja="ガイド"></a>
</li>
<li>
<a href="https://onsen.io/v2/api/js/" i18n content="API" content-ja="API"></a>
</li>
<li>
<a href="https://community.onsen.io/" i18n content="Community" content-ja="コミュニティ"></a>
</li>
<li>
<a href="https://gitter.im/OnsenUI/OnsenUI" i18n content="Chat" content-ja="チャット"></a>
</li>
<li>
<a href="https://medium.com/the-web-tub" i18n content="Articles" content-ja="ブログ"></a>
</li>
</ul>
</nav>
<div id="h3">
<div id="toolbar">
<button id="modify-button" class="toolbar-button tooltip"
tooltip="Modify the source of this tutorial"
tooltip-ja="このチュートリアルのソースコードを編集する"
>
<span class="icon"></span><span class="label" i18n content="Improve this" content-ja="改善する"></span>
</button>
<!--<button id="download-button" class="toolbar-button tooltip" tooltip="Generate Cordova project based on this sample"><span></span>Download</button>-->
<form id="codepen-form" action="https://codepen.io/pen/define" method="POST" target="_blank">
<input type="hidden" name="data" id="codepen-data">
<button id="codepen-button" class="toolbar-button tooltip"
tooltip="Export this sample to Codepen"
tooltip-ja="このサンプルをCodepenにエクスポートする"
>
<span class="icon"></span><span class="label" i18n content="Export to Codepen" content-ja="Codepenにエクスポート"></span>
</button>
</form>
<button id="issue-button" class="toolbar-button tooltip"
tooltip="Report an issue on GitHub based on this code"
tooltip-ja="このコードに関する問題をGitHubに報告する"
>
<span class="icon"></span><span class="label" i18n content="Report an issue" content-ja="問題を報告する"></span>
</button>
</div>
<!-- menu - dropdown - frameworks - tuts -->
<label id="modules">
<div class="select">
<span class="select-thumbnail"></span>
<span class="select-item" i18n content="Select Template" content-ja="テンプレートの選択"></span>
<span class="select-arrow"></span>
</div>
<input type="checkbox">
<div class="menu">
<div class="menu-mask"></div>
<div class="menu-container">
<label class="menu-search">
<input id="search-input" type="search" placeholder="Filter by space-separated keywords (e.g. page push)" autocomplete="off">
<script>if (app.config.lang === 'ja') document.getElementById('search-input').placeholder = 'スペース区切りのキーワードで絞り込み(例:push)'</script>
</label>
<ul class="menu-list">
<li class="framework-item">
<input type="radio" id="r-vanilla" name="framework" checked>
<label for="r-vanilla" framework="vanilla">
<div class="framework-logo"></div>
</label>
<ul class="module-list"></ul>
</li>
<li class="framework-item">
<input type="radio" id="r-angular1" name="framework">
<label for="r-angular1" framework="angular1">
<div class="framework-logo"></div>
</label>
<ul class="module-list"></ul>
</li>
<li class="framework-item">
<input type="radio" id="r-angular2" name="framework">
<label for="r-angular2" framework="angular2">
<div class="framework-logo"></div>
</label>
<ul class="module-list"></ul>
</li>
<li class="framework-item">
<input type="radio" id="r-react" name="framework">
<label for="r-react" framework="react">
<div class="framework-logo"></div>
</label>
<ul class="module-list"></ul>
</li>
<li class="framework-item">
<input type="radio" id="r-vue" name="framework">
<label for="r-vue" framework="vue">
<div class="framework-logo"></div>
</label>
<ul class="module-list"></ul>
</li>
<li class="framework-item">
<input type="radio" id="r-vue3" name="framework">
<label for="r-vue3" framework="vue3">
<div class="framework-logo"></div>
</label>
<ul class="module-list"></ul>
</li>
</ul>
</div>
</div>
</label>
</div>
</header>
<div id="container">
<div id="leftPane" class="split split-horizontal">
<div id="leftTopPane" class="split content">
<div id="tutorial-content" class="frame">
<h2>Getting Started</h2>
<img class="welcome-logo" src="assets/icons/logo_onsenui.svg" alt="onsen">
<p>
Welcome to the Onsen UI Playground. Here you can interactively learn how to use Onsen UI components and test your own code with the <strong>latest</strong> Onsen UI version.
</p>
<p>
Tutorials are separated depending on the front-end framework and categories. Use the above menu to select tutorials in <strong>Vanilla JavaScript</strong> or with
a specific framework: <strong>AngularJS</strong>, <strong>Angular 2+</strong>, <strong>React</strong> or <strong>Vue.js 2/3</strong>.
</p>
<p>
If you find any error, please hit "Improve this" button and send us a Pull Request or inform
about it in the <a href="https://community.onsen.io/">forum</a> or <a href="https://gitter.im/OnsenUI/OnsenUI">chat</a>.
This tutorial is completely standalone so you can fork it and submit your own examples as PR to <a href="https://github.com/OnsenUI/tutorial">the repo</a>.
</p>
<p>Some tips:</p>
<ul>
<li>
In the preview section you can switch between <strong>iOS and Android view</strong> for <em>Automatic Styling</em>.
</li>
<li>
If you want to save any of these examples you can <strong>export the code to your Codepen account</strong> with "Export to Codepen" button.
</li>
<li>
Report an issue on GitHub with the current code and browser information. Hit the "Report an issue" button after choosing a template in the above drop-down and changing the code to reproduce the issue.
</li>
<li>
Press <strong>‘ctrl + s’</strong> to quickly refresh the preview.
</li>
</ul>
<p>You can ask anything in the <a href="https://community.onsen.io/">community forum</a> if you have issues. We hope you find this tool helpful, happy coding!</p>
</div>
<div id="tutorial-pages">
<span id="pages-previous">◀</span>
<span id="pages-current">1</span>
/
<span id="pages-total">1</span>
<span id="pages-next">▶</span>
</div>
</div>
<div id="leftBottomPane" class="split content">
<div id="output" class="frame">
<div class="preview-toolbar">
<div id="run" class="custom-button"><span><span>▶ </span><span class="button-text" i18n content="Run" content-ja="実行"></span></span></div>
<span id="styling">
<label class="custom-button">
<input type="radio" name="styling" checked>
<span platform="ios"><span class="styling-icon icon-ios"></span><span class="styling-label">iOS</span></span>
</label>
<label class="custom-button">
<input type="radio" name="styling">
<span platform="android"><span class="styling-icon icon-android"></span><span class="styling-label">Android</span></span>
</label>
</span>
</div>
<iframe frameborder="0" scrolling="no"></iframe>
</div>
</div>
</div>
<div id="rightPane" class="split split-horizontal">
<div id="rightTopPane" class="split content">
<div class="editor-title">HTML</div>
<div id="html-input" class="frame input"></div>
</div>
<div id="rightBottomPane" class="split content">
<div class="editor-title">JS</div>
<div id="js-input" class="frame input"></div>
</div>
</div>
</div>
<div id="modal-container">
<div id="modal-mask"></div>
<div id="modal">
<div id="modal-title">Generate Cordova Project</div>
<div id="modal-confirm" class="modal-body">
<div id="modal-content">Are you sure you want to generate a Cordova Project based on this sample and download it?</div>
<div id="modal-footer"><button id="modal-generate-button" autofocus>Generate</button> <button id="modal-cancel-button">Cancel</button></div>
</div>
<div id="modal-generating" class="modal-body">
<div class="cssload-loader"></div>
</div>
</div>
</div>
<div id="placeholder">
<svg version="1.0" xmlns="http://www.w3.org/2000/svg"
width="86.000000pt" height="81.000000pt" viewBox="0 0 86.000000 81.000000"
preserveAspectRatio="xMidYMid meet">
<metadata>
</metadata>
<g transform="translate(0.000000,81.000000) scale(0.100000,-0.100000)"
fill="#000000" stroke="none">
<path style="fill: #FC3429;" d="M651 777 c-19 -7 -43 -24 -54 -38 -18 -25 -18 -33 -7 -137 14 -129 5
-204 -34 -282 -22 -45 -23 -49 -7 -40 35 18 84 74 103 118 14 31 21 80 27 187
6 107 12 150 24 169 10 14 17 28 17 31 0 8 -33 5 -69 -8z"/>
<path style="fill: #FC3429;" d="M478 705 c-23 -15 -47 -46 -65 -82 -26 -54 -28 -66 -29 -188 0 -72
-2 -136 -2 -142 -3 -23 -40 -13 -66 17 -32 38 -40 81 -34 178 5 80 26 135 68
180 26 27 20 28 -29 2 -111 -56 -141 -111 -146 -259 -2 -74 -8 -117 -19 -138
-15 -30 -15 -31 7 -37 12 -4 60 -9 108 -13 72 -5 92 -3 131 15 77 34 82 50 88
252 5 140 9 181 23 208 21 38 14 40 -35 7z"/>
<path style="fill: #FC3429;" d="M738 487 c62 -66 50 -156 -35 -248 -127 -137 -372 -191 -526 -115
-71 34 -98 71 -106 145 l-6 56 -13 -34 c-16 -46 -15 -116 3 -150 90 -174 483
-156 681 31 65 61 94 118 94 182 0 56 -18 94 -60 130 -39 32 -61 34 -32 3z"/>
</g>
</svg>
</div>
<div id="dummy-loader" style="visibility: hidden; width: 0; height: 0;">
<div class="vanilla-black"></div>
<div class="vanilla-blue"></div>
<div class="angular1-black"></div>
<div class="angular1-blue"></div>
<div class="angular2-black"></div>
<div class="angular2-blue"></div>
<div class="react-black"></div>
<div class="react-blue"></div>
<div class="vue-black"></div>
<div class="vue-blue"></div>
<div class="vanilla-thumbnail"></div>
<div class="angular1-thumbnail"></div>
<div class="angular2-thumbnail"></div>
<div class="react-thumbnail"></div>
<div class="vue-thumbnail"></div>
</div>
</body>
</html>