Created
April 24, 2015 09:00
-
-
Save pavelpower/51517ecf1434bd9251eb to your computer and use it in GitHub Desktop.
sample jst in bemhtml
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
(function () { | |
return { | |
block: 'b-weather-grid', | |
tag: null, | |
content: [ | |
{ | |
block: 'jst', | |
before: 'obj.forEach(function(item) {', | |
content: [ | |
{ | |
elem: 'cell', | |
content: [ | |
{ | |
block: 'b-weather-item', | |
mods: {weather: 'sun'}, | |
content: [ | |
{ | |
elem: 'title', | |
content: '${item.name}' | |
}, | |
{ | |
elem: 'image' | |
}, | |
{ | |
elem: 'value', | |
content: '${item.temp}' | |
}, | |
{ | |
elem: 'description', | |
content: '${item.description}' | |
}, | |
{ | |
elem: 'border' | |
} | |
] | |
} | |
] | |
} | |
], | |
after: '})' | |
} | |
] | |
} | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment