forked from gitana/alpaca
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
298 lines (258 loc) · 10.6 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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
<title>Alpaca - Easy HTML5 Forms for jQuery</title>
<meta name="keywords"
content="jquery forms,JSON forms"/>
<meta name="description"
content="Alpaca is a client-side, cross-platform, JSON based forms engine for rendering elegant forms. It comes with comprehensive control library and support for validation, wizard, layout, templating, preview, i18n etc. Built upon jQuery library, jQuery UI and jQuery Mobile, it can be easily extended for additional form controls."/>
<meta name="author" content="Gitana Software Inc."/>
<link rel="icon" type="image/x-icon" href="favicon.ico"/>
<script type="text/javascript" src="lib/jquery-latest.min.js">
</script>
<!--Alpaca JavaScript-->
<script type="text/javascript" src="lib/base.js"></script>
<script type="text/javascript" src="lib/validator.js"></script>
<script type="text/javascript" src="lib/jquery.tmpl.js"></script>
<script type="text/javascript" src="lib/equiv_and_hoozit.js"></script>
<script type="text/javascript" src="lib/jquery.maskedinput-1.3.js"></script>
<script type="text/javascript" src="js/Alpaca.js"></script>
<script type="text/javascript" src="js/views/DefaultView.js"></script>
<script type="text/javascript" src="js/views/ListView.js"></script>
<script type="text/javascript" src="js/views/MobileView.js"></script>
<script type="text/javascript" src="js/views/LayoutView.js"></script>
<script type="text/javascript" src="js/View.js"></script>
<script type="text/javascript" src="js/Field.js"></script>
<script type="text/javascript" src="js/ControlField.js"></script>
<script type="text/javascript" src="js/ContainerField.js"></script>
<script type="text/javascript" src="js/Connector.js"></script>
<script type="text/javascript" src="js/Form.js"></script>
<!--Alpaca Base Fields-->
<script type="text/javascript" src="js/fields/basic/TextField.js"></script>
<script type="text/javascript" src="js/fields/basic/TextAreaField.js"></script>
<script type="text/javascript" src="js/fields/basic/CheckBoxField.js"></script>
<script type="text/javascript" src="js/fields/basic/FileField.js"></script>
<script type="text/javascript" src="js/fields/basic/ListField.js"></script>
<script type="text/javascript" src="js/fields/basic/RadioField.js"></script>
<script type="text/javascript" src="js/fields/basic/SelectField.js"></script>
<script type="text/javascript" src="js/fields/basic/NumberField.js"></script>
<script type="text/javascript" src="js/fields/basic/ArrayField.js"></script>
<script type="text/javascript" src="js/fields/basic/ObjectField.js"></script>
<script type="text/javascript" src="js/fields/basic/AnyField.js"></script>
<!--End of Alpaca Base Fields-->
<script type="text/javascript" src="js/views/DefaultViewLanguagePacks.js"></script>
<!--End of Alpaca JavaScript-->
<script type="text/javascript" src="examples/lib/google-code-prettify/prettify.min.js"></script>
<script type="text/javascript" src="examples/lib/tweet/jquery.tweet.js"></script>
<script type="text/javascript" src="examples/js/footer.js"></script>
<!--Alpaca CSS-->
<link type="text/css" href="css/960.fluid.css" rel="stylesheet"/>
<link type="text/css" href="css/alpaca.css" rel="stylesheet"/>
<link type="text/css" href="css/jquery-ui-latest.custom.css" rel="stylesheet"/>
<!--End of Alpaca CSS-->
<link type="text/css" href="examples/css/site.css" rel="stylesheet"/>
<link type="text/css" href="examples/lib/google-code-prettify/prettify.css" rel="stylesheet"/>
<link type="text/css" href="examples/lib/tweet/jquery.tweet.css" rel="stylesheet"/>
<script type="text/javascript" src="https://use.typekit.com/fnm3kpm.js"></script>
<script type="text/javascript">try{Typekit.load();}catch(e){}</script>
</head>
<body>
<header>
<div class='container_12'>
<div class='actual-body'>
<div class='grid_12'>
<h1><img src="examples/img/alpaca.png"><span>Easy HTML5 Forms for jQuery</span></h1>
<div class="resource-bar">
<a href="index.html" class="current">Home</a>
<a href="resources.html#downloads">Downloads</a>
<a href="tutorials.html">Tutorials</a>
<a href="examples/components/fields/text-field.html">Components</a>
<a href="resources.html#documentation">Documentation</a>
<a href="resources.html#unittests">Tests</a>
<a href="examples/forms/customer-profile/edit-form.html">Forms</a>
<a href="resources.html#mobile">Mobile</a>
</div>
</div>
</div>
</div>
</header>
<div class='container_12'>
<div class="actual-body">
<div class='grid_12'>
<div class="widget">
<div class="widget-title">
<h2>What is Alpaca?</h2>
</div>
<div class="widget-body">
<p>
Alpaca is a plugin for <a href="http://jquery.com/" target="_blank">jQuery</a>,
<a href="http://jqueryui.com" target="_blank">jQuery UI</a> and
<a href="http://jquerymobile.com/">jQuery Mobile</a> that makes it easy to render beautiful HTML5 Web Forms
for web and mobile applications.
</p>
<p>
Alpaca is built around <a href="http://json-schema.org/" target="_blank">JSON-Schema</a> for expression of the
form object model, types, properties, validation logic and
constraints. It provides a comprehensive and extensible control library with support for wizards, layout, I18N
and pluggable templating engines (like EJS and jQuery Templating).
</p>
<p>
Alpaca is an <a href="https://github.com/gitana/alpaca" target="_blank">open-source, community-led project</a>
licensed under Apache 2.0.
</p>
<p class="embedded-youtube">
<iframe width="640" height="360" src="https://www.youtube.com/embed/mK4BXiGNbvA" frameborder="0" allowfullscreen></iframe>
</p>
<p class="embedded-youtube">
<iframe width="640" height="360" src="https://www.youtube.com/embed/9i2pml9p45Q" frameborder="0" allowfullscreen></iframe>
</p>
</div>
</div>
<div class="widget">
<div class="widget-title">
<h2>How do I use Alpaca?</h2>
</div>
<div class="widget-body">
<div class="step">
<img src="examples/img/step-1.png"/>
<p>
Copy the following HTML into your web page's <code><head/></code> block.
</p>
<pre class="prettyprint linenums">
<script type="text/javascript" src="http://code.jquery.com/jquery-latest.min.js"></script>
<script type="text/javascript" src="http://www.alpacajs.org/js/alpaca.min.js"></script>
<link type="text/css" href="http://www.alpacajs.org/css/alpaca.min.css" rel="stylesheet"/>
</pre>
</div><!-- end step -->
<div class="step">
<img src="examples/img/step-2.png"/>
<p>
Add a <code><div></code> tag to your HTML page and call <code>$.alpaca()</code> with your form data.
</p>
<pre class="prettyprint linenums">
<div id="form1"></div>
<script type="text/javascript">
$(function() {
$("#form1").alpaca({
"schema": {
"title":"User Feedback",
"description":"What do you think about Alpaca?",
"type":"object",
"properties": {
"name": {
"type":"string",
"title":"Name"
},
"ranking": {
"type":"string",
"title":"Ranking",
"enum":['excellent','not too shabby','alpaca built my hotrod']
}
}
}
});
});
</script>
</pre>
</div><!-- end step -->
<div class="step">
<img src="examples/img/step-3.png"/>
<p>
Enjoy your newly rendered Alpaca form.
</p>
<div class="container_12">
<div id="form1" class="tutorial-example"></div>
</div>
<p>
That's all there is to it.
</p>
<p>
Alpaca lets you provide data, schema and layout information using simple JSON.
<br/>
Check out our <a href="tutorials.html">Tutorials</a> for more advanced examples!
</p>
<br/>
</div><!-- end step -->
</div><!-- end widget-body -->
</div><!-- end widget -->
<div class="widget">
<div class="widget-title">
<h2><a name="downloads">How do I get started?</a></h2>
</div>
<div class="widget-body">
<p>
It's easy to get started. You can grab the code and drop it into your new or existing projects. You can also download
the source code, build it yourself and customize Alpaca for your own projects.
</p>
<h3>Download Alpaca</h3>
<p>
We offer <a href="resources.html#downloads">releases</a> as well as <a href="resources.html#downloads">snapshot builds</a>
of Alpaca.
</p>
<h3>Source Code</h3>
<p>
Alpaca is hosted on GitHub.
<br/>
<br/>
Feel free to
<a href="http://www.github.com/gitana/alpaca" target="_blank">visit our project page</a>, fork the code
and submit a pull request!
</p>
<h3>Ready to Dive In?</h3>
<p>
At the top of this page, you'll find links to
<a href="tutorials.html">tutorials</a> and <a href="resources.html#documentation">documentation</a>. We also
provide demonstrations and examples of
<a href="examples/forms/customer-profile/edit-form.html">complex forms</a> and
<a href="resources.html#mobile">mobile applications</a> using jQuery Mobile.
<br/>
<br/>
We provide an
<a href="examples/components/fields/text-field.html">API and Component Reference</a> that describes all of the nifty
components and controls that are available out-of-the-box. This will give you an idea of how to build your own
extensions.
<br/>
<br/>
Finally, we put all of our <a href="resources.html#unittests">Unit Tests</a> online.
<br/>
</p>
</div>
</div>
<br/>
<br/>
</div><!-- end grid_12 -->
</div><!-- end actual-body -->
</div><!-- end container_12 -->
<script>
$("#form1").alpaca({
"schema": {
"title":"User Feedback",
"description":"What do you think about Alpaca?",
"type":"object",
"properties": {
"name": {
"type":"string",
"title":"Name"
},
"ranking": {
"type":"string",
"title":"Ranking",
"enum":['excellent','not too shabby','alpaca built my hotrod']
}
}
}
});
</script>
<script>
window.prettyPrint && prettyPrint();
</script>
<footer>
<div class="container_12">
<div class="grid_12 copyright">
Copyright © 2012 Gitana Software | All Rights Reserved
</div>
</div>
</footer>
</body>
</html>