From a3b7e33af1daf94ec711fbf49818e06265147b0b Mon Sep 17 00:00:00 2001 From: Victoria Wang Date: Wed, 16 Apr 2014 18:31:34 -0700 Subject: [PATCH] Changes to dashboard incl some initial styling/cleaning up of the file listing --- .../css/_project-sass/_project-Main.scss | 7 ++++ views/dashboard.erb | 37 +++++++++---------- 2 files changed, 25 insertions(+), 19 deletions(-) diff --git a/public/assets/css/_project-sass/_project-Main.scss b/public/assets/css/_project-sass/_project-Main.scss index d2897211..b0802894 100644 --- a/public/assets/css/_project-sass/_project-Main.scss +++ b/public/assets/css/_project-sass/_project-Main.scss @@ -116,6 +116,13 @@ background: url(../img/drag-drop.png) no-repeat center center; min-height: 200px; } +.file { + float: left; + width: 105px; + height: 105px; + margin-right: 20px; + margin-bottom: 30px; +} .site-actions { float: left; margin-top: 20px; diff --git a/views/dashboard.erb b/views/dashboard.erb index 39f4ef0e..31d7d759 100644 --- a/views/dashboard.erb +++ b/views/dashboard.erb @@ -16,7 +16,7 @@
@@ -58,26 +58,25 @@
<% current_site.file_list.each do |file| %> - - <% if file.ext.match(/jpg|png|bmp|gif/) %> - <%= file.filename %> - <% else %> - <%= file.filename %> - <% end %> - +
+ <% if file.ext.match(/html|htm/) %> +
+ <% elsif file.ext.match(/jpg|png|bmp|gif/) %> + + <% end %> + + + <%= file.filename %> - <% if file.ext.match(/html|htm|txt|js|css|md/) %> - - <% else %> - - <% end %> + <% if file.ext.match(/txt|js|css|md/) %> + + <% end %> - - <% if file.filename != 'index.html' %> - - <% else %> - - <% end %> + + <% if file.filename != 'index.html' %> + + <% end %> +
<% end %>