49 lines
2.3 KiB
Plaintext
49 lines
2.3 KiB
Plaintext
<% require_dependency 'static_maps_url_helper' %>
|
||
|
||
<%= content_for(:title) do %><%= @visualization.name %><% end %>
|
||
|
||
<%= content_for(:description) do %><%= @visualization.description.present? ? "#{markdown_html_clean(@visualization.description)}. Map created by #{@name} in CARTO" : "Map created by #{@name} in CARTO" %><% end %>
|
||
|
||
<%= content_for(:twitter_card) do %><%= Carto::StaticMapsURLHelper.new.url_for_static_map(request, @visualization, 560, 300) %><% end %>
|
||
<%= content_for(:facebook_card) do %><%= Carto::StaticMapsURLHelper.new.url_for_static_map(request, @visualization, 1200, 630) %><% end %>
|
||
|
||
<%= content_for(:css) do %>
|
||
<%= render :partial => 'admin/visualizations/public/embed_map_inline_css' %>
|
||
<% end %>
|
||
|
||
<%= content_for(:body_class) do %>
|
||
embed-map
|
||
<% end %>
|
||
|
||
<%= content_for(:content) do %>
|
||
<% if @visualization.public? || @visualization.public_with_link? || @visualization.password_protected? || @visualization.organization? %>
|
||
<div id="map"></div>
|
||
|
||
<div id="not_supported_dialog" style="display: none">
|
||
<h2>CARTO</h2>
|
||
<p>This visualization only works in modern browsers. Upgrade yours and enjoy.</p>
|
||
<ul>
|
||
<li><a href="http://www.apple.com/safari/" class="safari">Safari</a></li>
|
||
<li><a href="https://www.google.com/chrome/" class="chrome">Chrome</a></li>
|
||
<li class="last"><a href="http://www.mozilla.org/en-US/firefox/all/" class="firefox">Firefox</a></li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="cartodb-text">
|
||
Map created by
|
||
<% username = @visualization.user.name_or_username %>
|
||
<a class="user" href="<%= CartoDB.url(self, 'public_user_feed_home', user: @visualization.user) %>?utm_source=Footer_Link&utm_medium=referral&utm_campaign=Embed_v1&utm_content=<%= @visualization.user.username %>" target="_blank">
|
||
<% if !@visualization.user.avatar_url.blank? %>
|
||
<img src="<%= @visualization.user.avatar_url %>" width="16" height="16" alt="<%= username %>" title="<%= username %>" />
|
||
<% end %>
|
||
<span class="username"><%= username %></span>
|
||
</a>
|
||
</div>
|
||
<% end %>
|
||
<% end %>
|
||
|
||
<%= content_for(:js) do %>
|
||
<%= insert_trackjs('embeds', Cartodb.get_config(:trackjs, 'frequency')) %>
|
||
<%= render :partial => 'admin/visualizations/public/embed_map_inline_js' %>
|
||
<% end %>
|