Skip to content

Commit 6116343

Browse files
committed
Alerts and notices look better above the heading
1 parent dfafa4c commit 6116343

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

lib/generators/tailwindcss/authentication/templates/views/passwords/edit.html.erb

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
<div class="mx-auto md:w-2/3 w-full">
2-
<h1 class="font-bold text-4xl">Update your password</h1>
3-
42
<%% if alert = flash[:alert] %>
53
<p class="py-2 px-3 bg-red-50 mb-5 text-red-500 font-medium rounded-lg inline-block" id="alert"><%%= alert %></p>
64
<%% end %>
75

6+
<h1 class="font-bold text-4xl">Update your password</h1>
7+
88
<%%= form_with url: password_path(params[:token]), method: :put, class: "contents" do |form| %>
99
<div class="my-5">
1010
<%%= form.password_field :password, required: true, autocomplete: "new-password", placeholder: "Enter new password", maxlength: 72, class: "block shadow rounded-md border border-gray-400 outline-none px-3 py-2 mt-2 w-full" %>

lib/generators/tailwindcss/authentication/templates/views/passwords/new.html.erb

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
<div class="mx-auto md:w-2/3 w-full">
2-
<h1 class="font-bold text-4xl">Forgot your password?</h1>
3-
42
<%% if alert = flash[:alert] %>
53
<p class="py-2 px-3 bg-red-50 mb-5 text-red-500 font-medium rounded-lg inline-block" id="alert"><%%= alert %></p>
64
<%% end %>
75

6+
<h1 class="font-bold text-4xl">Forgot your password?</h1>
7+
88
<%%= form_with url: passwords_path, class: "contents" do |form| %>
99
<div class="my-5">
1010
<%%= form.email_field :email_address, required: true, autofocus: true, autocomplete: "username", placeholder: "Enter your email address", value: params[:email_address], class: "block shadow rounded-md border border-gray-400 outline-none px-3 py-2 mt-2 w-full" %>

lib/generators/tailwindcss/authentication/templates/views/sessions/new.html.erb

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
<div class="mx-auto md:w-2/3 w-full">
2-
<h1 class="font-bold text-4xl">Sign in</h1>
3-
42
<%% if alert = flash[:alert] %>
53
<p class="py-2 px-3 bg-red-50 mb-5 text-red-500 font-medium rounded-lg inline-block" id="alert"><%%= alert %></p>
64
<%% end %>
@@ -9,6 +7,8 @@
97
<p class="py-2 px-3 bg-green-50 mb-5 text-green-500 font-medium rounded-lg inline-block" id="notice"><%%= notice %></p>
108
<%% end %>
119

10+
<h1 class="font-bold text-4xl">Sign in</h1>
11+
1212
<%%= form_with url: session_url, class: "contents" do |form| %>
1313
<div class="my-5">
1414
<%%= form.email_field :email_address, required: true, autofocus: true, autocomplete: "username", placeholder: "Enter your email address", value: params[:email_address], class: "block shadow rounded-md border border-gray-400 outline-none px-3 py-2 mt-2 w-full" %>

0 commit comments

Comments
 (0)