Use official "Log in to Microsoft" icon
Downloaded from https://learn.microsoft.com/en-us/entra/identity-platform/howto-add-branding-in-apps on 2024-03-15.
This commit is contained in:
parent
3b143dc2b4
commit
518f55c191
4 changed files with 15 additions and 4 deletions
|
@ -1 +1 @@
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" width="36" height="36" viewBox="0 0 36 36"><defs><style>.a{fill:#575352;}.b{fill:#f25022;}.c{fill:#7fba00;}.d{fill:#00a4ef;}.e{fill:#ffb900;}</style></defs><rect class="a" width="36" height="36"/><rect class="b" x="4" y="3.99" width="13.31" height="13.31"/><rect class="c" x="18.69" y="3.99" width="13.31" height="13.31"/><rect class="d" x="4" y="18.69" width="13.31" height="13.3"/><rect class="e" x="18.69" y="18.69" width="13.31" height="13.3"/></svg>
|
<svg xmlns="http://www.w3.org/2000/svg" width="21" height="21" viewBox="0 0 21 21"><title>MS-SymbolLockup</title><rect x="1" y="1" width="9" height="9" fill="#f25022"/><rect x="1" y="11" width="9" height="9" fill="#00a4ef"/><rect x="11" y="1" width="9" height="9" fill="#7fba00"/><rect x="11" y="11" width="9" height="9" fill="#ffb900"/></svg>
|
Before Width: | Height: | Size: 494 B After Width: | Height: | Size: 343 B |
|
@ -58,7 +58,10 @@ module UserHelper
|
||||||
|
|
||||||
def auth_button(name, provider, options = {})
|
def auth_button(name, provider, options = {})
|
||||||
link_to(
|
link_to(
|
||||||
image_tag("#{name}.svg", :alt => t("sessions.new.auth_providers.#{name}.alt"), :class => "rounded-3"),
|
image_tag("#{name}.svg",
|
||||||
|
:alt => t("sessions.new.auth_providers.#{name}.alt"),
|
||||||
|
:class => "rounded-3",
|
||||||
|
:size => "36"),
|
||||||
auth_path(options.merge(:provider => provider)),
|
auth_path(options.merge(:provider => provider)),
|
||||||
:method => :post,
|
:method => :post,
|
||||||
:class => "auth_button",
|
:class => "auth_button",
|
||||||
|
|
|
@ -28,7 +28,15 @@
|
||||||
<label class="form-label"><%= t ".with external" %></label>
|
<label class="form-label"><%= t ".with external" %></label>
|
||||||
|
|
||||||
<ul class='list-inline' id="login_auth_buttons">
|
<ul class='list-inline' id="login_auth_buttons">
|
||||||
<li class="list-inline-item me-3"><%= link_to image_tag("openid.png", :alt => t(".auth_providers.openid.title")), "#", :id => "openid_open_url", :title => t(".auth_providers.openid.title") %></li>
|
<li class="list-inline-item me-3">
|
||||||
|
<%= link_to image_tag("openid.png",
|
||||||
|
:alt => t(".auth_providers.openid.title"),
|
||||||
|
:size => "36"),
|
||||||
|
"#",
|
||||||
|
:id => "openid_open_url",
|
||||||
|
:title => t(".auth_providers.openid.title") %>
|
||||||
|
</li>
|
||||||
|
|
||||||
<% %w[google facebook microsoft github wikipedia].each do |provider| %>
|
<% %w[google facebook microsoft github wikipedia].each do |provider| %>
|
||||||
<% if Settings.key?("#{provider}_auth_id".to_sym) -%>
|
<% if Settings.key?("#{provider}_auth_id".to_sym) -%>
|
||||||
<li class="list-inline-item me-3"><%= auth_button provider, provider %></li>
|
<li class="list-inline-item me-3"><%= auth_button provider, provider %></li>
|
||||||
|
|
|
@ -116,7 +116,7 @@ class UserHelperTest < ActionView::TestCase
|
||||||
|
|
||||||
def test_auth_button
|
def test_auth_button
|
||||||
button = auth_button("google", "google")
|
button = auth_button("google", "google")
|
||||||
img_tag = "<img alt=\"Log in with a Google OpenID\" class=\"rounded-3\" src=\"/images/google.svg\" />"
|
img_tag = "<img alt=\"Log in with a Google OpenID\" class=\"rounded-3\" src=\"/images/google.svg\" width=\"36\" height=\"36\" />"
|
||||||
assert_equal("<a class=\"auth_button\" title=\"Log in with Google\" rel=\"nofollow\" data-method=\"post\" href=\"/auth/google\">#{img_tag}</a>", button)
|
assert_equal("<a class=\"auth_button\" title=\"Log in with Google\" rel=\"nofollow\" data-method=\"post\" href=\"/auth/google\">#{img_tag}</a>", button)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue