From: Anton Khorev Date: Sat, 29 Jul 2023 18:37:31 +0000 (+0300) Subject: Remove map key image custom css X-Git-Tag: live~910^2~2 X-Git-Url: https://git.openstreetmap.org./rails.git/commitdiff_plain/dc622a32f3fccfc29d227b0911badd302553e22a Remove map key image custom css --- diff --git a/app/assets/stylesheets/common.scss b/app/assets/stylesheets/common.scss index 6a6e45186..d598d10e3 100644 --- a/app/assets/stylesheets/common.scss +++ b/app/assets/stylesheets/common.scss @@ -562,16 +562,6 @@ header .search_forms, display: none; } -/* Rules for the map key which appears in the popout sidebar */ - -#mapkey { - .mapkey-table-key img { - display: block; - margin-left: auto; - margin-right: auto; - } -} - /* Rules for search sidebar */ #sidebar .search_results_entry { diff --git a/app/views/site/key.html.erb b/app/views/site/key.html.erb index 60eff9a44..608932b3e 100644 --- a/app/views/site/key.html.erb +++ b/app/views/site/key.html.erb @@ -1,16 +1,16 @@
- +
<% @key.each do |layer_name, layer_data| %> <% layer_data.each do |entry| %> <%= tag.tr :class => "mapkey-table-entry", :data => { :layer => layer_name, :zoom_min => entry["min_zoom"], :zoom_max => entry["max_zoom"] } do %> - - <% end %>
+ <% if entry["width"] && entry["height"] && entry["fill"] %> - <%= image_tag "data:image/svg+xml,#{u("")}" %> + <%= image_tag "data:image/svg+xml,#{u("")}", :class => "d-block mx-auto" %> <% else %> - <%= image_tag "key/#{layer_name}/#{entry['image']}" %> + <%= image_tag "key/#{layer_name}/#{entry['image']}", :class => "d-block mx-auto" %> <% end %> + <%= Array(t(".table.entry.#{entry['name']}")).to_sentence %>