Permalink
Browse files

Started upload example app

  • Loading branch information...
tj committed Jan 18, 2010
1 parent f1614a5 commit 817ff41b0d7e6e630ce33a31e09e2a13dd881326
View
@@ -18,6 +18,9 @@ app: app-chat
app-chat:
@$(NODE) examples/chat/app.js
+app-upload:
+ @$(NODE) examples/upload/app.js
+
benchmark:
@$(NODE) benchmarks/collection.js
@$(NODE) benchmarks/views.js
View
@@ -0,0 +1,31 @@
+
+require.paths.unshift('lib')
+require('express')
+require('express/plugins')
+
+configure(function(){
+ use(MethodOverride)
+ use(ContentLength)
+ use(CommonLogger)
+ set('root', dirname(__filename))
+ enable('cache view contents')
+})
+
+get('/', function(){
+ this.redirect('/upload')
+})
+
+get('/upload', function(){
+ this.render('upload.haml.html')
+})
+
+get('/public/*', function(file){
+ this.sendfile(dirname(__filename) + '/public/' + file)
+})
+
+get('/*.css', function(file){
+ this.render(file + '.sass.css', { layout: false })
+})
+
+
+run()
No changes.

Large diffs are not rendered by default.

Oops, something went wrong.
@@ -0,0 +1,8 @@
+%html
+ %head
+ %title Upload
+ %script{ src: '/public/javascripts/jquery.js' }
+ %script{ src: '/public/javascripts/app.js' }
+ %link{ rel: 'stylesheet', href: '/style.css' }
+ %body
+ #wrapper= body
@@ -0,0 +1,60 @@
+body
+ :font-family "Helvetica Neue", "Lucida Grande", "Arial"
+ :font-size 13px
+ :text-align center
+ :-webkit-text-stroke 1px rgba(255, 255, 255, 0.1)
+ :color #555
+
+h1, h2
+ :margin 0
+ :font-size 22px
+ :color #343434
+h1
+ :text-shadow 1px 2px 2px #ddd
+ :font-size 60px
+
+#wrapper
+ :position relative
+ :margin 100px auto
+ :width 500px
+ :text-align left
+
+input[type=file]
+ :padding 5px
+ :border 1px solid #ddd
+ :outline none
+ :-webkit-border-radius 2px
+ :-moz-border-radius 2px
+input[type=file]:focus
+ :border-color #00C3FF
+
+input[type=submit]
+ :-webkit-border-radius 2px
+ :-moz-border-radius 2px
+ :-webkit-box-shadow 0 1px 2px #ddd
+ :-moz-box-shadow 0 1px 2px #ddd
+ :padding 6px 10px
+ :border solid 1px #999
+ :background -webkit-gradient(linear, 0% 0%, 0% 100%, from(#fff), to(#ddd))
+ :color #333
+ :text-decoration none
+ :cursor pointer
+ :display inline-block
+ :text-align center
+ :text-shadow 0px 1px 1px #fff
+ :line-height 1
+input[type=submit]:hover
+ :background -webkit-gradient(linear, 0% 0%, 0% 100%, from(#fff), to(#E6E4E4))
+input[type=submit]:active
+ :background -webkit-gradient(linear, 0% 0%, 0% 100%, from(#fff), to(#c7c7c7))
+input[name=name]
+ :width 80px
+
+a
+ :color #1ABFF1
+ :-webkit-transition-property padding
+ :-webkit-transition-duration 0.15s
+a:hover
+ :padding 0 5px
+a:hover:before
+ :content 'visit: '
@@ -0,0 +1,4 @@
+%h1 Upload
+%form{ method: 'post' }
+ %input{ type: 'file', name: 'image' }
+ %input{ type: 'submit', value: 'Upload' }

0 comments on commit 817ff41

Please sign in to comment.