Last active
December 11, 2015 12:28
-
-
Save spikebrehm/4600462 to your computer and use it in GitHub Desktop.
Code for blog post: "We've launched our first Node.js app to production!"
This file contains 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
BaseView = require('rendr/base/view') | |
_ = require('underscore') | |
module.exports = class ListingView extends BaseView | |
# Straight outta Backbone.View | |
tagName: 'section' | |
className: 'listing clearfix' | |
events: | |
'click .book_it': 'clickBookIt' | |
clickBookIt: -> | |
... | |
# Custom Rendr methods | |
postRender: -> | |
@createSlideshow() | |
getTemplateData: -> | |
_.extend super, | |
bullets: _.first(@model.get('picture_urls'), 50) | |
createSlideshow: -> | |
... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment