]> git.openstreetmap.org Git - rails.git/blob - app/views/application/_auth_button.html.erb
Replace auth_button helper with template
[rails.git] / app / views / application / _auth_button.html.erb
1 <%# locals: (provider:, preferred: false) %>
2 <%= link_to auth_path(:provider => provider),
3             :method => :post,
4             :class => ["auth_button btn btn-outline-secondary border p-2", { "px-4 d-flex gap-3 justify-content-center align-items-center" => preferred }],
5             :title => t("application.auth_providers.#{provider}.title") do %>
6   <%= inline_svg_tag "auth_providers/#{provider}.svg",
7                      :class => "rounded-1 text-body-emphasis",
8                      :size => "36" %>
9   <% if preferred %>
10     <%= t "application.auth_providers.#{provider}.title" %>
11   <% end %>
12 <% end %>