Skip to content
Snippets Groups Projects
Commit b7c64d2a authored by alexisben's avatar alexisben
Browse files

add markers

parent 3a968d65
No related branches found
No related tags found
No related merge requests found
<svg width="18" height="26" viewBox="0 0 18 26" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M17.5676 8.7551C17.5676 13.5904 8.78378 26 8.78378 26C8.78378 26 0 13.5904 0 8.7551C0 3.91979 3.93263 0 8.78378 0C13.6349 0 17.5676 3.91979 17.5676 8.7551Z" fill="black"/>
<circle cx="9.13516" cy="8.43252" r="4.21622" fill="white"/>
</svg>
<% is_leaflet_needed = true; %>
<% about.blocks.published.ordered.each do |block| %>
<% @block = block %>
<%= render "admin/communication/blocks/templates/#{@block.template_kind}/preview" %>
<% end %>
\ No newline at end of file
<% if block.template_kind == "partners" && block.data[:layout] == "map" %>
<% is_leaflet_needed = true; %>
<% end %>
<% end %>
<% if is_leaflet_needed %>
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.9.3/dist/leaflet.css"
integrity="sha256-kLaT2GOSpHechhsozzB+flnD+zUyjE2LlfWPgU04xyI="
crossorigin=""/>
<script src="https://unpkg.com/leaflet@1.9.3/dist/leaflet.js"
integrity="sha256-WBkoXOwTeyKclOHuWtc+i2uENFpDZ9YPdf5Hf+D7ewM="
crossorigin=""></script>
<% end %>
<%
$class = "block block-partners"
class_name = "block block-partners"
unless @block.title.blank?
$class += " block-with-title"
class_name += " block-with-title"
end
$class += " block-partners--" + @block.template.layout
class_name += " block-partners--" + @block.template.layout
%>
<section class="<%= class_name %>">
<div class="container">
<div class="block-content">
......@@ -42,11 +41,10 @@
</article>
<% end %>
</div>
<% else %>
<div class="map" id="map">
<% @block.template.elements.each do |element| %>
<article class="organization">
<article class="organization" data-latitude="<%= element.organization.latitude %>" data-longitude="<%= element.organization.longitude %>">
<h3>
<% if element.best_url %>
<a href="<%= element.best_url %>" target="_blank">
......@@ -63,6 +61,6 @@
<% end %>
</div>
<% end %>
</div>
</div>
</section>
\ No newline at end of file
</section>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment