diff --git a/app/views/layouts/lookbook/application.html.erb b/app/views/layouts/lookbook/application.html.erb index 362b2a02d..9dff63dbb 100644 --- a/app/views/layouts/lookbook/application.html.erb +++ b/app/views/layouts/lookbook/application.html.erb @@ -1,19 +1,19 @@ <% content_for :shell do %> <% if @previews.any? || @pages.any? %> - <% cache do %> - <%= lookbook_render :split_layout, - alpine_data: "$store.layout.main", - ":class": "$store.layout.mobile && '!block'" do |layout| %> - - <% layout.pane id: "app-sidebar", class: "flex flex-col bg-lookbook-sidebar-bg relative translate-x-0", - ":class": "{ - 'transition': $store.layout.mobile, - 'translate-x-full': $store.layout.mobile && sidebarHidden, - '!absolute right-0 bottom-0 top-[40px] h-[calc(100%_-_40px)] w-full max-w-[420px] z-50 border-l border-lookbook-divider': $store.layout.mobile - }", - "@click.outside": "closeMobileSidebar", - cloak: true do %> + + <%= lookbook_render :split_layout, + alpine_data: "$store.layout.main", + ":class": "$store.layout.mobile && '!block'" do |layout| %> + <% layout.pane id: "app-sidebar", class: "flex flex-col bg-lookbook-sidebar-bg relative translate-x-0", + ":class": "{ + 'transition': $store.layout.mobile, + 'translate-x-full': $store.layout.mobile && sidebarHidden, + '!absolute right-0 bottom-0 top-[40px] h-[calc(100%_-_40px)] w-full max-w-[420px] z-50 border-l border-lookbook-divider': $store.layout.mobile + }", + "@click.outside": "closeMobileSidebar", + cloak: true do %> + <% cache do %> <%= lookbook_render :split_layout, alpine_data: "$store.layout.#{@pages.any? && @previews.any? ? "sidebar" : "singleSectionSidebar"}", style: "height: calc(100vh - 2.5rem);" do |layout| %> @@ -64,12 +64,13 @@ <% end %> <% end %> <% end %> + <% end %> - <% layout.pane id: "app-main", class: "overflow-hidden h-full", ":class": "$store.layout.mobile && 'w-screen'" do %> - <%= content_for?(:main) ? yield(:main) : yield %> - <% end %> + <% layout.pane id: "app-main", class: "overflow-hidden h-full", ":class": "$store.layout.mobile && 'w-screen'" do %> + <%= content_for?(:main) ? yield(:main) : yield %> <% end %> <% end %> + <% else %>