Created
May 29, 2012 18:11
-
-
Save inossidabile/2829817 to your computer and use it in GitHub Desktop.
Joosy / Helpers
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
!= @formFor resource, {class: 'foo'}, (f) -> | |
!= f.label 'field', {class: 'foo'}, 'inner text' | |
!= f.radioButton 'field', 'value', {class: 'foo'} | |
!= f.textArea 'field', {class: 'foo'} | |
!= f.checkBox 'field', {class: 'foo'} | |
!= f.textField 'field', {class: 'foo'} | |
!= f.fileField 'field', {class: 'foo'} | |
!= f.hiddenField 'field', {class: 'foo'} | |
!= f.passwordField 'field', {class: 'foo'} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Joosy.helpers 'Application', -> | |
@piratish = (text) -> text + " yarrr!" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@helpers 'Pirates' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
!= @nl2br "foo\nbar" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-# templates/widgets/_title.jst.hamlc | |
%h1 | |
%i.icon-book | |
= @piratish(@title) | |
%sup.badge.badge-success | |
24.05.2012 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# helpers/pirates.js.coffee | |
Joosy.helpers 'Pirates', -> | |
@piratish = (text) -> text + " yarrr!" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
!= @tag 'div', {id: 'foo'}, 'content' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
= @renderWrapped '_partial', -> | |
%span Inner | |
-# _partial.jst.hamlc | |
#content | |
!= @render 'layouts/_menu' | |
!= @yield |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment