Created
October 27, 2012 23:46
-
-
Save tagliala/3966892 to your computer and use it in GitHub Desktop.
[W.I.P] Facebook-like sidebar for twitter bootstrap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title><%= content_for?(:title) ? yield(:title) : "BootstrapSidebar" %></title> | |
<%= csrf_meta_tags %> | |
<!-- Le HTML5 shim, for IE6-8 support of HTML elements --> | |
<!--[if lt IE 9]> | |
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js" type="text/javascript"></script> | |
<![endif]--> | |
<%= stylesheet_link_tag "application", :media => "all" %> | |
<!-- For third-generation iPad with high-resolution Retina display: --> | |
<!-- Size should be 144 x 144 pixels --> | |
<%= favicon_link_tag 'images/apple-touch-icon-144x144-precomposed.png', :rel => 'apple-touch-icon-precomposed', :type => 'image/png', :sizes => '144x144' %> | |
<!-- For iPhone with high-resolution Retina display: --> | |
<!-- Size should be 114 x 114 pixels --> | |
<%= favicon_link_tag 'images/apple-touch-icon-114x114-precomposed.png', :rel => 'apple-touch-icon-precomposed', :type => 'image/png', :sizes => '114x114' %> | |
<!-- For first- and second-generation iPad: --> | |
<!-- Size should be 72 x 72 pixels --> | |
<%= favicon_link_tag 'images/apple-touch-icon-72x72-precomposed.png', :rel => 'apple-touch-icon-precomposed', :type => 'image/png', :sizes => '72x72' %> | |
<!-- For non-Retina iPhone, iPod Touch, and Android 2.1+ devices: --> | |
<!-- Size should be 57 x 57 pixels --> | |
<%= favicon_link_tag 'images/apple-touch-icon-precomposed.png', :rel => 'apple-touch-icon-precomposed', :type => 'image/png' %> | |
<!-- For all other devices --> | |
<!-- Size should be 32 x 32 pixels --> | |
<%= favicon_link_tag 'images/favicon.ico', :rel => 'shortcut icon' %> | |
</head> | |
<body> | |
<div class="navbar navbar-fixed-top"> | |
<div class="navbar-inner"> | |
<div class="container"> | |
<a class="btn btn-navbar btn-sidebar" data-toggle="sidebar"> | |
<span class="icon-bar"></span> | |
<span class="icon-bar"></span> | |
<span class="icon-bar"></span> | |
</a> | |
<a class="brand" href="#">BootstrapSidebar</a> | |
<div class="container nav-sidebar"> | |
<ul class="nav"> | |
<li><%= link_to "Link1", "/path1" %></li> | |
<li><%= link_to "/path2" do %> | |
<i class="icon-ok"></i> | |
Link 2 | |
<% end %></li> | |
<li><%= link_to "/path3" do %> | |
<span class="text-ellipsis">Ellipsis (inside a span) Hoc erat in votis modus</span> | |
<% end %></li> | |
<li><%= link_to "/path3" do %> | |
<span class="notification-label">5</span> | |
<span class="text-ellipsis">With notification label and a very long text</span> | |
<% end %></li> | |
</ul> | |
</div><!--/.nav-sidebar --> | |
</div> | |
</div> | |
</div> | |
<div class="container"> | |
<div class="row"> | |
<div class="span9"> | |
<%= yield %> | |
</div> | |
<div class="span3"> | |
<div class="well sidebar-nav"> | |
<h3>Sidebar</h3> | |
<ul class="nav nav-list"> | |
<li class="nav-header">Sidebar</li> | |
<li><%= link_to "Link1", "/path1" %></li> | |
<li><%= link_to "Link2", "/path2" %></li> | |
<li><%= link_to "Link3", "/path3" %></li> | |
</ul> | |
</div><!--/.well --> | |
</div><!--/span--> | |
</div><!--/row--> | |
<footer> | |
<p>© Company 2012</p> | |
</footer> | |
</div> <!-- /container --> | |
<!-- Javascripts | |
================================================== --> | |
<!-- Placed at the end of the document so the pages load faster --> | |
<%= javascript_include_tag "application" %> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
http://jsfiddle.net/spMdg/
Note: the fiddle was built on bootstrap 2.1.1
Outside jsfiddle, it works good with chrome, firefox and ie9.
Based on bootstrap 2.1.2 w.i.p.