-
Notifications
You must be signed in to change notification settings - Fork 1.8k
/
application.html.erb
109 lines (86 loc) · 4.04 KB
/
application.html.erb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
<!DOCTYPE html>
<html lang="<%= I18n.locale || 'en' %>">
<head>
<meta charset="utf-8" />
<title>🎈 Public Lab<%= ": "+(@title || params[:action].capitalize) %></title>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<% if @node && @node.body %>
<meta name="description" content="<%= raw strip_tags(sanitize(RDiscount.new(@node.body).to_html)).truncate(100) %>" />
<% else %>
<meta name="description" content="Public Lab is an open community which collaboratively develops accessible, open source, Do-It-Yourself technologies for investigating local environmental health and justice issues." />
<% end %>
<meta name="author" content="Public Lab contributors" />
<link href="https://<%= request.host %>/feed.rss" rel="alternate" type="application/rss+xml" title="Public Lab research" />
<script type="text/javascript" async
src="https://cdn.jsdelivr.net/npm/mathjax@2.7.3/MathJax.js?config=TeX-MML-AM_CHTML">
</script>
<%= stylesheet_link_tag "application", :media => "all" %>
<link href="/lib/fontawesome/css/font-awesome.min.css" media="all" rel="stylesheet" type="text/css" />
<% if @node && @node.has_tag('style:fancy') %>
<%= stylesheet_link_tag "fancy", :media => "all" %>
<% end %>
<%= stylesheet_link_tag "print", :media => "print" %>
<!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
<!--[if lt IE 9]>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<%= javascript_include_tag "application" %>
<%= csrf_meta_tags %>
<meta name="google-translate-customization" content="4ce4c7c384354172-5179499fc244f592-g2b333d0d29f59663-d" />
<% if @node && @node.body %>
<meta property="og:title" content="<%= @title %>" />
<meta property="og:site_name" content="Public Lab" />
<meta property="og:url" content="<%= request.host %>/n/<%= @node.id %>" />
<meta property="og:description" content="<%= raw strip_tags(sanitize(RDiscount.new(@node.body).to_html)).truncate(100) %>" />
<meta property="og:type" content="article" />
<meta property="fb:app_id" content="644692375883090" />
<% if @node.main_image %>
<meta property="og:image" content="<%= @node.main_image.path(:default) %>" />
<% end %>
<p class="facebook-summary" style="display:none;">
<%= raw strip_tags(sanitize(RDiscount.new(@node.body).to_html)).truncate(100) %>
</p>
<% end %>
<p class="facebook-summary" style="display:none;"><%= t('layout._header.summary') %></p>
<!-- facebook needs this apparently -->
<div id="fb-root"></div>
<%= yield(:head) %>
<script type="text/javascript">
I18n.defaultLocale = "<%= I18n.default_locale %>";
I18n.locale = "<%= I18n.locale %>";
I18n.fallbacks = true;
$(function () {
$("[data-toggle=popover]").popover({
html: true,
content: function() {
return $('#popover-content').html();
}
});
})
</script>
<% cache('feature_header', skip_digest: true) do %>
<%= feature("header") %>
<% end %>
<%= yield(:head) %>
<style type="text/css">
.pac-container { z-index: 100000; }
.leaflet-control-layers {
max-height: 200px;
overflow: auto;
}
</style>
<script src='https://api.mapbox.com/mapbox.js/plugins/leaflet-fullscreen/v1.0.1/Leaflet.fullscreen.min.js'></script>
<link href='https://api.mapbox.com/mapbox.js/plugins/leaflet-fullscreen/v1.0.1/leaflet.fullscreen.css' rel='stylesheet' />
<script src="https://cdn.jsdelivr.net/npm/leaflet-search@2.4.0/dist/leaflet-search.min.js"></script>
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/leaflet-search@2.4.0/dist/leaflet-search.min.css">
</head>
<body>
<%= render :partial => 'layouts/header' %>
<div class="container">
<div class="row">
<%= yield %>
</div><!--/row-->
</div><!--/container-->
<%= render :partial => "layouts/footer" %>
</body>
</html>