]> git.openstreetmap.org Git - rails.git/blob - app/views/layouts/map.html.erb
Merge pull request #5019 from tomhughes/oauth2-cleanup
[rails.git] / app / views / layouts / map.html.erb
1 <% content_for :head do %>
2   <%= javascript_include_tag "index" %>
3 <% end %>
4
5 <% content_for(:body_class) { "map-layout" } %>
6
7 <% if current_user&.home_location? %>
8   <% content_for :greeting do %>
9     <%= link_to t("layouts.home"),
10                 "#",
11                 :id => "homeanchor",
12                 :class => "set_position dropdown-item",
13                 :data => { :lat => current_user.home_lat,
14                            :lon => current_user.home_lon,
15                            :zoom => 15 } %>
16   <% end %>
17 <% end %>
18
19 <% content_for :header do %>
20   <%= render :partial => "layouts/search", :locals => { :autofocus => false } %>
21 <% end %>
22
23 <% content_for :content do %>
24   <div id="sidebar" class="bg-body z-1">
25     <%= render :partial => "layouts/search", :locals => { :autofocus => true } %>
26
27     <div id="flash">
28       <%= render :partial => "layouts/flash" %>
29     </div>
30
31     <div id="browse_status"></div>
32
33     <div id="sidebar_loader" class="my-3 text-center loader">
34       <div class="spinner-border" role="status">
35         <span class="visually-hidden"><%= t("browse.start_rjs.loading") %></span>
36       </div>
37     </div>
38
39     <div id="sidebar_content" class="p-3">
40       <%= yield %>
41     </div>
42
43     <% unless current_user %>
44       <div class="welcome p-3" hidden>
45         <%= render "sidebar_header", :title => t("layouts.intro_header") %>
46         <p class="fs-6 fw-light"><%= t "layouts.intro_text" %></p>
47         <p class="fs-6 fw-light"><%= t "layouts.hosting_partners_2024_html",
48                                        :fastly => link_to(t("layouts.partners_fastly"), "https://www.fastly.com/"),
49                                        :corpmembers => link_to(t("layouts.partners_corpmembers"), "https://osmfoundation.org/wiki/Corporate_Members"),
50                                        :partners => link_to(t("layouts.partners_partners"), "https://hardware.openstreetmap.org/thanks/") %>
51         </p>
52         <div class="d-flex gap-2">
53           <a class="btn btn-primary w-100 d-flex align-items-center justify-content-center" href="<%= about_path %>"><%= t("layouts.learn_more") %></a>
54           <a class="btn btn-primary w-100 d-flex align-items-center justify-content-center" href="<%= user_new_path %>"><%= t("layouts.start_mapping") %></a>
55         </div>
56       </div>
57     <% end %>
58
59     <%= render :partial => "layouts/banner" %>
60   </div>
61
62   <noscript>
63     <div class="mt-5 p-3">
64       <p><%= t "site.index.js_1" %></p>
65       <p><%= t "site.index.js_2" %></p>
66     </div>
67   </noscript>
68
69   <div id="map-ui" class="bg-body z-2">
70   </div>
71
72   <div id="map" tabindex="2" class="bg-body-secondary z-0">
73   </div>
74
75   <div id="attribution" class="d-none">
76     <table>
77       <tr>
78         <td><%= t "site.index.license.license_url" %></td>
79         <td><%= t "site.index.license.project_url" %></td>
80       </tr>
81       <tr>
82         <td colspan="2" class="attribution_notice"><%= t "site.index.license.copyright" %></td>
83       </tr>
84     </table>
85   </div>
86 <% end %>
87
88 <%= render :template => "layouts/site" %>