From b924f76d0397c19a1bae0e45dfdd866678b179e1 Mon Sep 17 00:00:00 2001 From: Divya Baid <32747809+divyabaid16@users.noreply.github.com> Date: Fri, 16 Aug 2019 19:43:07 +0530 Subject: [PATCH] UI improvements: version tracking and other in the sidebar (#923) * ui-improvements * Changes made -1 --- app/assets/stylesheets/sidebar.css | 38 +++++++++++++++++++---------- app/views/images/_index.html.erb | 39 +++++++++++++++++++----------- 2 files changed, 50 insertions(+), 27 deletions(-) diff --git a/app/assets/stylesheets/sidebar.css b/app/assets/stylesheets/sidebar.css index f03c1333..fa7b1d56 100644 --- a/app/assets/stylesheets/sidebar.css +++ b/app/assets/stylesheets/sidebar.css @@ -10,38 +10,50 @@ float: right; margin-right: 15px; margin-bottom: 10px; + position: relative; } .sidebar-heading{ display: inline-block; } -.image-order-button { - background-color: #4CAF50; - color: white; - padding: 16px; - font-size: 16px; - border: none; -} -.image-order { - position: relative; +.sort-by-text{ display: inline-block; + color: #5cb85c; +} +.sort-label{ + display: inline-block; + padding: 5px; + border: 1px solid #e1e4e8; + height: 38px; } .image-order-content { display: none; position: absolute; background-color: #f1f1f1; min-width: 160px; - box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2); z-index: 1; } .image-order-content a { color: black; padding: 7px 10px; + border: 1px solid #e1e4e8; text-decoration: none; display: block; -} -.image-order-content a:hover { background-color: white; text-decoration: none; color: black; } -.image-order:hover .image-order-content {display: block;} \ No newline at end of file + +.dropdown ul{ + list-style-type: none; + margin: 0; + padding: 0; +} +.dropdown li{ + border-bottom: 1px solid #e1e4e8 !important; + padding: 5px; +} +.dropdown-menu{ + position: absolute; + max-height: 200px; + overflow-y: scroll; +} \ No newline at end of file diff --git a/app/views/images/_index.html.erb b/app/views/images/_index.html.erb index 6d7766a3..0776bb40 100644 --- a/app/views/images/_index.html.erb +++ b/app/views/images/_index.html.erb @@ -5,7 +5,11 @@
- +

Sort by:

+
+

Recent

+ +
Name Size @@ -23,17 +27,20 @@ <% if sort_param == 'name' %> <% ary = @map.warpables.sort { |a, b| a.image_file_name <=> b.image_file_name } %> <% elsif sort_param == 'size' %> <% ary = @map.warpables.sort { |a, b| a.image_file_size <=> b.image_file_size } %> <% else %> <% ary = @map.warpables.sort { |a, b| b.created_at <=> a.created_at } %> <% end %> <% ary.each do |warpable| %> @@ -47,9 +54,6 @@ :'id' => "warpable-img-#{warpable.id}" %>
- - - @@ -79,8 +83,11 @@ %> <% end %> <% if warpable.placed? %> - - + + + + +