[openstreetmap/openstreetmap-website] Remove controls sprite (PR #5752)

Tom Hughes notifications at github.com
Wed Mar 5 22:30:28 UTC 2025


@tomhughes requested changes on this pull request.



> @@ -22,7 +22,15 @@
   <div class='col-sm'>
     <h3 class='fs-5'><%= t "site.welcome.add_a_note.title" %></h3>
     <p><%= t "site.welcome.add_a_note.para_1" %></p>
-    <p><%= t ".how_to_help.add_a_note.instructions_1_html", :note_icon => tag.a(:class => "icon note bg-dark rounded-1") %></p>
+    <p><%= t(
+             ".how_to_help.add_a_note.instructions_1_html",
+             :note_icon => link_to(
+               tag.svg(:width => "20", :height => "20", :fill => "currentColor", :class => "align-top") do
+                 tag.path(:d => "M17 12H15v2H13v2h2v2h2V16h2V14H17V12ZM3 12H6l2 3 2-3h3l1-1V4L13 3H3L2 4v7Z")
+               end,
+               "/note/new"

This should use `new_note_path` rather than hardcoding the link.

>    if (!params.zoom) params.zoom = 17;
-  if (params.lat && params.lon) url += OSM.formatHash(params);
-  $(".icon.note").attr("href", url);
+  if (params.lat && params.lon) {
+    $("a[href*='note']")[0].href += OSM.formatHash(params);

This is rather nasty as it means this code is having to make assumptions about the URL that has been filled in by the server, plus we're hoping that no other links contain `note` anywhere... Can we not mark the element with a class that can be used to pick it out precisely?

>  
-  .icon {
-    margin: 10px;
-  }
+.leaflet-control.active .control-button {
+  background-color: $vibrant-green;
+}
+
+.geolocate {
+	background: currentColor;
+	clip-path: polygon(20% 50%, 20% 40%, 70% 20%, 80% 20%, 80% 30%, 60% 80%, 50% 80%, 50% 50%);

Indentation is wrong here - think it's using a tab or something?

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5752#pullrequestreview-2662640390
You are receiving this because you are subscribed to this thread.

Message ID: <openstreetmap/openstreetmap-website/pull/5752/review/2662640390 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20250305/870bbf2e/attachment-0001.htm>


More information about the rails-dev mailing list