aboutsummaryrefslogtreecommitdiff
path: root/app/views/welcome/index.html.erb
blob: eac1eff1f17486d48decb0b802687a89dba81b70 (plain)
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
<% content_for :head do %>
    <%= stylesheet_link_tag("https://unpkg.com/leaflet@1.7.1/dist/leaflet.css",
                            integrity: "sha512-xodZBNTC5n17Xt2atTPuE1HxjVMSvLVW9ocqUKLsCC5CXdbqCmblAshOMAS6/keqq/sMZMZ19scR4PsZChSR7A==",
                            crossorigin: '') %>
    <%= javascript_include_tag("https://unpkg.com/leaflet@1.7.1/dist/leaflet.js",
                               integrity: "sha512-XQoYMqMTK8LvdxXYG3nZ448hOEQiglfqkJs1NOQV44cWnUrBc8PkAOcXy20w0vlaXaVUearIOBhiXZ5V3ynxwA==",
                               crossorigin: '') %>
<% end %>

<h1>Bienvenue à l'atelier carto d'IN COMMON</h1>

<%= map_container %>

<% content_for :aside do %>
    <div data-controller="taxonomy" data-taxonomy-id="2519915f-d19c-4281-b758-f5ddb889d7fa">
        <div class="leaflet-bar leaftlet-control" id="taxonomy-toggle">
            <button data-action="taxonomy#toggle"></button>
        </div>
        <nav data-target="taxonomy.filter">
        </nav>
    </div>
<% end %>

<% content_for :debug do %>
    <% if current_user.present? %>
        <p>Premier élément de la liste:</p>
        <% res = @resources.first %>
        <p><%= res.feature["properties"]["name"] %></p>
        <p><%= res.feature["geometry"]["coordinates"] %></p>
    <% end %><%# ensure it does not break when we don't have a record... %>
<% end %>