lib/generators/bootstrap/layout/templates/layout.html.erb in twitter-bootstrap-rails-2.0 vs lib/generators/bootstrap/layout/templates/layout.html.erb in twitter-bootstrap-rails-2.0.0
- old
+ new
@@ -1,57 +1,120 @@
<!DOCTYPE html>
-<html>
-<head>
- <title><%= app_name %></title>
- <%%= stylesheet_link_tag "application" %>
- <%%= javascript_include_tag "application" %>
- <%%= csrf_meta_tags %>
-</head>
-<body style="padding-top: 60px">
- <div class="topbar">
- <div class="topbar-inner">
- <div class="<%= container_class %>">
- <h3><%%= link_to "<%= app_name %>", "/" %></h3>
- <ul class="nav">
- <%- (1..3).each do |i| -%>
- <li><%%= link_to "Link<%= i %>", "/path<%= i %>" %></li>
+<html lang="en">
+ <head>
+ <meta charset="utf-8">
+ <title><%= app_name %></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]-->
+
+ <!-- Le styles -->
+ <%%= stylesheet_link_tag "application", :media => "all" %>
+ <style>
+ body {
+ padding-top: 60px; /* 60px to make the container go all the way to the bottom of the topbar */
+ }
+ </style>
+
+ <!-- Le fav and touch icons -->
+ <link href="images/favicon.ico" rel="shortcut icon">
+ <link href="images/apple-touch-icon.png" rel="apple-touch-icon">
+ <link href="images/apple-touch-icon-72x72.png" rel="apple-touch-icon" sizes="72x72">
+ <link href="images/apple-touch-icon-114x114.png" rel="apple-touch-icon" sizes="114x114">
+ </head>
+ <body>
+
+ <div class="navbar navbar-fixed-top">
+ <div class="navbar-inner">
+ <%- if layout_type == "fluid" -%>
+ <div class="container-fluid">
+ <%- else -%>
+ <div class="container">
<%- end -%>
- </ul>
+ <a class="btn btn-navbar" data-target=".nav-collapse" data-toggle="collapse">
+ <span class="i-bar"></span>
+ <span class="i-bar"></span>
+ <span class="i-bar"></span>
+ </a>
+ <a class="brand" href="#"><%= app_name %></a>
+ <div class="<%= container_class %> nav-collapse">
+ <ul class="nav">
+ <%- (1..3).each do |i| -%>
+ <li><%%= link_to "Link<%= i %>", "/path<%= i %>" %></li>
+ <%- end -%>
+ </ul>
+ </div><!--/.nav-collapse -->
+ </div>
</div>
</div>
- </div>
- <div class="<%= container_class %>">
- <%- if layout_type == "fluid" -%>
- <div class="sidebar">
- <div class="well">
- <h5>Sidebar</h5>
- <ul>
- <%- (1..3).each do |i| -%>
- <li><%%= link_to "Link<%= i %>", "/path<%= i %>" %></li>
- <%- end -%>
- </ul>
- </div>
- </div>
- <div class="content">
- <%%= yield %>
- </div>
- <%- else -%>
- <div class="content">
- <div class="row">
- <div class="span11">
+
+ <div class="<%= container_class %>">
+ <%- if layout_type == "fluid" -%>
+ <div class="row-fluid">
+ <div class="span3">
+ <div class="well sidebar-nav">
+ <ul class="nav nav-list">
+ <li class="nav-header">Sidebar</li>
+ <%- (1..3).each do |i| -%>
+ <li><%%= link_to "Link<%= i %>", "/path<%= i %>" %></li>
+ <%- end -%>
+ </ul>
+ </div><!--/.well -->
+ </div><!--/span-->
+ <div class="span9">
+ <%% [:notice, :error, :alert].each do |level| %>
+ <%% unless flash[level].blank? %>
+ <div data-alert="alert" class="alert alert-<%%= flash_class(level) %> fade in">
+ <a class="close" data-dismiss="alert" href="#">×</a>
+ <%= content_tag :p, flash[level] %>
+ </div>
+ <%% end %>
+ <%% end %>
<%%= yield %>
</div>
- <div class="span1"> </div>
- <div class="span4">
- <h3>Sidebar</h3>
- <ul>
- <%- (1..3).each do |i| -%>
- <li><%%= link_to "Link<%= i %>", "/path<%= i %>" %></li>
- <%- end -%>
- </ul>
+ </div><!--/row-->
+ <%- else -%>
+ <div class="content">
+ <div class="row">
+ <div class="span9">
+ <%% [:notice, :error, :alert].each do |level| %>
+ <%% unless flash[level].blank? %>
+ <div data-alert="alert" class="alert alert-<%%= flash_class(level) %> fade in">
+ <a class="close" data-dismiss="alert" href="#">×</a>
+ <%%= content_tag :p, flash[level] %>
+ </div>
+ <%% end %>
+ <%% end %>
+ <%%= yield %>
+ </div>
+ <div class="span1"> </div>
+ <div class="span3">
+ <div class="well sidebar-nav">
+ <h3>Sidebar</h3>
+ <ul class="nav nav-list">
+ <li class="nav-header">Sidebar</li>
+ <%- (1..3).each do |i| -%>
+ <li><%%= link_to "Link<%= i %>", "/path<%= i %>" %></li>
+ <%- end -%>
+ </ul>
+ </div>
+ </div>
+ </div>
</div>
- </div>
- </div>
- <%- end -%>
- </div>
-</body>
+ <%- end -%>
+
+ <footer>
+ <p>© Company 2012</p>
+ </footer>
+
+ </div> <!-- /container -->
+
+ <!-- Le javascript
+ ================================================== -->
+ <!-- Placed at the end of the document so the pages load faster -->
+ <%%= javascript_include_tag "application" %>
+
+ </body>
</html>