Skip to content

Commit

Permalink
Move continue auth/start mapping button to appear fixed in footer
Browse files Browse the repository at this point in the history
Pin 'Continue Auth/Start Mapping' button to bottom of page for improved user navigation and simplified OAuth process.
  • Loading branch information
kcne committed Dec 17, 2024
1 parent eb0f95b commit 874f59e
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 8 deletions.
7 changes: 7 additions & 0 deletions app/views/layouts/_content.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,12 @@
<%= yield %>
</div>
</div>
<% if content_for? :footer %>
<footer class="content-footer bg-body-secondary border-top border-secondary-subtle <%= yield :footer_outer_class %>">
<div class="content-inner <%= yield :footer_class %>">
<%= yield :footer %>
</div>
</footer>
<% end %>
<% end %>
</div>
19 changes: 11 additions & 8 deletions app/views/site/welcome.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -77,17 +77,20 @@

<%= render "any_questions" %>

<div class='text-center mb-3'>
<% if params[:oauth_return_url] %>
<a class="btn btn-primary" href="<%= params[:oauth_return_url] %>"><%= t ".continue_authorization" %></a>
<% else %>
<a class="btn btn-primary start-mapping" href="<%= edit_path %>"><%= t ".start_mapping" %></a>
<% end %>
</div>

<div class='alert alert-primary'>
<h2><%= t ".add_a_note.title" %></h2>
<p><%= t ".add_a_note.para_1" %></p>
<p><%= t ".add_a_note.para_2_html", :map_link => link_to(t(".add_a_note.the_map"), root_path),
:note_icon => tag.span(:class => "icon note bg-dark rounded-1") %></p>
</div>

<% content_for :footer_outer_class, "sticky-bottom" %>
<% content_for :footer do %>
<div class='d-flex justify-content-center align-items-center'>
<% if params[:oauth_return_url] %>
<a class="btn btn-primary" href="<%= params[:oauth_return_url] %>"><%= t ".continue_authorization" %></a>
<% else %>
<a class="btn btn-primary start-mapping" href="<%= edit_path %>"><%= t ".start_mapping" %></a>
<% end %>
</div>
<% end %>

0 comments on commit 874f59e

Please sign in to comment.