Skip to content

Instantly share code, notes, and snippets.

@trabianmatt
Created March 8, 2012 18:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save trabianmatt/2002564 to your computer and use it in GitHub Desktop.
Save trabianmatt/2002564 to your computer and use it in GitHub Desktop.
styles = require('styles').ui
{ Button, ContentBlock, Window } = require 'views/ui'
module.exports = class IntroView extends Window
render: =>
@layout (view) =>
view.add @make 'Label', styles.labels.h1,
text: 'Welcome to your mobile app'
top: 11
contentBlock = new ContentBlock
text: '''
The Kitchen Sink project was included in this bootstrapped app as an example
of user interface elements and coding style for titanium-backbone. To remove
the kitchen sink, simply remove the titanium-backbone-ks module from package.json
and remove the reference to 'KitchenSinkIntroView' from src/index.coffee
'''
view.add contentBlock.render().view
button = new Button
text: 'Launch Kitchen Sink'
click: @openKitchenSink
style:
top: 11
view.add button.render().view
@
openKitchenSink: ->
console.log 'Open the kitchen sink.'
KitchenSink = require './main'
kitchenSink = new KitchenSink
kitchenSink.render().open()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment