Created
January 18, 2013 14:42
-
-
Save anonymous/4564993 to your computer and use it in GitHub Desktop.
Kodepad Gist Share by fkadev on http://koding.com
Author: http://fkadev.koding.com
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
# Your awesome Koding App Code | |
{nickname} = KD.whoami().profile | |
class MainView extends JView | |
constructor:-> | |
super | |
@header = new KDHeaderView | |
type: "big" | |
title: "Welcome to Kodepad!" | |
@name = new KDInputView | |
placeholder: "Your name" | |
@button = new KDButtonView | |
title: "Say hello!" | |
callback: => | |
name = @name.getValue() or nickname | |
@_notify?.destroy() | |
@_notify = new KDNotificationView | |
title: "Hello, #{name}!" | |
pistachio:-> | |
""" | |
{{> @header}} | |
Just change something from the left pane. | |
<br><br> | |
<strong>And try some interactions!:</strong> | |
{{> @name}} | |
{{> @button}} | |
""" | |
viewAppended: -> | |
@setTemplate do @pistachio | |
appView.addSubView new MainView | |
cssClass: "my-koding-app" |
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
/* Your awesome Koding App CSS Code */ | |
.my-koding-app { | |
margin: 10px; | |
padding: 0 10px 10px; | |
width: auto; | |
height: auto; | |
background-color: rgba(255,255,255,0.9); | |
border-radius: 3px; | |
} | |
.my-koding-app input { | |
margin: 20px 0; | |
background-color: #ccc !important; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment