From b43aaa1d5868d40a1ad4b1caa0985eddf1c81bb8 Mon Sep 17 00:00:00 2001 From: Andy Allan Date: Wed, 17 Nov 2021 11:49:52 +0000 Subject: [PATCH 01/10] Remove the floating from the sidebar close buttons These are mostly positioned with flexbox, and those that aren't are covered by the similar close-wrap selector elsewhere in this file --- app/assets/stylesheets/common.scss | 5 ----- 1 file changed, 5 deletions(-) diff --git a/app/assets/stylesheets/common.scss b/app/assets/stylesheets/common.scss index f2afdcf7a..017d8a0d8 100644 --- a/app/assets/stylesheets/common.scss +++ b/app/assets/stylesheets/common.scss @@ -389,11 +389,6 @@ body.compact-nav { } } - .icon.close { - float: right; - cursor: pointer; - } - .flash { padding: 15px; From 846bacd665bd7220ab1f02d1951790077466f6e5 Mon Sep 17 00:00:00 2001 From: Andy Allan Date: Wed, 17 Nov 2021 11:51:41 +0000 Subject: [PATCH 02/10] Remove the custom flash styling for sidebar flashes The flash partial is now based on flexbox, so these positioning classes are no longer required --- app/assets/stylesheets/common.scss | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/app/assets/stylesheets/common.scss b/app/assets/stylesheets/common.scss index 017d8a0d8..3cb69cf0b 100644 --- a/app/assets/stylesheets/common.scss +++ b/app/assets/stylesheets/common.scss @@ -388,18 +388,6 @@ body.compact-nav { top: 20px; } } - - .flash { - padding: 15px; - - picture { - margin-right: -25px; - } - - div.message { - margin-left: 30px; - } - } } .overlay-sidebar #sidebar { From 300cd884ec5a8bd76be912f7d745e0ced7761175 Mon Sep 17 00:00:00 2001 From: Andy Allan Date: Wed, 17 Nov 2021 15:52:59 +0000 Subject: [PATCH 03/10] Use flex grid instead of floating to position changeset element paging nav This works much better when either the heading or the paging is long. The heading was moved into the partial to avoid repetitive grid definitions --- app/assets/stylesheets/common.scss | 2 -- app/views/browse/_paging_nav.html.erb | 19 ++++++++++++++----- app/views/browse/changeset.html.erb | 15 +++------------ 3 files changed, 17 insertions(+), 19 deletions(-) diff --git a/app/assets/stylesheets/common.scss b/app/assets/stylesheets/common.scss index 3cb69cf0b..58642dd55 100644 --- a/app/assets/stylesheets/common.scss +++ b/app/assets/stylesheets/common.scss @@ -803,8 +803,6 @@ tr.turn:hover { } .paginate { - float: right; - padding: 1px 6px; border: 1px solid $lightgrey; border-radius: 3px; } diff --git a/app/views/browse/_paging_nav.html.erb b/app/views/browse/_paging_nav.html.erb index 67f1c75a3..713a1d6d4 100644 --- a/app/views/browse/_paging_nav.html.erb +++ b/app/views/browse/_paging_nav.html.erb @@ -1,5 +1,14 @@ -<% if pages.page_count > 1 %> - - <%= raw pagination_links_each(pages, {}) { |n| link_to(n, page_param => n) } %> - -<% end %> +
+
+

<%= heading %>

+
+ <% if pages.page_count > 1 %> +
+

+ + <%= raw pagination_links_each(pages, {}) { |n| link_to(n, page_param => n) } %> + +

+
+ <% end %> +
diff --git a/app/views/browse/changeset.html.erb b/app/views/browse/changeset.html.erb index 496589a08..523cb84d6 100644 --- a/app/views/browse/changeset.html.erb +++ b/app/views/browse/changeset.html.erb @@ -86,10 +86,7 @@ <% end %> <% unless @ways.empty? %> -

- <%= type_and_paginated_count("way", @way_pages) %> - <%= render :partial => "paging_nav", :locals => { :pages => @way_pages, :page_param => "way_page" } %> -

+ <%= render :partial => "paging_nav", :locals => { :heading => type_and_paginated_count("way", @way_pages), :pages => @way_pages, :page_param => "way_page" } %>