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

95 lines
3.4 KiB
Text
Raw Normal View History

<%#
2014-07-31 01:10:10 +00:00
# @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>
2014-07-31 01:10:10 +00:00
<html>
<head>
<title><%=h yield(:title) %></title>
<%= stylesheet_link_tag "application", :media => "all" %>
<%= javascript_include_tag "application" %>
<% if (controller_name == "maps" && action_name == "show" || action_name == "embed") ||
(controller_name == "topics" && action_name == "show") %>
<%= javascript_include_tag "compileMapPages" %>
<% end %>
<script type="text/javascript" src="//use.typekit.net/tki2nyo.js"></script>
<script type="text/javascript">try{Typekit.load();}catch(e){}</script>
<script type="text/javascript" src="//use.typekit.net/obp7wss.js"></script>
<script type="text/javascript">try{Typekit.load();}catch(e){}</script>
<%= csrf_meta_tags %>
<meta name="viewport" content="width=device-width, user-scalable=no">
</head>
2014-02-24 07:22:40 +00:00
<body class="<%= (action_name == "show") ? "mapBody" : "" %>" >
2013-07-10 18:02:38 +00:00
2014-07-31 01:10:10 +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 <%= controller_name == "main" && action_name == "home" ? "homePage" : "" %>" id="wrapper">
2014-08-02 02:50:23 +00:00
<div class="homeButton">
<a href="/"></a>
</div>
2014-07-31 01:10:10 +00:00
<div class="sidebarSearch">
<div class="sidebarSearchIcon"></div>
<input type="text" class="sidebarSearchField"></input>
<div class="clearfloat"></div>
</div>
<div class="sidebarAccount">
<div class="sidebarAccountIcon">
<% if user && user.image %><%= image_tag user.image.url(:thumb), :size => "35x35" %><% end %>
</div>
<div class="sidebarAccountBox <%= authenticated? ? 'loggedin' : 'loggedout' %>">
<%= render :partial => 'layouts/account' %>
</div>
</div>
<% if authenticated? %>
<div class="addMap openLightbox" data-open="newmap"></div>
<% end %>
<%= yield %>
2014-07-27 19:57:35 +00:00
</div>
2014-07-31 01:10:10 +00:00
<div class="footer">
2014-08-02 02:50:23 +00:00
<div id="logo">METAMAPS</div>
</div>
2014-07-31 01:10:10 +00:00
<% end %>
<%= render :partial => 'layouts/lightboxes' %>
<%= render :partial => 'layouts/templates' %>
<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('Scqak8nyHdFEkezKMNeQp');
<% if authenticated? %>
Metamaps.Active.Mapper = <%= user.to_json.html_safe %>
<% else %>
Metamaps.Active.Mapper = null;
<% end %>
var imgArray = new Object();
<% Metacode.all.each do |m| %>
imgArray['<%= m.name %>'] = new Image(); imgArray['<%= m.name %>'].src = '<%= m.icon %>';
<% end %>
</script>
<%= render :partial => 'layouts/googleanalytics' if Rails.env.production? %>
</body>
</html>