diff options
-rw-r--r-- | app/assets/images/icons.svg | 5 | ||||
-rw-r--r-- | app/assets/stylesheets/application.css | 12 | ||||
-rw-r--r-- | app/helpers/icons_helper.rb | 4 | ||||
-rw-r--r-- | app/views/admin/info.html.erb | 6 |
4 files changed, 14 insertions, 13 deletions
diff --git a/app/assets/images/icons.svg b/app/assets/images/icons.svg index 938ca792f..43d476b46 100644 --- a/app/assets/images/icons.svg +++ b/app/assets/images/icons.svg @@ -158,11 +158,6 @@ <path d="M3 7l9 6l.565 -.377m2.435 -1.623l6 -4"/> <path d="M3 3l18 18"/> </symbol> - <symbol viewBox="0 0 24 24" stroke-linecap="round" stroke-linejoin="round" id="icon--error"> - <path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0"/> - <path d="M12 9v4"/> - <path d="M12 16v.01"/> - </symbol> <symbol viewBox="0 0 24 24" stroke-linecap="round" stroke-linejoin="round" id="icon--fav"> <path d="M12 17.75l-6.172 3.245l1.179 -6.873l-5 -4.867l6.9 -1l3.086 -6.253l3.086 6.253l6.9 1l-5 4.867l1.179 6.873z"/> </symbol> diff --git a/app/assets/stylesheets/application.css b/app/assets/stylesheets/application.css index 9e02fb871..ddda3d9af 100644 --- a/app/assets/stylesheets/application.css +++ b/app/assets/stylesheets/application.css @@ -1673,14 +1673,14 @@ a.icon:hover svg, a.icon-only:hover svg { stroke: #c61a1a; } -svg.icon-error { - stroke: #f37c60; -} - svg.icon-ok { stroke: #5db651; } +.icon-error svg.icon-svg { + stroke: #c61a1a +} + .icon-warning svg { stroke: #e4bc4b; } @@ -1771,7 +1771,7 @@ span.icon-label { .icon-time-add:not(:has(svg)) { background-image: url(/time_add.png); } .icon-stats:not(:has(svg)) { background-image: url(/stats.png); } .icon-warning:not(:has(svg)) { background-image: url(/warning.png); } -.icon-error:not(svg) { background-image: url(/exclamation.png); } +.icon-error:not(:has(svg)) { background-image: url(/exclamation.png); } .icon-fav:not(:has(svg)) { background-image: url(/fav.png); } .icon-fav-off:not(:has(svg)) { background-image: url(/fav_off.png); } .icon-reload:not(:has(svg)) { background-image: url(/reload.png); } @@ -1791,7 +1791,7 @@ span.icon-label { .icon-email:not(:has(svg)) { background-image: url(/email.png); } .icon-email-disabled:not(:has(svg)) { background-image: url(/email_disabled.png); } .icon-email-add:not(:has(svg)) { background-image: url(/email_add.png); } -.icon-ok:not(svg) { background-image: url(/true.png); } +.icon-ok:not(:has(svg)) { background-image: url(/true.png); } .icon-not-ok:not(svg) { background-image: url(/false.png); } .icon-link-break:not(:has(svg)) { background-image: url(/link_break.png); } .icon-list:not(:has(svg)) { background-image: url(/text_list_bullets.png); } diff --git a/app/helpers/icons_helper.rb b/app/helpers/icons_helper.rb index 7ba87063b..e297d950b 100644 --- a/app/helpers/icons_helper.rb +++ b/app/helpers/icons_helper.rb @@ -57,11 +57,13 @@ module IconsHelper def sprite_icon(icon_name, size: DEFAULT_ICON_SIZE, sprite: DEFAULT_SPRITE, css_class: nil) sprite_path = "#{sprite}.svg" + css_classes = "s#{size} icon-svg" + css_classes += " #{css_class}" unless css_class.nil? content_tag( :svg, content_tag(:use, '', { 'href' => "#{asset_path(sprite_path)}#icon--#{icon_name}" }), - class: "s#{size} icon-svg", + class: css_classes, aria: { hidden: true } diff --git a/app/views/admin/info.html.erb b/app/views/admin/info.html.erb index 197bf5993..23917ef7a 100644 --- a/app/views/admin/info.html.erb +++ b/app/views/admin/info.html.erb @@ -6,7 +6,11 @@ <% @checklist.each do |label, result| %> <tr> <td class="name"><%= label.is_a?(Symbol) ? l(label) : label %></td> - <td class="tick"><%= result ? sprite_icon('checked', css_class: "icon-ok") : sprite_icon('error', css_class: "icon-error") %></td> + <td class="tick"> + <span class="icon-only icon-<%= result ? "ok" : "error" %>"> + <%= result ? sprite_icon('checked') : sprite_icon('warning') %> + </span> + </td> </tr> <% end %> </table> |