Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
298 lines (258 sloc) 10.6 KB
<!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>&lt;head/&gt;</code> block.
</p>
<pre class="prettyprint linenums">
&lt;script type="text/javascript" src="http://code.jquery.com/jquery-latest.min.js"&gt;&lt;/script&gt;
&lt;script type="text/javascript" src="http://www.alpacajs.org/js/alpaca.min.js"&gt;&lt;/script&gt;
&lt;link type="text/css" href="http://www.alpacajs.org/css/alpaca.min.css" rel="stylesheet"/&gt;
</pre>
</div><!-- end step -->
<div class="step">
<img src="examples/img/step-2.png"/>
<p>
Add a <code>&lt;div&gt;</code> tag to your HTML page and call <code>$.alpaca()</code> with your form data.
</p>
<pre class="prettyprint linenums">
&lt;div id="form1"&gt;&lt;/div&gt;
&lt;script type="text/javascript"&gt;
$(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']
}
}
}
});
});
&lt;/script&gt;
</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 &copy; 2012 Gitana Software | All Rights Reserved
</div>
</div>
</footer>
</body>
</html>