forked from OnsenUI/playground
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
executable file
·278 lines (254 loc) · 11.8 KB
/
index.html
File metadata and controls
executable file
·278 lines (254 loc) · 11.8 KB
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
<!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 hybrid mobile apps with Onsen UI and AngularJS, Angular 2, React or Vanilla JS in this interactive tutorial.">
<title>Onsen UI Tutorial</title>
<script>
if (screen.width <= 699) {
location.href = '/tabs.html' + location.search;
}
</script>
<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/default.css">
<link rel="stylesheet" href="css/dark-skin.css">
<link rel="stylesheet" href="lib/highlight/chrome.css">
<link rel="stylesheet" href="lib/highlight/monokai.css">
<link rel="canonical" href="https://tutorial.onsen.io/" />
<script defer src="lib/Split.js/split.min.js"></script>
<script defer src="lib/highlight/highlight.min.js"></script>
<script defer src="lib/marked/marked.min.js"></script>
<!--<script defer src="lib/babel/babel.min.js" type="text/javascript" charset="utf-8"></script>-->
<!--<script defer src="lib/typescript/typescript.min.js" type="text/javascript" charset="utf-8"></script>-->
<!--<script defer src="lib/jszip/jszip.min.js" type="text/javascript" charset="utf-8"></script>-->
<!--<script defer src="lib/jszip/jszip-utils.min.js" type="text/javascript" charset="utf-8"></script>-->
<!--<script defer src="lib/FileSaver/FileSaver.min.js" type="text/javascript" charset="utf-8"></script>-->
<script defer src="lib/ace/emmet.min.js"></script>
<script defer src="lib/ace/ace.js" type="text/javascript" charset="utf-8"></script>
<script defer src="lib/ace/mode-html.js" type="text/javascript" charset="utf-8"></script>
<script defer src="lib/ace/ext-emmet.js" type="text/javascript" charset="utf-8"></script>
<script defer src="lib/ace/mode-javascript.js" type="text/javascript" charset="utf-8"></script>
<script defer src="lib/ace/mode-jsx.js" type="text/javascript" charset="utf-8"></script>
<script defer src="lib/ace/mode-typescript.js" type="text/javascript" charset="utf-8"></script>
<script defer src="lib/ace/ext-language_tools.js" type="text/javascript" charset="utf-8"></script>
<script defer src="lib/srcdoc-polyfill/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>
</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="." target="_self"><span class="logo"></span><span class="subtitle"><span>Interactive</span> <span>Tutorial</span></span></a>
</div>
<ul>
<li class="dropdown">
<a href="https://onsen.io/getting-started.html">Getting Started</a>
</li>
<li class="dropdown">
<a href="https://onsen.io/v2/docs/js.html">Docs</a>
</li>
<li class="dropdown">
<a href="https://community.onsen.io/">Community</a>
</li>
<li>
<a href="https://onsen.io/blog">Blog</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"><span><svg aria-hidden="true" class="octicon octicon-pencil" height="16" version="1.1" viewBox="0 0 14 16" width="14"><path style="fill: #666" d="M0 12v3h3l8-8-3-3L0 12z m3 2H1V12h1v1h1v1z m10.3-9.3l-1.3 1.3-3-3 1.3-1.3c0.39-0.39 1.02-0.39 1.41 0l1.59 1.59c0.39 0.39 0.39 1.02 0 1.41z"></path></svg></span>Improve this</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"><span></span>Export to Codepen</button>
</form>
</div>
<label id="modules">
<div class="select">
<span class="select-thumbnail"></span>
<span class="select-item">Select Tutorial</span>
<span class="select-arrow"></span>
</div>
<input type="checkbox">
<div class="menu">
<div class="menu-mask"></div>
<ul>
<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>
</ul>
</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 Tutorial. 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> or <strong>React</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>
You can also <strong>generate a Cordova project</strong> from the current tutorial with "Download" button.
</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> Run</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 View</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 View</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="vanilla-thumbnail"></div>
<div class="angular1-thumbnail"></div>
<div class="angular2-thumbnail"></div>
<div class="react-thumbnail"></div>
</div>
</body>
</html>