pixels-and-bits/jabe

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

Summary

Maintainability
Test Coverage
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <title>
      <%= "#{@page_title} - " if @page_title %>
      <%=  Jabe::SETTINGS.site_name %>

    </title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <%= csrf_meta_tag %>
    <%= auto_discovery_link_tag :atom, feed_path %>
    <%= stylesheet_link_tag 'jabe/application', 'application' %>

    <!--[if lt IE 9]>
      <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->
  </head>

  <body class="<%= body_class_name %>">
    <div class="navbar navbar-fixed-top">
      <div class="navbar-inner">
        <div class="container">
          <a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
          </a>
          <%= link_to Jabe::SETTINGS.site_name, root_path, :class => 'brand' %>
          <div class="nav-collapse collapse">
            <ul class="nav">
              <li><%= link_to Jabe::SETTINGS.tagline, root_path %></li>
            </ul>
            <%= render 'layouts/jabe/admin' %>
          </div>
        </div>
      </div>
    </div>

    <div id="main">
      <div class="container">
        <div class="row">
          <div class="span3" style="float:right">
            <div class="well well-small sidebar">
              <ul class="nav nav-list">
                <li class="nav-header">
                  <%= Jabe::SETTINGS.sidebar_heading %>
                </li>
                <% unless Jabe::SETTINGS.github_username.blank? %>
                  <li>
                    <%= link_to 'Github',  "http://github.com/#{Jabe::SETTINGS.github_username}" %>
                  </li>
                <% end %>

                <% unless Jabe::SETTINGS.twitter_username.blank? %>
                  <li>
                    <%= link_to 'Twitter',  "https://twitter.com/#{Jabe::SETTINGS.twitter_username}" %>
                  </li>
                <% end %>

                <% unless Jabe::SETTINGS.facebook_url.blank? %>
                  <li>
                    <%= link_to 'Facebook',  "http://facebook.com/#{Jabe::SETTINGS.facebook_url}" %>
                  </li>
                <% end %>
              </ul>
            </div>
          </div>
          <div class="span9">
            <%= render 'layouts/jabe/flash_messages' %>
            <%= yield %>
          </div>
        </div>
        <footer class="footer">
          <p>
            <%= "Powered by #{link_to 'JABE', 'http://github.com/pixels-and-bits/jabe'} a #{link_to 'Pixels and Bits', 'http://pixels-and-bits.com'} project".html_safe %>
          </p>
        </footer>
      </div>
    </div>

    <%= javascript_include_tag 'jabe/application.js' %>
    <script type="text/javascript">
      $(document).ready(function() {
        prettyPrint()
      })

      <% if Rails.env.production? && Jabe::SETTINGS.google_tracker_id.present? %>
        JABE.load_gat('<%= Jabe::SETTINGS.google_tracker_id %>')
      <% end %>
    </script>
  </div>
</body>