Permalink
Browse files

Split brightcontent layout parts and add a wide layout.

  • Loading branch information...
wvengen committed Dec 19, 2017
1 parent 908c986 commit dd14efa8c23e9bc0ec297ecf695bde0962778059
@@ -159,3 +159,8 @@ page_size_options [10, 25, 50, 100]

This will set the default page size to `10` and inject 4 page size options in
the index views. The `per_page` value (if provided), will be ignored.

Layouts
-------

Besides the regular `application` layout that uses Bootstrap's maximum width, there is a `wide` layout using the full page width. Include `layout "brightcontent/wide"` in the controller to use it.
@@ -0,0 +1,4 @@
<div class="<%= "panel panel-default" unless controller.controller_name == 'sessions' %>">
<%= render "brightcontent/application/show_flash_names" %>
<%= yield %>
</div>
@@ -0,0 +1,31 @@
<% if current_user %>
<div class="navbar navbar-inverse navbar-bc navbar-static-top" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<%= link_to Brightcontent.application_name, root_path, class: "navbar-brand" %>
</div>
<div class="navbar-collapse collapse">
<ul class="nav navbar-nav js-menu">
<%= render "menu" %>
</ul>
<ul class="nav navbar-nav navbar-right">
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
<%= image_tag avatar_url(current_user), class: 'avatar' %>
<%= current_user.email %><b class="caret"></b>
</a>
<ul class="dropdown-menu">
<%= render "brightcontent/application/user_menu" %>
</ul>
</li>
</ul>
</div>
</div>
</div>
<% end %>
@@ -10,43 +10,10 @@
</head>

<body data-editor-locale="<%=t('brightcontent.editor_locale')%>">
<% if current_user %>
<div class="navbar navbar-inverse navbar-bc navbar-static-top" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<%= link_to Brightcontent.application_name, root_path, class: "navbar-brand" %>
</div>
<div class="navbar-collapse collapse">
<ul class="nav navbar-nav js-menu">
<%= render "menu" %>
</ul>
<ul class="nav navbar-nav navbar-right">
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
<%= image_tag avatar_url(current_user), class: 'avatar' %>
<%= current_user.email %><b class="caret"></b>
</a>
<ul class="dropdown-menu">
<%= render "brightcontent/application/user_menu" %>
</ul>
</li>
</ul>
</div>
</div>
</div>
<% end %>
<%= render 'layouts/brightcontent/navbar' %>

<div class="container">
<div class="<%= "panel panel-default" unless controller.controller_name == 'sessions' %>">
<%= render "brightcontent/application/show_flash_names" %>
<%= yield %>
</div>
<%= render 'layouts/brightcontent/content' %>
</div>
</div>

@@ -0,0 +1,23 @@
<!DOCTYPE html>
<html>
<head>
<title><%= Brightcontent.application_name %></title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="robots" content="noindex" />
<%= stylesheet_link_tag "brightcontent/brightcontent", :media => "all" %>
<%= yield :head %>
<%= csrf_meta_tags %>
</head>

<body data-editor-locale="<%=t('brightcontent.editor_locale')%>">
<%= render 'layouts/brightcontent/navbar' %>

<div class="container-wide">
<%= render 'layouts/brightcontent/content' %>
</div>
</div>

<%= javascript_include_tag "brightcontent/brightcontent" %>
<%= yield :bottom %>
</body>
</html>

0 comments on commit dd14efa

Please sign in to comment.