mirror of
https://github.com/maybe-finance/maybe.git
synced 2025-08-10 07:55:21 +02:00
Add breadcrumbs support across application (#1897)
* Add breadcrumbs support across application Fixes #1896 * Potential fix for tests * Simplify breadcrumbs implementation Remove complex breadcrumbs logic from controllers and concern, replacing with a simpler default approach that sets a basic breadcrumb based on the current controller name * Refactor page header and breadcrumbs rendering Remove complex breadcrumbs helper method and update layout to use more flexible content_for approach for page headers and breadcrumbs * Add fallback breadcrumbs rendering to settings layout
This commit is contained in:
parent
763e222cdd
commit
a4874815a6
11 changed files with 75 additions and 21 deletions
|
@ -7,6 +7,12 @@
|
|||
<main class="py-4 px-10 grow flex h-full overflow-y-auto">
|
||||
<div class="relative max-w-4xl mx-auto flex flex-col w-full h-full">
|
||||
<div class="grow space-y-4 overflow-y-auto -mx-1 px-1 pb-12">
|
||||
<% if content_for?(:breadcrumbs) %>
|
||||
<%= yield :breadcrumbs %>
|
||||
<% else %>
|
||||
<%= render "layouts/shared/breadcrumbs", breadcrumbs: @breadcrumbs %>
|
||||
<% end %>
|
||||
|
||||
<% if content_for?(:page_title) %>
|
||||
<h1 class="text-primary text-xl font-medium">
|
||||
<%= content_for :page_title %>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue