add manual submit button to serendipitous questions also

This commit is contained in:
Andrew Brown 2025-06-03 00:55:27 -07:00
parent 65222704ea
commit 7878ca98ee
2 changed files with 18 additions and 15 deletions

View File

@ -86,17 +86,26 @@
</div>
</div>
<div class="mt-6 flex justify-center">
<%= button_tag type: 'submit', class: "group relative inline-flex items-center px-8 py-3 overflow-hidden text-lg font-medium text-white bg-gradient-to-r from-blue-600 to-blue-700 rounded-xl hover:from-blue-700 hover:to-blue-800 focus:ring-4 focus:ring-blue-300 focus:outline-none transition-all duration-300 ease-in-out transform hover:scale-105 hover:shadow-lg" do %>
<span class="absolute inset-0 w-full h-full bg-white opacity-10 rounded-xl transform scale-x-0 group-hover:scale-x-100 transition-transform duration-300 ease-out origin-left"></span>
<span class="relative flex items-center">
<svg class="w-5 h-5 mr-2 transition-transform duration-200 group-hover:translate-x-1" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"></path>
<!-- Clickable footer submit area -->
<button type="submit" class="w-full mt-3 px-4 py-3 bg-gray-50 hover:bg-blue-50 border-t border-gray-200 rounded-b-lg transition-all duration-200 group cursor-pointer focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-inset">
<div class="flex items-center justify-between text-sm text-gray-600 group-hover:text-blue-700 mb-1">
<span class="flex items-center">
<svg class="w-4 h-4 mr-2 opacity-60 group-hover:opacity-100 transition-opacity duration-200" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 13l4 4L19 7"></path>
</svg>
Submit & Continue
Submit & get next question
</span>
<% end %>
</div>
<svg class="w-4 h-4 opacity-40 group-hover:opacity-70 group-hover:translate-x-0.5 transition-all duration-200" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 5l7 7-7 7"></path>
</svg>
</div>
<div class="flex items-center text-xs text-gray-500 group-hover:text-gray-600">
<i class="material-icons text-xs mr-1"><%= content.icon %></i>
Your answer will be automatically saved to your
<span class="<%= content.text_color %> mx-1 underline"><%= content.name %></span>
<%= content.page_type.downcase %> page.
</div>
</button>
<% end %>
</div>

View File

@ -15,12 +15,6 @@
}
end
%>
<p class="text-xs text-gray-500 text-center">
<i class="material-icons text-xs mr-1"><%= @content.icon %></i>
Your answer will be automatically saved to your
<%= link_to @content.name, @content.view_path, class: "#{@content.text_color}", target: '_blank' %>
<%= @content.page_type.downcase %> page.
</p>
</div>
</div>
</div>