main
erb 71 lines 2.72 KB
Raw
1 <% content_for :title, "Create account" %>
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 &amp; Deploy</span>
9 <% end %>
10 <p class="text-sm text-gray-500">Create your account</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 signup_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"
31 autocomplete="email"
32 value="<%= params[:email].to_s %>"
33 placeholder="you@example.com"
34 autofocus required>
35 </div>
36
37 <div>
38 <label for="password" class="form-label">Password</label>
39 <input type="password" id="password" name="password"
40 class="form-input"
41 autocomplete="new-password"
42 minlength="8"
43 placeholder="At least 8 characters"
44 required>
45 </div>
46
47 <div>
48 <label for="password_confirmation" class="form-label">Confirm password</label>
49 <input type="password" id="password_confirmation" name="password_confirmation"
50 class="form-input"
51 autocomplete="new-password"
52 placeholder="Same password again"
53 required>
54 </div>
55
56 <button type="submit" class="btn-primary w-full justify-center py-2.5 mt-2">
57 Create account
58 </button>
59
60 <% end %>
61
62 <%= render "sessions/oauth_buttons" %>
63 </div>
64
65 <p class="mt-6 text-center text-xs text-gray-500">
66 Already have an account?
67 <%= link_to "Sign in", signin_path, class: "text-gray-400 hover:text-gray-200 underline underline-offset-2" %>
68 </p>
69 </div>
70
71 </div>