-
Notifications
You must be signed in to change notification settings - Fork 5
Description
@elseloop Lets use this ticket to keep an on going conversation about PHP template shift.
I know we are working on a Handlebars version to replace our PHP templates, but I thought it might be worth while to show how Jade template engine would work (branch: http://tinyurl.com/zlvqzjg).
Jade is widely used and actually comes with Node Express for application framework.
- New html driver; jade API configuration directly from gulp file! (http://tinyurl.com/ztkq5zy)
- Global and local vars with an options.jade to condition them if needed.
- Layouts separated / extend to templates (http://tinyurl.com/hehbddx & http://tinyurl.com/zjh3c88).
- Produces html files. did I mention that yet?
- Includes are welcome
- MIXINS!
I built us a helpful form field mixin too: http://tinyurl.com/huaz8dl
- input (all types, but none are inline) = http://tinyurl.com/z6egpjj
- inline radio = http://tinyurl.com/j4hgd4c
- inline checkbox = http://tinyurl.com/j2uenbz
- select = http://tinyurl.com/zco9lan
- textarea = http://tinyurl.com/goqdwfn
Ultimately this leaves us working with cleaner template source: http://tinyurl.com/hwon6vg
Also, much maths can be done: http://tinyurl.com/ja3p2py
Code references = http://jade-lang.com/reference/
Jade gulp file configuration = http://jade-lang.com/api/
Gulp Module = https://www.npmjs.com/package/gulp-jade
And discuss...