Lettuce, Mobile Framework for romantic#
Lettuce is a Small & Powerful Framework for Romantic. Online demo http://phodal.github.io/lettuce.
Lettuce 是一个轻巧的移动开发框架。
用途: Romantic
,前端学习
Gallery(展示)##
应用场景
-
一个情人节礼物: http://valentine.phodal.com/
Lettuce Usage(用法)##
Class(类)###
var L = ;var { };var sub = zero;
Template(模板)###
var L = ;var data = "title": "JavaScript Templates"; var result = LTemplate;
Router(路由)###
var L = ; var check = LRouter ;;
Effect(效果)###
淡出####
LFX;
淡入####
LFX;
Promise###
{ var L = ; var p = ; return p;} ;
Ajax###
lettuce
lettuce
AMD
RequireJS Config
require;
App.js
define(['lettuce'], function (Lettuce) { var lettuce = new Lettuce(); };});
Single Page Application Example(单页面应用)##
1.new a instance
var L = ;
2.define data
var data = about: "Template" what: "This about A Mobile Framework For Romantic" why: "Why is a new Framework";
3.create function for router
var { var aboutPage = ; var templates = LTemplate; return aboutPage;};var { var whyPage = ; var templates = LTemplate; return whyPage;};
4.Add router
LRouter ;
Process##
Done###
- Template
- Router
- Ajax
- Class
- Promise
- Event
- Effect
On Going###
- View
License##
© 2015 Phodal Huang. This code is distributed under the MIT license. See LICENSE.txt
in this directory.