today_ai_weather/app/views/devise/registrations/new.html.erb
songtianlun cba76e718f feat: enhance user registration UI and navigation
- Improve the user registration form layout with card styling.
- Add input classes for better design consistency.
- Introduce a new navbar partial for better component management.
- Removed the old navbar code to streamline application layout.

These changes provide a more modern and user-friendly experience during
user registration and improve the overall site's navigation structure.
2025-02-11 15:28:42 +08:00

51 lines
2.0 KiB
Plaintext

<div class="min-h-screen flex flex-col items-center justify-center px-4">
<div class="card w-full max-w-md bg-base-100 shadow-xl">
<div class="card-body">
<h2 class="card-title text-2xl font-bold text-center mb-6">Sign up</h2>
<%= form_for(resource, as: resource_name, url: registration_path(resource_name), html: { class: "space-y-4" }) do |f| %>
<%= render "devise/shared/error_messages", resource: resource %>
<div class="form-control">
<%= f.label :email, class: "label" %>
<%= f.email_field :email,
autofocus: true,
autocomplete: "email",
class: "input input-bordered w-full",
placeholder: "your@email.com" %>
</div>
<div class="form-control">
<%= f.label :password, class: "label" do %>
<span class="label-text">Password</span>
<% if @minimum_password_length %>
<span class="label-text-alt">(<%= @minimum_password_length %> characters minimum)</span>
<% end %>
<% end %>
<%= f.password_field :password,
autocomplete: "new-password",
class: "input input-bordered w-full",
placeholder: "••••••••" %>
</div>
<div class="form-control">
<%= f.label :password_confirmation, class: "label" %>
<%= f.password_field :password_confirmation,
autocomplete: "new-password",
class: "input input-bordered w-full",
placeholder: "••••••••" %>
</div>
<div class="form-control mt-6">
<%= f.submit "Sign up", class: "btn btn-primary w-full" %>
</div>
<% end %>
<div class="divider">OR</div>
<div class="text-center space-y-2">
<%= render "devise/shared/links" %>
</div>
</div>
</div>
</div>