diff options
Diffstat (limited to 'views')
-rw-r--r-- | views/index.haml | 16 | ||||
-rw-r--r-- | views/index.slim | 15 | ||||
-rw-r--r-- | views/layout.haml | 9 | ||||
-rw-r--r-- | views/layout.slim | 8 |
4 files changed, 23 insertions, 25 deletions
diff --git a/views/index.haml b/views/index.haml deleted file mode 100644 index b9d78e7..0000000 --- a/views/index.haml +++ /dev/null @@ -1,16 +0,0 @@ -%h1 Sinatra File Upload - -- if @flash - = @flash - -%form{:action => '/upload', :method => 'post', :enctype => 'multipart/form-data'} - %p< - %input{:type => 'file', :name => 'file'} - %p< - %input{:type => 'submit', :value => 'Upload'} - -%h3 Files -%ul - - @files.each do |file| - %li= "<a href='files/#{file}'>#{file}</a>" - diff --git a/views/index.slim b/views/index.slim new file mode 100644 index 0000000..270f91f --- /dev/null +++ b/views/index.slim @@ -0,0 +1,15 @@ +h1 Sinatra File Upload + +- if @flash + = @flash + +form action='/upload' method='post' enctype='multipart/form-data' + p + input type='file' name='file' + p + input type='submit' value='Upload' +h3 Files +ul + - @files.each do |file| + li + a href='files/#{file}' #{file} diff --git a/views/layout.haml b/views/layout.haml deleted file mode 100644 index d8eb52c..0000000 --- a/views/layout.haml +++ /dev/null @@ -1,9 +0,0 @@ -!!! -%html{:xmlns => 'http://www.w3.org/1999/xhtml'} - %head - %title Sinatra File Upload - %link{:rel => 'stylesheet', :type => 'text/css', :href => 'css/style.css'} - %meta{:content => 'text/html; charset=utf-8', :'http-equiv' => 'Content-Type'} - %body - = yield - diff --git a/views/layout.slim b/views/layout.slim new file mode 100644 index 0000000..0d4d1f1 --- /dev/null +++ b/views/layout.slim @@ -0,0 +1,8 @@ +doctype +html xmlns='http://www.w3.org/1999/xhtml' + head + title Sinatra File Upload + link rel='stylesheet' type='text/css' href='css/style.css' + meta content='text/html; charset=utf-8' http-equiv='Content-Type' + body + == yield |