Skip to content

Commit

Permalink
Allow nested layout
Browse files Browse the repository at this point in the history
  • Loading branch information
huacnlee committed Feb 27, 2017
1 parent aa1c1c4 commit 47cb9b2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/views/layouts/application.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
<link rel="alternate" type="application/rss+xml" title="订阅最新帖" href="<%= main_app.feed_topics_url %>" />
<%= stylesheet_link_tag "front", 'data-turbolinks-track': "reload" %>
<%= stylesheet_link_tag "turbolinks-app", 'data-turbolinks-track': 'reload' if turbolinks_app? %>
<%= yield :stylesheets %>
<%= action_cable_meta_tag %>
<%= csrf_meta_tag %>
<%= raw Setting.custom_head_html %>
Expand All @@ -31,6 +32,7 @@
<% end %>

<%= javascript_include_tag "app", 'data-turbolinks-track': "reload" %>
<%= yield :javascripts %>
</head>
<body class="page-<%= controller_name %><%= ' infinite-scroll' if turbolinks_app? %>" data-controller-name="<%= controller_name %>">
<div class="header">
Expand All @@ -51,7 +53,7 @@
<div id="main" class="main-container container">
<%= birthday_tag %>
<%= notice_message %>
<%= yield %>
<%= content_for?(:main) ? yield(:main) : yield %>
</div>

<% if not mobile? %>
Expand Down

0 comments on commit 47cb9b2

Please sign in to comment.