Skip to content

Commit

Permalink
WIP use flexbox to position the close icon on the sidebar
Browse files Browse the repository at this point in the history
  • Loading branch information
gravitystorm committed Oct 15, 2020
1 parent 9b19a45 commit b3fc5bc
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 20 deletions.
10 changes: 10 additions & 0 deletions app/views/application/_sidebar_header.html.erb
@@ -0,0 +1,10 @@
<div class="d-flex w-100">
<div class="flex-grow-1 text-break">
<h2><%= title %></h2>
</div>
<div class="px-3 py-3">
<a class="geolink" href="<%= root_path %>">
<span class="icon close"></span>
</a>
</div>
</div>
5 changes: 1 addition & 4 deletions app/views/browse/changeset.html.erb
@@ -1,9 +1,6 @@
<% set_title(t(".title", :id => @changeset.id)) %>
<h2>
<a class="geolink" href="<%= root_path %>"><span class="icon close"></span></a>
<%= t(".title", :id => @changeset.id) %>
</h2>
<%= render "sidebar_header", :title => t(".title", :id => @changeset.id) %>

<div class="browse-section">
<p class="font-italic">
Expand Down
5 changes: 1 addition & 4 deletions app/views/browse/history.html.erb
@@ -1,9 +1,6 @@
<% set_title(t("browse.#{@type}.history_title_html", :name => printable_name(@feature))) %>
<h2>
<a class="geolink" href="<%= root_path %>"><span class="icon close"></span></a>
<%= t("browse.#{@type}.history_title_html", :name => printable_name(@feature)) %>
</h2>
<%= render "sidebar_header", :title => t("browse.#{@type}.history_title_html", :name => printable_name(@feature)) %>
<%= render :partial => @type, :collection => @feature.send("old_#{@type}s").reverse %>

Expand Down
5 changes: 1 addition & 4 deletions app/views/browse/not_found.html.erb
@@ -1,4 +1 @@
<h2>
<a class="geolink" href="<%= root_path %>"><span class="icon close"></span></a>
<%= t ".sorry", :type => t(".type.#{@type}"), :id => params[:id] %>
</h2>
<%= render "sidebar_header", :title => t(".sorry", :type => t(".type.#{@type}"), :id => params[:id]) %>
5 changes: 1 addition & 4 deletions app/views/browse/note.html.erb
@@ -1,9 +1,6 @@
<% set_title(t(".title", :id => @note.id)) %>
<h2>
<a class="geolink" href="<%= root_path %>"><span class="icon close"></span></a>
<%= t ".#{@note.status}_title", :note_name => @note.id %>
</h2>
<%= render "sidebar_header", :title => t(".#{@note.status}_title", :note_name => @note.id) %>

<div class="browse-section">
<h4><%= t(".description") %></h4>
Expand Down
5 changes: 1 addition & 4 deletions app/views/changesets/history.html.erb
Expand Up @@ -11,10 +11,7 @@
@title
end %>
<h2>
<a class="geolink" href="<%= root_path %>"><span class="icon close"></span></a>
<%= @heading %>
</h2>
<%= render "sidebar_header", :title => @heading %>

<div class="changesets">
<%= image_tag "searching.gif", :class => "loader" %>
Expand Down

0 comments on commit b3fc5bc

Please sign in to comment.