kwbock/clipster

View on GitHub
app/views/layouts/clipster/application.html.erb

Summary

Maintainability
Test Coverage
<!DOCTYPE html>
<html lang="en">
<head>
  <title>Clipster</title>
  <%= stylesheet_link_tag    "clipster/application", :media => "all" %>

  <%= javascript_include_tag "clipster/application" %>
  <%= csrf_meta_tags %>
  <%=h yield(:head) %>
  <%= render "clipster/common/includes" %>
</head>
<body>
    <div class="container">
        <div class="navbar navbar-inverse navbar-fixed-top">
            <div class="navbar-inner">
                <div class="container">
                    <div class="nav-collapse collapse">
                        <%= link_to "Clipster", root_path, :class => "brand" %>
                        <ul class="nav">
                            <li><%= link_to "New Clip", new_clip_path %></li>
                            <li><%= link_to "Recent Clips", clips_clips_path %></li>
                            <li><%= link_to "About", about_index_path %></li>
                            <% if Clipster.config.associates_clip_with_user %>
                            <li><a href="javascript:void(0);"><%= Clipster.config.user_class %></a></li>
                            <% end %>
                        </ul>
                        <%= form_tag(search_clips_path, :method => 'get', :class => 'navbar-search pull-right', :name=>"search_form") do %>
                            <div class="input-append">
                                <%= text_field_tag(:search_term, "", :class=>"search-query", :type=>"search", :placeholder=>"Search") %>
                                <span class="add-on">
                                <i class="icon-search"> </i></span>
                            </div>
                            <input id="search_button" type="submit" style="display:none;" />
                        <% end %>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <%#
    Do we want a header, if so this is how we do it. not sure if needed with fixed navbar
    <header class="jumbotron">
        <div class="container">
            <h3>Clipster</h3>
            <p class="lead">Code snippets before they were cool</p>
        </div>
    </header>
    %>
    <div class="flash">
        <% if notice %>
        <p class="notice"><%= notice %></p>
        <% end %>
        <% if alert %>
        <p class="alert"><%= alert %></p>
        <% end -%>
    </div>

    <div class="container">
        <div class="row">
            <div class="span12">
                <%= yield %>
            </div>
        </div>
    </div>
</body>
</html>