refineryのサイトタイトルとメニューを変更

refineryのデフォルトのサイトタイトルとメニューを変更する方法です。 別の記事でBootstrap3を使ってサイト全体のレイアウトを設定しましたがそれに追加する形で変更しています。
下記記事参照
Bootstrap3のoffcanvasを使ってrefineryのレイアウト

1)デフォルトのサイトタイトルとメニューの設定
 
デフォルトは、_header.html.erbに下記のように記述されています。
 
<h1><%= link_to Refinery::Core.site_name, refinery.root_path %></h1> <%= Refinery::Pages::MenuPresenter.new(refinery_menu_pages, self).to_html %>
 
2)サイトタイトルの修正
 
Bootstrap3のjunbotronを使ってサイトタイトルを設定します。
 
$ vi app/views/refinery/_headr.html.erb

<div class="jumbotron">
  <h1><%= link_to Refinery::Core.site_name, refinery.root_path %></h1>
</div>

 
3)メニューの表示場所を変更
 
ヘッダー部にあるメニューを右サイドバーに移動してみます。
 
$ vi app/views/refinery/_sidebar.html.erb

:
<a href="#" class="list-group-item">Link</a>
<h3><span class="label label-default">メニュー</span></h3>
<%= Refinery::Pages::MenuPresenter.new(refinery_menu_pages, self).to_html %>

コメントを残す

メールアドレスが公開されることはありません。 が付いている欄は必須項目です