lib/calamum/templates/bootstrap/index.html.erb in calamum-1.0.0 vs lib/calamum/templates/bootstrap/index.html.erb in calamum-1.0.1

- old
+ new

@@ -8,11 +8,11 @@ <link href="./assets/stylesheets/bootstrap-responsive.css" rel="Stylesheet"/> <link href="./assets/stylesheets/docs.css" rel="Stylesheet"/> <link href="./assets/stylesheets/main.css" rel="Stylesheet"/> <script type="text/javascript" src="./assets/javascripts/jquery-1.7.2.min.js"></script> <script type="text/javascript" src="./assets/javascripts/bootstrap.js"></script> -<title>Rails Api Doc</title> +<title><%= @name %> Rest API Doc</title> </head> <body data-spy="scroll" data-target=".bs-docs-sidebar"> <header class="jumbotron subhead" id="overview"> <div class="container"> @@ -22,18 +22,34 @@ </header> <div class="container"> <div class="row"> <div class="span3 bs-docs-sidebar"> <ul class="nav nav-list bs-docs-sidenav affix-top"> + <% if description %> + <li class="active"> + <a href="#overview"> + <i class="icon-chevron-right"></i>Overview</a> + </li> + <% end %> <% @resources.keys.each_with_index do |key,index| %> - <li class="<%= index == 0 ? 'active': '' %>"> + <li class="<%= !description && (index == 0) ? 'active': '' %>"> <a href="#<%= key %>_section"> <i class="icon-chevron-right"></i><%= key %></a> </li> <% end %> </ul> </div> <div class="span9"> + <% if description %> + <section id="overview"> + <div class="page-header"> + <h2>Overview</h2> + </div> + <div id="overview-body"> + <%= description %> + </div> + </section> + <% end %> <% @resources.each do |name, requests| %> <section id="<%= name %>_section"> <div class="page-header"> <h2><%= name.capitalize %> resource</h2> </div>