Merge branch 'better-haml'
Before adoption: this commit came in with the history the project adopted, so no landing records it.
authored by visionmedia · committed by visionmedia · parents 9284482, 1e5c5bf · Browse files · 17 files·+30 added−130 removed
This commit
State
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Diff stats
17 files+30 added−130 removed
- tests:+15 added−14 removed
- other:+15 added−116 removed
Provenance
- Commit
bdf9f88- Tree
1498377- Author
visionmedia <tj@vision-media.ca>- Committer
visionmedia <tj@vision-media.ca>- Parent 1
9284482- Parent 2
1e5c5bf
17 files changed+30 added−130 removed
modified:examples/chat/views/chat.html.haml+1 added-1 removed
1 %h1 Chat2 %img.bubble{ src: '/public/images/bubble.png' }3 %ul#messages4- = this.partial('message.haml.html', { collection: messages })4+ != this.partial('message.html.haml', { collection: messages })5 %form{ method: 'post' }6 %input{ type: 'hidden', name: '_method', value: 'put' }7 %input{ type: 'text', name: 'name', value: name || 'guest' }8 %input{ type: 'text', name: 'message' }1 unmodified linemodified:examples/chat/views/layout.html.haml+3 added-2 removed
3 unmodified lines4 %script{ src: '/public/javascripts/jquery.js' }5 %script{ src: '/public/javascripts/app.js' }6 %link{ rel: 'stylesheet', href: '/style.css' }7 %body8- #wrapper= body9- #online 8+ #wrapper9+ != body10+ #online11 Online:12 %strong= usersOnlinedeleted:examples/coffee-upload/views/layout.html.haml-14 removed
1-%html2- %head3- %title Upload4- %script{ src: '/public/javascripts/jquery.js' }5- %script{ src: '/public/javascripts/app.js' }6- %link{ rel: 'stylesheet', href: '/style.css' }7- %body8- #wrapper9- %h1 Upload10- :if flashes11- %ul.messages.info12- :each msg in flashes13- %li= msg14- .body= bodydeleted:examples/coffee-upload/views/style.css.sass-68 removed
1-body2- :font-family "Helvetica Neue", "Lucida Grande", "Arial"3- :font-size 13px4- :text-align center5- :-webkit-text-stroke 1px rgba(255, 255, 255, 0.1)6- :color #5557- 8-h1, h29- :margin 0 0 15px 010- :font-size 22px11- :color #34343412-h113- :text-shadow 1px 2px 2px #ddd14- :font-size 60px15-h216- :margin-top 15px17- 18-#wrapper19- :position relative20- :margin 100px auto21- :width 500px22- :text-align left23-24-input[type=file]25- :padding 5px26- :border 1px solid #ddd27- :outline none28- :-webkit-border-radius 2px29- :-moz-border-radius 2px30-input[type=file]:focus31- :border-color #00C3FF32-33-input[type=submit]34- :-webkit-border-radius 2px35- :-moz-border-radius 2px36- :-webkit-box-shadow 0 1px 2px #ddd37- :-moz-box-shadow 0 1px 2px #ddd38- :padding 6px 10px39- :border solid 1px #99940- :background -webkit-gradient(linear, 0% 0%, 0% 100%, from(#fff), to(#ddd))41- :color #33342- :text-decoration none43- :cursor pointer44- :display inline-block45- :text-align center46- :text-shadow 0px 1px 1px #fff47- :line-height 148-input[type=submit]:hover49- :background -webkit-gradient(linear, 0% 0%, 0% 100%, from(#fff), to(#E6E4E4))50-input[type=submit]:active51- :background -webkit-gradient(linear, 0% 0%, 0% 100%, from(#fff), to(#c7c7c7))52-input[name=name]53- :width 80px54- 55-form56- .panel57- :float left58- :width 100%59- :margin-bottom 15px60- 61-.messages62- :margin 063- :padding 064- :border 1px solid #eee65- =box-shadow 2px 2px 5px #eee66- li67- :padding 5px 10px68- :list-style nonedeleted:examples/coffee-upload/views/upload.html.haml-18 removed
1-:if typeof images !== 'undefined'2- .images3- :each img in images4- %img{ src: img }5-6-%h2 Singles7-%form{ method: 'post', enctype: 'multipart/form-data' }8- %input{ type: 'file', name: 'images[0]' }9- %input{ type: 'file', name: 'images[1]' }10- %input{ type: 'file', name: 'images[2]' }11- .panel12- %input{ type: 'submit', value: 'Upload' }13- 14-%h2 Multiple15-%form{ method: 'post', enctype: 'multipart/form-data' }16- %input{ type: 'file', name: 'images[]', multiple: 'multiple' }17- .panel18- %input{ type: 'submit', value: 'Upload' }modified:examples/coffee-upload/app.coffee+1 added
10 unmodified lines11 use Flash12 use Logger13 use Static14 set 'root', __dirname15+ set 'views', __dirname + '/../upload/views'16 17 get '/', ->18 @redirect('/upload')19 17 unmodified linesmodified:examples/upload/views/layout.html.haml+3 added-3 removed
5 unmodified lines6 %link{ rel: 'stylesheet', href: '/style.css' }7 %body8 #wrapper9 %h1 Upload10- :if flashes10+ - if (flashes)11 %ul.messages.info12- :each msg in flashes12+ - each msg in flashes13 %li= msg14- .body= body14+ .body!= bodymodified:examples/upload/views/upload.html.haml+4 added-4 removed
1-:if typeof images !== 'undefined'1+- if (typeof images !== 'undefined')2 .images3- :each img in images3+ - each img in images4 %img{ src: img }5 6 %h2 Singles7 %form{ method: 'post', enctype: 'multipart/form-data' }8 %input{ type: 'file', name: 'images[0]' }9 %input{ type: 'file', name: 'images[1]' }10 %input{ type: 'file', name: 'images[2]' }11- .panel11+ %div.panel12 %input{ type: 'submit', value: 'Upload' }13 14 %h2 Multiple15 %form{ method: 'post', enctype: 'multipart/form-data' }16 %input{ type: 'file', name: 'images[]', multiple: 'multiple' }17- .panel17+ %div.panel18 %input{ type: 'submit', value: 'Upload' }modified:lib/support/hamlnot shown
Its text is not shown, modified.
modified:spec/fixtures/partials/article.html.haml+7 added-6 removed
1-:if __isFirst__2- %li.first= article3-:if __isLast__4- %li.last= article5-:if !__isLast__ && !__isFirst__6- %li{ class: __index__ }= article1+%ul2+ - if (__isFirst__)3+ %li.first= article4+ - if (__isLast__)5+ %li.last= article6+ - if (!__isLast__ && !__isFirst__)7+ %li{ class: __index__ }= articlemodified:spec/fixtures/article.html.haml+1 added-1 removed
1-%h2= this.name1+%h2!= this.namemodified:spec/fixtures/layout.html.haml+1 added-1 removed
1 %html2- %body= body2+ %body!= bodymodified:spec/fixtures/layout.user.html.haml+1 added-1 removed
1 %title= "Viewing " + name2-%body= body2+%body!= bodymodified:spec/fixtures/list.html.haml+2 added-2 removed
1 %ul2- :each item in items3- = this.partial('item.html.haml', { locals: { item: item }})2+ - each item in items3+ != this.partial('item.html.haml', { locals: { item: item }})modified:spec/fixtures/page.html.haml+1 added-1 removed
1 %title= this.title2-%body= body2+%body!= bodymodified:spec/spec.plugins.view.js+2 added-2 removed
82 unmodified lines83 if (err) this.error(err)84 else this.halt(203, content)85 })86 })87- get('/').body.should.include '<html><body>'87+ get('/').body.should.include '<html>\n<body>'88 get('/').status.should.eql 20389 end90 end91 2 unmodified lines94 it 'should render the layout and view'95 get('/', function(){96 this.render('hello.html.haml')97 })98- get('/').body.should.include '<html><body>'98+ get('/').body.should.include '<html>\n<body>'99 get('/').body.should.include '<h2>Hello'100 end101 102 it 'should default context to the current request'102 unmodified linesmodified:.gitmodules+3 added-6 removed
1-[submodule "lib/support/oo"]2- path = lib/support/oo3- url = git://github.com/visionmedia/js-oo.git1 [submodule "lib/support/ext"]2 path = lib/support/ext3 url = git://github.com/visionmedia/ext.js.git4 [submodule "lib/support/sass"]5 path = lib/support/sass6 url = git://github.com/visionmedia/sass.js.git10-[submodule "lib/support/haml"]11- path = lib/support/haml12- url = git://github.com/creationix/haml-js.git7 [submodule "lib/support/class"]8 path = lib/support/class9 url = git://github.com/visionmedia/class.js.git10+[submodule "lib/support/haml"]11+ path = lib/support/haml12+ url = git://github.com/visionmedia/haml.js.git