views: factor out sidebar layout template.
* Factor out common sidebar layout template. * Convert wiki pages and posts to use this template. * Add data-layout attribute to <body> element indicating the current layout.
This commit is contained in:
15
app/views/layouts/sidebar.html.erb
Normal file
15
app/views/layouts/sidebar.html.erb
Normal file
@@ -0,0 +1,15 @@
|
||||
<% content_for(:layout) do %>
|
||||
<div id="c-<%= params[:controller].parameterize.dasherize %>">
|
||||
<div id="a-<%= params[:action].parameterize.dasherize %>">
|
||||
<aside id="sidebar">
|
||||
<%= yield :sidebar %>
|
||||
</aside>
|
||||
|
||||
<section id="content">
|
||||
<%= yield :content %>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<%= render template: "layouts/default" %>
|
||||
Reference in New Issue
Block a user