<% if alert = flash[:alert] %>

<%= alert %>

<% end %> <% if notice = flash[:notice] %>

<%= notice %>

<% end %> <% if @show_registration %>

🚀 First Time Setup

No administrator account exists yet. Create the first administrator account to get started with Baffle Hub.

<%= link_to "Create Administrator Account", new_registration_path, class: "inline-block rounded-md px-4 py-2 bg-green-600 hover:bg-green-500 text-white font-medium" %>
or
<% end %>

Sign in

<% if @show_oidc_login && !@show_registration %>
<%= button_to "Sign in with #{@oidc_provider_name}", "/auth/oidc", method: :post, data: { turbo: false }, class: "w-full block text-center rounded-md px-3.5 py-2.5 bg-indigo-600 hover:bg-indigo-500 text-white font-medium cursor-pointer border-0" %>
or
<% end %> <%= form_with url: session_url, class: "contents" do |form| %>
<%= form.email_field :email_address, required: true, autofocus: true, autocomplete: "username", placeholder: "Enter your email address", value: params[:email_address], class: "block shadow-sm rounded-md border border-gray-400 focus:outline-blue-600 px-3 py-2 mt-2 w-full" %>
<%= form.password_field :password, required: true, autocomplete: "current-password", placeholder: "Enter your password", maxlength: 72, class: "block shadow-sm rounded-md border border-gray-400 focus:outline-blue-600 px-3 py-2 mt-2 w-full" %>
<%= form.submit "Sign in", class: "w-full sm:w-auto text-center rounded-md px-3.5 py-2.5 bg-blue-600 hover:bg-blue-500 text-white inline-block font-medium cursor-pointer" %>
<%= link_to "Forgot password?", new_password_path, class: "text-gray-700 underline hover:no-underline" %>
<% end %>