Skip to content

Instantly share code, notes, and snippets.

@spikebrehm
Last active December 11, 2015 12:28
Show Gist options
  • Save spikebrehm/4600462 to your computer and use it in GitHub Desktop.
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!"
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