| 1 | <% content_for :title, "Sign in" %> |
| 2 | |
| 3 | <div class="min-h-screen bg-surface-900 flex flex-col items-center justify-center px-4 py-16"> |
| 4 | |
| 5 | <div class="mb-10 flex flex-col items-center gap-3"> |
| 6 | <%= link_to root_path, class: "flex items-center gap-3 text-gray-100 hover:text-brand-500 transition-colors" do %> |
| 7 | <img src="/icon.png" alt="siGit" class="h-9 w-auto"> |
| 8 | <span class="text-xl font-semibold tracking-tight">Code & Deploy</span> |
| 9 | <% end %> |
| 10 | <p class="text-sm text-gray-500">Sign in to continue</p> |
| 11 | </div> |
| 12 | |
| 13 | <div class="w-full max-w-sm"> |
| 14 | <div class="border border-surface-500 rounded bg-surface-700 px-8 py-8"> |
| 15 | |
| 16 | <% if flash[:alert].present? %> |
| 17 | <div class="mb-5 flex items-start gap-2.5 rounded border border-red-800/40 bg-red-900/20 px-3.5 py-3 text-sm text-red-400" role="alert"> |
| 18 | <svg class="w-4 h-4 mt-0.5 shrink-0" viewBox="0 0 16 16" fill="currentColor"> |
| 19 | <path d="M8 1a7 7 0 1 1 0 14A7 7 0 0 1 8 1zm0 3.75a.75.75 0 0 0-.75.75v3.5a.75.75 0 0 0 1.5 0v-3.5A.75.75 0 0 0 8 4.75zm0 7.5a.875.875 0 1 0 0-1.75.875.875 0 0 0 0 1.75z"/> |
| 20 | </svg> |
| 21 | <span><%= flash[:alert] %></span> |
| 22 | </div> |
| 23 | <% end %> |
| 24 | |
| 25 | <%= form_tag auth_create_path, method: :post, class: "space-y-5" do %> |
| 26 | |
| 27 | <div> |
| 28 | <label for="email" class="form-label">Email</label> |
| 29 | <input type="email" id="email" name="email" |
| 30 | class="form-input" autocomplete="email" |
| 31 | value="<%= params[:email].to_s %>" |
| 32 | placeholder="you@example.com" |
| 33 | autofocus required> |
| 34 | </div> |
| 35 | |
| 36 | <div> |
| 37 | <div class="flex items-center justify-between mb-1"> |
| 38 | <label for="password" class="form-label mb-0">Password</label> |
| 39 | <%= link_to "Forgot password?", reset_password_path, class: "text-xs text-gray-400 hover:text-gray-200 underline underline-offset-2" %> |
| 40 | </div> |
| 41 | <input type="password" id="password" name="password" |
| 42 | class="form-input" autocomplete="current-password" |
| 43 | required> |
| 44 | </div> |
| 45 | |
| 46 | <button type="submit" class="btn-primary w-full justify-center py-2.5 mt-2"> |
| 47 | Sign in |
| 48 | </button> |
| 49 | |
| 50 | <% end %> |
| 51 | |
| 52 | <%= render "sessions/oauth_buttons" %> |
| 53 | </div> |
| 54 | |
| 55 | <p class="mt-6 text-center text-xs text-gray-500"> |
| 56 | No account? |
| 57 | <%= link_to "Create one", signup_path, class: "text-gray-400 hover:text-gray-200 underline underline-offset-2" %> |
| 58 | </p> |
| 59 | |
| 60 | <p class="mt-3 text-center text-xs text-gray-500"> |
| 61 | Didn't get a confirmation email? |
| 62 | <%= link_to "Resend it", resend_confirmation_path, class: "text-gray-400 hover:text-gray-200 underline underline-offset-2" %> |
| 63 | </p> |
| 64 | </div> |
| 65 | |
| 66 | </div> |