]> git.openstreetmap.org Git - rails.git/commitdiff
OpenID connect icons to SVG
authorHidde Wieringa <hidde@hiddewieringa.nl>
Tue, 14 May 2024 17:54:52 +0000 (19:54 +0200)
committerHidde Wieringa <hidde@hiddewieringa.nl>
Thu, 16 May 2024 19:16:28 +0000 (21:16 +0200)
re-add whitespace

trigger CI

revert size attribute

app/assets/images/openid.svg [new file with mode: 0644]
app/assets/images/openid_small.png [deleted file]
app/helpers/user_helper.rb
test/helpers/user_helper_test.rb

diff --git a/app/assets/images/openid.svg b/app/assets/images/openid.svg
new file mode 100644 (file)
index 0000000..d4de589
--- /dev/null
@@ -0,0 +1,5 @@
+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48" width="48px" height="48px">
+  <path fill="#9E9E9E" d="M44,27l-1-9l-2.9,1.9c-2.7-1.7-6.1-2.9-9.9-3.5c0,0-1.9-0.4-4.4-0.4s-4.8,0.3-4.8,0.3C11.3,17.5,4,23,4,29.6C4,36.4,11.5,42,23,43v-3.9c-7.9-1.1-12.9-4.8-12.9-9.5c0-4.4,4.6-8.1,10.9-9.3c0,0,4.9-1.1,9.2,0.2c2.1,0.5,4,1.2,5.6,2.2L32,25L44,27z"/>
+  <path d="M23 8L23 43 29 40 29 5z"/>
+  <path fill="#FF9800" d="M23 8L23 43 29 40 29 5z"/>
+</svg>
diff --git a/app/assets/images/openid_small.png b/app/assets/images/openid_small.png
deleted file mode 100644 (file)
index 41adc9f..0000000
Binary files a/app/assets/images/openid_small.png and /dev/null differ
index 536f2620e02df11c20004b7e0320954201ea38ad..20e8a2292dcc4b24450b4391cce0c0199fc0b2fd 100644 (file)
@@ -53,7 +53,7 @@ module UserHelper
   # External authentication support
 
   def openid_logo
-    image_tag "openid_small.png", :alt => t("application.auth_providers.openid_logo_alt"), :class => "align-text-bottom"
+    image_tag "openid.svg", :size => "24", :alt => t("application.auth_providers.openid_logo_alt"), :class => "align-text-bottom"
   end
 
   def auth_button(name, provider, options = {})
index c2883c2c09e4dffd85e51120e8852c793ec039ed..3cd53e16996a87bbe17d070d8de7c7908f2ddf22 100644 (file)
@@ -111,7 +111,7 @@ class UserHelperTest < ActionView::TestCase
 
   def test_openid_logo
     logo = openid_logo
-    assert_match %r{^<img .* src="/images/openid_small.png" />$}, logo
+    assert_match %r{^<img .* src="/images/openid.svg" .* />$}, logo
   end
 
   def test_auth_button