sample_rails_tailwind/app/views/sessions/new.html.erb
songtianlun 87e0c2eec6 feat: add theme switching and toast notifications
- Implement theme switching functionality with a new ThemeController
- Add ToastController for displaying notifications
- Update various views for improved layout and styling
- Introduce animations for toast notifications

These changes enhance the user experience by allowing users to switch between light and dark themes and receive feedback through toast notifications. The UI has been improved for better accessibility and aesthetics.
2025-01-17 15:02:25 +08:00

46 lines
1.5 KiB
Plaintext

<% provide(:title, "Log in") %>
<div class ="container mx-auto px-4">
<h1 class="text-3xl font-bold text-center my-8">Log in</h1>
<div class="max-w-md mx-auto">
<%= form_with(url: login_path, scope: :session, local: true, class: "space-y-4") do |f| %>
<div class="form-control">
<%= f.label :email, class: "label" do %>
<span class="label-text">Email</span>
<% end %>
<%= f.email_field :email, class: "input input-bordered w-full" %>
</div>
<div class="form-control">
<div class="flex justify-between items-center">
<%= f.label :password, class: "label" do %>
<span class="label-text">Password</span>
<% end %>
<%= link_to "(forgot password)", new_password_reset_path,
class: "text-sm text-primary hover:text-primary-focus" %>
</div>
<%= f.password_field :password, class: "input input-bordered w-full" %>
</div>
<div class="form-control">
<label class="label cursor-pointer">
<%= f.check_box :remember_me, class: "checkbox checkbox-primary" %>
<span class="label-text ml-2">Remember me on this computer</span>
</label>
</div>
<div class="form-control mt-6">
<%= f.submit "Log in", class: "btn btn-primary w-full" %>
</div>
<% end %>
<div class="text-center mt-6">
<p>New user?
<%= link_to "Sign up now!", signup_path,
class: "text-primary hover:text-primary-focus" %>
</p>
</div>
</div>
</div>