From dc622a32f3fccfc29d227b0911badd302553e22a Mon Sep 17 00:00:00 2001 From: Anton Khorev Date: Sat, 29 Jul 2023 21:37:31 +0300 Subject: [PATCH] Remove map key image custom css --- app/assets/stylesheets/common.scss | 10 ---------- app/views/site/key.html.erb | 10 +++++----- 2 files changed, 5 insertions(+), 15 deletions(-) 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 %> -- 2.39.5
+ <% 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 %>