app/views/layouts/lookbook/embed.html.erb in lookbook-2.3.0 vs app/views/layouts/lookbook/embed.html.erb in lookbook-2.3.2
- old
+ new
@@ -1,22 +1,34 @@
<% content_for :body do %>
- <div
- id="app"
- x-data="app"
- x-cloak
- x-on:popstate.window="handleNavigation"
- x-on:click.document="hijax"
- class="overflow-hidden">
-
- <%= render "lookbook/partials/user_styles" %>
+ <% if request_frame == "root" %>
+ <div
+ id="app"
+ x-data="app"
+ x-cloak
+ x-on:popstate.window="handleNavigation"
+ x-on:click.document="hijax"
+ class="overflow-hidden">
+
+ <%= render "lookbook/partials/user_styles" %>
- <%= content_for?(:main) ? yield(:main) : yield %>
- </div>
-
- <% if content_for? :dropdowns %>
- <div class="hidden">
- <%= content_for :dropdowns -%>
+ <div id="app-main" class="contents">
+ <%= content_for?(:main) ? yield(:main) : yield %>
+ </div>
</div>
- <% end %>
+
+ <% if content_for? :dropdowns %>
+ <div class="hidden">
+ <%= content_for :dropdowns -%>
+ </div>
+ <% end %>
+ <% elsif request_frame == "main" %>
+ <div id="app-main">
+ <%= content_for?(:main) ? yield(:main) : yield %>
+ </div>
+ <% end %>
<% end %>
-<%= render template: "layouts/lookbook/skeleton" %>
+<% if frame_request? %>
+ <%= yield :body %>
+<% else %>
+ <%= render template: "layouts/lookbook/skeleton" %>
+<% end %>
\ No newline at end of file