我有带有 Twitter bootstrap 2.1.0 的简单 RoR 3.2 应用程序(我通过 twitter-bootstrap-rails gem 实现了它)。我想将侧边栏与几个链接集成(正如您在左侧的 twitter 引导页面上看到的那样),但我不知道如何实现这一点(是的,我是菜鸟)。有没有人有解决方案如何在 Rails 中做到这一点?
我的应用程序布局:
!!!
%html
%head
%title MyApp
= stylesheet_link_tag "application", :media => "all"
= javascript_include_tag "application"
= csrf_meta_tags
%meta{ :name => "viewport", :content => "width=device-width, initial-scale=1.0" }
%body
%div{ :class => "wrapper" }
= render 'layouts/navbar_template'
%div{ :class => "container-fluid" }
- flash.each do |key, msg|
%div{ :class => "alert alert-#{key}" }
%button{ :type => "button", :class => "close", "data-dismiss" =>"alert" }×
= msg
%div{ :class => "row-fluid" }
%div{:class => "span10"}
=yield
%div{:class => "span2"}
-# I would like to have sidebar here