app/views/layouts/application.html.erb
<!doctype html>
<%# paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-neither/ %>
<!--[if lt IE 7]> <html class="no-js ie6 oldie" lang="en"> <![endif]-->
<!--[if IE 7]> <html class="no-js ie7 oldie" lang="en"> <![endif]-->
<!--[if IE 8]> <html class="no-js ie8 oldie" lang="en"> <![endif]-->
<%# Consider adding a manifest.appcache: h5bp.com/d/Offline %>
<!--[if gt IE 8]><!--> <html class="no-js" lang="en"> <!--<![endif]-->
<head>
<meta charset="utf-8">
<%# Use the .htaccess and remove these lines to avoid edge case issues. More info: h5bp.com/b/378 %>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta http-equiv="imagetoolbar" content="no">
<%= csrf_meta_tags %>
<title><%= content_for?(:title) ? yield(:title) : "Home" %> | SourceMod Translator</title>
<meta name="description" content="" />
<meta name="author" content="" />
<meta http-equiv="imagetoolbar" content="false">
<meta name="application-name" content="SourceMod Translator">
<%#<meta name="msapplication-starturl" content="http://www.example.com/index.html?pinned=true">%>
<meta name="viewport" content="width=device-width,initial-scale=1">
<%# Place favicon.ico and apple-touch-icon.png in the root directory: mathiasbynens.be/notes/touch-icons %>
<%#<link rel="icon" href="http://assets.tumblr.com/images/favicon.gif?2" type="image/gif"/>%>
<%#= favicon_link_tag 'icons/icon_114.png', :rel => 'apple-touch-icon', :type => 'image/png' %>
<%#= favicon_link_tag 'favicon.ico' %>
<%#= favicon_link_tag 'icons/icon_22.png', :type => "image/png" %>
<%= stylesheet_link_tag "application" %>
<%= yield :header_stylesheets %>
</head>
<body>
<div class="navbar navbar-fixed-top">
<div class="navbar-inner">
<div class="container">
<%= link_to "SourceMod Translator", root_path, :class => "brand" %>
<ul class="nav">
<li class="<%= "active" if current_page?(:controller => 'sourcemod_plugins', :action => 'index') %>"><%= link_to t('menubar.browse_plugins'), sourcemod_plugins_path %></li>
<% if current_user %>
<li class="<%= "active" if current_page?(:controller => 'sourcemod_plugins', :action => 'new') %>"><%= link_to t('menubar.add_plugin'), new_sourcemod_plugin_path %></li>
<% if current_user && current_user.sourcemod_plugins.count > 0 %>
<li><%= link_to t('menubar.my_plugins'), user_sourcemod_plugins_path(current_user) %></li>
<% end %>
<li><%= link_to t('menubar.translate'), random_translations_path %></li>
<% end %>
<li class="<%= "active" if current_page?(:controller => 'tags', :action => 'index') %>"><%= link_to Tag.model_name.human.pluralize, tags_path %></li>
</ul>
<% if current_user %>
<ul class="nav pull-right">
<li>
<%= link_to current_user.name, current_user %>
</li>
<li class="<%= "active" if current_page?(:controller => 'languages', :action => 'index') %>"><%= link_to "My Languages", languages_path %></li>
<li><%= link_to t('menubar.logout'), logout_path(:current_url => request.url) %></li>
</ul>
<% else %>
<ul class="nav pull-right">
<li><%= link_to "Log In", providers_path %></li>
</ul>
<% end %>
</div>
</div>
</div>
<div class="container" id="pagecontainer">
<div class="content">
<% if content_for?(:page_heading) %>
<div class="page-header">
<%= yield :page_heading %>
</div>
<% end %>
<% unless flash[:notice].nil? %>
<%= success_box do %>
<a class="close" data-dismiss="alert" href="#">×</a>
<%= notice %><% end %>
<% end %>
<% unless flash[:success].nil? %>
<%= success_box do %>
<a class="close" data-dismiss="alert" href="#">×</a>
<%= flash[:success] %><% end %>
<% end %>
<% unless flash[:error].nil? %>
<%= error_box do %>
<a class="close" data-dismiss="alert" href="#">×</a>
<%= flash[:error] %><% end %>
<% end %>
<% unless flash[:alert].nil? %>
<%= warning_box do %>
<a class="close" data-dismiss="alert" href="#">×</a>
<%= alert %><% end %>
<% end %>
<%= yield %>
</div>
<footer>
<p>
<%= link_to "Home", root_path %>
| <%= link_to "Contact", contact_path %>
| <%= link_to "Changelog", changelog_path %>
| <%= link_to "Leaderboard", leader_users_path %>
| Version <%= $VERSION %>
</p>
<p>© <%= Time.now.year %> <a href="http://www.mitchdempsey.com/?utm_source=smtrans&utm_medium=website&utm_campaign=footer" target="_blank">Mitch Dempsey</a>. All Rights Reserved.</p>
</footer>
</div>
<%= javascript_include_tag "application" %>
<%= yield :bottom_scripts %>
<%
=begin
%>
<!-- JavaScript at the bottom for fast page loading -->
<!-- Grab Google CDN's jQuery, with a protocol relative URL; fall back to local if offline -->
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js"></script>
<script>window.jQuery || document.write('<script src="js/libs/jquery-1.6.4.min.js"><\/script>')</script>
<%
=end
%>
<!-- Prompt IE 6 users to install Chrome Frame.
chromium.org/developers/how-tos/chrome-frame-getting-started -->
<!--[if lt IE 7 ]>
<script defer src="//ajax.googleapis.com/ajax/libs/chrome-frame/1.0.3/CFInstall.min.js"></script>
<script defer>window.attachEvent('onload',function(){CFInstall.check({mode:'overlay'})})</script>
<![endif]-->
<% unless Rails.env.development? %>
<script type="text/javascript">
var _gaq = [
['_setAccount', "<%= ENV['GA_ACCOUNT'] %>"],
['_setDomainName', "<%= ENV['GA_DOMAIN'] %>"],
['_setAllowLinker', true],
['_trackPageview']
];
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
<% end %>
</body>
</html>