metamaps--metamaps/app/views/layouts/application.html.erb

97 lines
3.3 KiB
Text
Raw Normal View History

<%#
# @file
# Main application file. Holds scaffolding present on every page.
# Then a certain non-partial view (no _ preceding filename) will be
# displayed within, based on URL
#%>
<!DOCTYPE html>
<html>
<head>
<title><%=h yield(:title) %></title>
<% if authenticated? %>
<script type="text/javascript">
var userid = <%= user.id %>;
var username = "<%= user.name %>";
</script>
<% else %>
<script type="text/javascript">
var userid = null;
var username = null;
</script>
<% end %>
<script>
var imgArray = new Object();
<% Metacode.all.each do |m| %>
imgArray['<%= m.name %>'] = new Image(); imgArray['<%= m.name %>'].src = '/assets/<%= m.icon %>';
<% end %>
</script>
<%= stylesheet_link_tag "application", :media => "all" %>
<%= javascript_include_tag "application" %>
<script type="text/javascript" src="//use.typekit.net/tki2nyo.js"></script>
<script type="text/javascript">try{Typekit.load();}catch(e){}</script>
2012-12-16 20:00:43 +00:00
<script type="text/javascript" src="//use.typekit.net/obp7wss.js"></script>
<script type="text/javascript">try{Typekit.load();}catch(e){}</script>
<%= csrf_meta_tags %>
</head>
<body>
2013-07-10 18:02:38 +00:00
<% if notice %>
<p class="notice metamaps"><%= notice %></p>
<% end %>
<% if alert %>
<p class="alert metamaps"><%= alert %></p>
<% end %>
<%= content_tag :div, class: authenticated? ? "main authenticated" : "main unauthenticated" do %>
<div class="wrapper" id="wrapper">
<div class="sidebarSearch">
<div class="sidebarSearchIcon"></div>
<input type="text" class="sidebarSearchField" placeholder="Search..."></input>
<div class="clearfloat"></div>
<%= render :partial => 'layouts/searchtemplates' %>
</div>
<div class="sidebarAccount">
<div class="sidebarAccountIcon"></div>
<div class="sidebarAccountBox <%= authenticated? ? 'loggedin' : 'loggedout' %>">
<%= render :partial => 'layouts/account' %>
</div>
</div>
<%= yield %>
</div>
2012-12-16 20:00:43 +00:00
<div class="footer">
<div class="logo">
<ul class="menu">
<li class="meta">
<a href="#" class="button" target="_blank">about</a>
</li>
<li class="beta">
<div class="inBeta">beta</div>
<button onclick="BAROMETER.show();">feedback!</button>
</li>
<li class="tutorial"><a href="#" target="_blank">tutorial</a></li>
<li class="exploreMaps"><%= link_to "explore maps", maps_url %></li>
</ul>
<div id="mainTitle"><%= link_to "metamaps", root_url %></div><!--<div id="beta">beta</div>-->
</div>
</div>
<% end %>
2012-10-30 22:32:48 +00:00
<%= render :partial => 'layouts/ga' if Rails.env.production? %>
<% if authenticated? %>
<style type='text/css'>@import url('http://getbarometer.s3.amazonaws.com/assets/barometer/css/barometer.css');</style>
<script src='http://getbarometer.s3.amazonaws.com/assets/barometer/javascripts/barometer.js' type='text/javascript'></script>
<script type="text/javascript" charset="utf-8">
BAROMETER.load('6FWffBApknnjr7p3Oxf2L');
</script>
<style>
</style>
<% end %>
</body>
</html>