tailwindcss-rails 3.0.0 → 3.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a5c715119cb263746cfdab2913891b82d7a63f04195c4245d2d20bc49b3391f3
4
- data.tar.gz: f4af87ff266042199d3636538ebc31d24107908b9d49450d51d2d23fef231d19
3
+ metadata.gz: 8ed443928edcf525c0f23ef68477bca7305c5d1f700b0b19e50caa1912aefbcb
4
+ data.tar.gz: 1538e3660060124de8677a827a36d1609c3d83e26cd6992f1fc86b9d9c056a1a
5
5
  SHA512:
6
- metadata.gz: e3dd3c2781869d7b8d7eba4a0bc7f71f431a890bc5686eec2580f17698c25de4e76c009b97f601775b82feb56621dc14ec454784275f2d80e5fbd8edb901d87c
7
- data.tar.gz: b6777aaa6a4211e289d2d55f439bd1b3dec33ed6f87b2617c970fdc1da15d20edeb4bd66e8454c221bb9ae73869ac9f98e527230183f94fd2608a38777e034d3
6
+ metadata.gz: c5450e732306e39d5946b281183607baf68e322bd607310e0084aec8719e916ce378c53c6fe82f0d9959c7bb476511d61daf84a758355b44230e5e75137c9a72
7
+ data.tar.gz: 19ef39ff0bbe242e1e2156639bf7e22c67a1d2e86dfab3b0aba74d2365693e72652e74e1ceadab955225fb1edf5b5f5abf8077c63f2013b3f64c9b42f200a877
data/README.md CHANGED
@@ -151,7 +151,7 @@ Running `bin/dev` invokes Foreman to start both the Tailwind watch process and t
151
151
 
152
152
  ### Using with PostCSS
153
153
 
154
- If you want to use PostCSS as a preprocessor, create a custom `config/postcss.config.js` and it will be loaded automatically.
154
+ If you want to use PostCSS as a preprocessor, create a custom `config/postcss.config.js` and that file will be loaded by tailwind automatically.
155
155
 
156
156
  For example, to enable nesting:
157
157
 
@@ -167,6 +167,25 @@ module.exports = {
167
167
  }
168
168
  ```
169
169
 
170
+ ⚠ Note that PostCSS is a javascript tool with its own prerequisites! By default `tailwindcss-rails` does not require any javascript tooling, so in order to use PostCSS, a `package.json` with dependencies for your plugins and a package manager like `yarn` or `npm` is required, for example:
171
+
172
+ ```json
173
+ // package.json
174
+ {
175
+ "name": "my app",
176
+ "private": true,
177
+ "dependencies": {
178
+ "postcss-advanced-variables": "^4.0.0",
179
+ "postcss-import": "^16.0.1",
180
+ "postcss-mixins": "^9.0.4",
181
+ "tailwindcss": "^3.4.1"
182
+ }
183
+ }
184
+ ```
185
+
186
+ Then you can use yarn or npm to install the dependencies.
187
+
188
+
170
189
  ### Custom inputs or outputs
171
190
 
172
191
  If you need to use a custom input or output file, you can run `bundle exec tailwindcss` to access the platform-specific executable, and give it your own build options.
@@ -7,15 +7,15 @@
7
7
 
8
8
  <%%= form_with url: password_path(params[:token]), method: :put, class: "contents" do |form| %>
9
9
  <div class="my-5">
10
- <%%= 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" %>
10
+ <%%= 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 focus:outline-blue-600 px-3 py-2 mt-2 w-full" %>
11
11
  </div>
12
12
 
13
13
  <div class="my-5">
14
- <%%= form.password_field :password_confirmation, required: true, autocomplete: "new-password", placeholder: "Repeat new password", maxlength: 72, class: "block shadow rounded-md border border-gray-400 outline-none px-3 py-2 mt-2 w-full" %>
14
+ <%%= form.password_field :password_confirmation, required: true, autocomplete: "new-password", placeholder: "Repeat new password", maxlength: 72, class: "block shadow rounded-md border border-gray-400 outline-none focus:outline-blue-600 px-3 py-2 mt-2 w-full" %>
15
15
  </div>
16
16
 
17
17
  <div class="inline">
18
- <%%= form.submit "Save", class: "rounded-lg py-3 px-5 bg-blue-600 text-white inline-block font-medium cursor-pointer" %>
18
+ <%%= form.submit "Save", class: "rounded-md px-3.5 py-2.5 bg-blue-600 hover:bg-blue-500 text-white inline-block font-medium cursor-pointer" %>
19
19
  </div>
20
20
  <%% end %>
21
21
  </div>
@@ -7,11 +7,11 @@
7
7
 
8
8
  <%%= form_with url: passwords_path, class: "contents" do |form| %>
9
9
  <div class="my-5">
10
- <%%= 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" %>
10
+ <%%= 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 focus:outline-blue-600 px-3 py-2 mt-2 w-full" %>
11
11
  </div>
12
12
 
13
13
  <div class="inline">
14
- <%%= form.submit "Email reset instructions", class: "rounded-lg py-3 px-5 bg-blue-600 text-white inline-block font-medium cursor-pointer" %>
14
+ <%%= form.submit "Email reset instructions", class: "rounded-lg px-3.5 py-2.5 bg-blue-600 hover:bg-blue-500 text-white inline-block font-medium cursor-pointer" %>
15
15
  </div>
16
16
  <%% end %>
17
17
  </div>
@@ -11,20 +11,20 @@
11
11
 
12
12
  <%%= form_with url: session_url, class: "contents" do |form| %>
13
13
  <div class="my-5">
14
- <%%= 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" %>
14
+ <%%= 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 focus:outline-blue-600 px-3 py-2 mt-2 w-full" %>
15
15
  </div>
16
16
 
17
17
  <div class="my-5">
18
- <%%= form.password_field :password, required: true, autocomplete: "current-password", placeholder: "Enter your password", maxlength: 72, class: "block shadow rounded-md border border-gray-400 outline-none px-3 py-2 mt-2 w-full" %>
18
+ <%%= form.password_field :password, required: true, autocomplete: "current-password", placeholder: "Enter your password", maxlength: 72, class: "block shadow rounded-md border border-gray-400 focus:outline-blue-600 px-3 py-2 mt-2 w-full" %>
19
19
  </div>
20
20
 
21
21
  <div class="col-span-6 sm:flex sm:items-center sm:gap-4">
22
22
  <div class="inline">
23
- <%%= form.submit "Sign in", class: "rounded-lg py-3 px-5 bg-blue-600 text-white inline-block font-medium cursor-pointer" %>
23
+ <%%= form.submit "Sign in", class: "rounded-md px-3.5 py-2.5 bg-blue-600 hover:bg-blue-500 text-white inline-block font-medium cursor-pointer" %>
24
24
  </div>
25
25
 
26
26
  <div class="mt-4 text-sm text-gray-500 sm:mt-0">
27
- <%%= link_to "Forgot password?", new_password_path, class: "text-gray-700 underline" %>
27
+ <%%= link_to "Forgot password?", new_password_path, class: "text-gray-700 underline hover:no-underline" %>
28
28
  </div>
29
29
  </div>
30
30
  <%% end %>
@@ -1,9 +1,9 @@
1
1
  <%%= form_with(model: <%= model_resource_name %>, class: "contents") do |form| %>
2
2
  <%% if <%= singular_table_name %>.errors.any? %>
3
- <div id="error_explanation" class="bg-red-50 text-red-500 px-3 py-2 font-medium rounded-lg mt-3">
3
+ <div id="error_explanation" class="bg-red-50 text-red-500 px-3 py-2 font-medium rounded-md mt-3">
4
4
  <h2><%%= pluralize(<%= singular_table_name %>.errors.count, "error") %> prohibited this <%= singular_table_name %> from being saved:</h2>
5
5
 
6
- <ul>
6
+ <ul class="list-disc ml-6">
7
7
  <%% <%= singular_table_name %>.errors.each do |error| %>
8
8
  <li><%%= error.full_message %></li>
9
9
  <%% end %>
@@ -15,29 +15,29 @@
15
15
  <div class="my-5">
16
16
  <% if attribute.password_digest? -%>
17
17
  <%%= form.label :password %>
18
- <%%= form.password_field :password, class: "block shadow rounded-md border border-gray-400 outline-none px-3 py-2 mt-2 w-full" %>
19
- </div>
18
+ <%%= form.password_field :password, class: ["block shadow rounded-md border outline-none px-3 py-2 mt-2 w-full", {"border-gray-400 focus:outline-blue-600": <%= model_resource_name %>.errors[:password].none?, "border-red-400 focus:outline-red-600": <%= model_resource_name %>.errors[:password].any?}] %>
19
+ </div>
20
20
 
21
- <div class="my-5">
21
+ <div class="my-5">
22
22
  <%%= form.label :password_confirmation %>
23
- <%%= form.password_field :password_confirmation, class: "block shadow rounded-md border border-gray-400 outline-none px-3 py-2 mt-2 w-full" %>
23
+ <%%= form.password_field :password_confirmation, class: ["block shadow rounded-md border outline-none px-3 py-2 mt-2 w-full", {"border-gray-400 focus:outline-blue-600": <%= model_resource_name %>.errors[:password_confirmation].none?, "border-red-400 focus:outline-red-600": <%= model_resource_name %>.errors[:password_confirmation].any?}] %>
24
24
  <% elsif attribute.attachments? -%>
25
25
  <%%= form.label :<%= attribute.column_name %> %>
26
- <%%= form.<%= attribute.field_type %> :<%= attribute.column_name %>, multiple: true, class: "block shadow rounded-md border border-gray-400 outline-none px-3 py-2 mt-2 w-full" %>
26
+ <%%= form.<%= attribute.field_type %> :<%= attribute.column_name %>, multiple: true, class: ["block shadow rounded-md border outline-none px-3 py-2 mt-2 w-full", {"border-gray-400 focus:outline-blue-600": <%= model_resource_name %>.errors[:password].none?, "border-red-400 focus:outline-red-600": <%= model_resource_name %>.errors[:password].any?}] %>
27
27
  <% else -%>
28
28
  <%%= form.label :<%= attribute.column_name %> %>
29
29
  <% if attribute.field_type == :textarea || attribute.field_type == :text_area -%>
30
- <%%= form.<%= attribute.field_type %> :<%= attribute.column_name %>, rows: 4, class: "block shadow rounded-md border border-gray-400 outline-none px-3 py-2 mt-2 w-full" %>
30
+ <%%= form.<%= attribute.field_type %> :<%= attribute.column_name %>, rows: 4, class: ["block shadow rounded-md border outline-none px-3 py-2 mt-2 w-full", {"border-gray-400 focus:outline-blue-600": <%= model_resource_name %>.errors[:<%= attribute.column_name %>].none?, "border-red-400 focus:outline-red-600": <%= model_resource_name %>.errors[:<%= attribute.column_name %>].any?}] %>
31
31
  <% elsif attribute.field_type == :checkbox || attribute.field_type == :check_box -%>
32
- <%%= form.<%= attribute.field_type %> :<%= attribute.column_name %>, class: "block mt-2 h-5 w-5" %>
32
+ <%%= form.<%= attribute.field_type %> :<%= attribute.column_name %>, class: ["block shadow rounded-md border outline-none mt-2 h-5 w-5", {"border-gray-400 focus:outline-blue-600": <%= model_resource_name %>.errors[:<%= attribute.column_name %>].none?, "border-red-400 focus:outline-red-600": <%= model_resource_name %>.errors[:<%= attribute.column_name %>].any?}] %>
33
33
  <% else -%>
34
- <%%= form.<%= attribute.field_type %> :<%= attribute.column_name %>, class: "block shadow rounded-md border border-gray-400 outline-none px-3 py-2 mt-2 w-full" %>
34
+ <%%= form.<%= attribute.field_type %> :<%= attribute.column_name %>, class: ["block shadow rounded-md border outline-none px-3 py-2 mt-2 w-full", {"border-gray-400 focus:outline-blue-600": <%= model_resource_name %>.errors[:<%= attribute.column_name %>].none?, "border-red-400 focus:outline-red-600": <%= model_resource_name %>.errors[:<%= attribute.column_name %>].any?}] %>
35
35
  <% end -%>
36
36
  <% end -%>
37
37
  </div>
38
38
 
39
39
  <% end -%>
40
40
  <div class="inline">
41
- <%%= form.submit class: "rounded-lg py-3 px-5 bg-blue-600 text-white inline-block font-medium cursor-pointer" %>
41
+ <%%= form.submit class: "rounded-md px-3.5 py-2.5 bg-blue-600 hover:bg-blue-500 text-white inline-block font-medium cursor-pointer" %>
42
42
  </div>
43
43
  <%% end %>
@@ -1,8 +1,10 @@
1
- <div class="mx-auto md:w-2/3 w-full">
1
+ <%% content_for :title, "Editing <%= human_name.downcase %>" %>
2
+
3
+ <div class="md:w-2/3 w-full">
2
4
  <h1 class="font-bold text-4xl">Editing <%= human_name.downcase %></h1>
3
5
 
4
6
  <%%= render "form", <%= singular_table_name %>: @<%= singular_table_name %> %>
5
7
 
6
- <%%= link_to "Show this <%= human_name.downcase %>", <%= model_resource_name(prefix: "@") %>, class: "ml-2 rounded-lg py-3 px-5 bg-gray-100 inline-block font-medium" %>
7
- <%%= link_to "Back to <%= human_name.pluralize.downcase %>", <%= index_helper(type: :path) %>, class: "ml-2 rounded-lg py-3 px-5 bg-gray-100 inline-block font-medium" %>
8
+ <%%= link_to "Show this <%= human_name.downcase %>", <%= model_resource_name(prefix: "@") %>, class: "ml-2 rounded-md px-3.5 py-2.5 bg-gray-100 hover:bg-gray-50 inline-block font-medium" %>
9
+ <%%= link_to "Back to <%= human_name.pluralize.downcase %>", <%= index_helper(type: :path) %>, class: "ml-2 rounded-md px-3.5 py-2.5 bg-gray-100 hover:bg-gray-50 inline-block font-medium" %>
8
10
  </div>
@@ -1,21 +1,25 @@
1
+ <%% content_for :title, "<%= human_name.pluralize %>" %>
2
+
1
3
  <div class="w-full">
2
4
  <%% if notice.present? %>
3
- <p class="py-2 px-3 bg-green-50 mb-5 text-green-500 font-medium rounded-lg inline-block" id="notice"><%%= notice %></p>
5
+ <p class="py-2 px-3 bg-green-50 mb-5 text-green-500 font-medium rounded-md inline-block" id="notice"><%%= notice %></p>
4
6
  <%% end %>
5
7
 
6
- <%% content_for :title, "<%= human_name.pluralize %>" %>
7
-
8
8
  <div class="flex justify-between items-center">
9
9
  <h1 class="font-bold text-4xl"><%= human_name.pluralize %></h1>
10
- <%%= link_to "New <%= human_name.downcase %>", new_<%= singular_route_name %>_path, class: "rounded-lg py-3 px-5 bg-blue-600 text-white block font-medium" %>
10
+ <%%= link_to "New <%= human_name.downcase %>", new_<%= singular_route_name %>_path, class: "rounded-md px-3.5 py-2.5 bg-blue-600 hover:bg-blue-500 text-white block font-medium" %>
11
11
  </div>
12
12
 
13
13
  <div id="<%= plural_table_name %>" class="min-w-full">
14
- <%% @<%= plural_table_name %>.each do |<%= singular_table_name %>| %>
15
- <%%= render <%= singular_table_name %> %>
16
- <p>
17
- <%%= link_to "Show this <%= human_name.downcase %>", <%= model_resource_name(singular_table_name) %>, class: "ml-2 rounded-lg py-3 px-5 bg-gray-100 inline-block font-medium" %>
18
- </p>
14
+ <%% if @<%= plural_table_name %>.any? %>
15
+ <%% @<%= plural_table_name %>.each do |<%= singular_table_name %>| %>
16
+ <%%= render <%= singular_table_name %> %>
17
+ <p>
18
+ <%%= link_to "Show this <%= human_name.downcase %>", <%= model_resource_name(singular_table_name) %>, class: "ml-2 rounded-md px-3.5 py-2.5 bg-gray-100 hover:bg-gray-50 inline-block font-medium" %>
19
+ </p>
20
+ <%% end %>
21
+ <%% else %>
22
+ <p class="text-center my-10">No <%= human_name.downcase.pluralize %> found.</p>
19
23
  <%% end %>
20
24
  </div>
21
25
  </div>
@@ -1,7 +1,9 @@
1
- <div class="mx-auto md:w-2/3 w-full">
1
+ <%% content_for :title, "New <%= human_name.downcase %>" %>
2
+
3
+ <div class="md:w-2/3 w-full">
2
4
  <h1 class="font-bold text-4xl">New <%= human_name.downcase %></h1>
3
5
 
4
6
  <%%= render "form", <%= singular_table_name %>: @<%= singular_table_name %> %>
5
7
 
6
- <%%= link_to "Back to <%= human_name.pluralize.downcase %>", <%= index_helper(type: :path) %>, class: "ml-2 rounded-lg py-3 px-5 bg-gray-100 inline-block font-medium" %>
8
+ <%%= link_to "Back to <%= human_name.pluralize.downcase %>", <%= index_helper(type: :path) %>, class: "ml-2 rounded-md px-3.5 py-2.5 bg-gray-100 hover:bg-gray-50 inline-block font-medium" %>
7
9
  </div>
@@ -12,6 +12,5 @@
12
12
  <%%= <%= singular_name %>.<%= attribute.column_name %> %>
13
13
  <% end -%>
14
14
  </p>
15
-
16
15
  <% end -%>
17
16
  </div>
@@ -1,15 +1,17 @@
1
- <div class="mx-auto md:w-2/3 w-full flex">
2
- <div class="mx-auto">
3
- <%% if notice.present? %>
4
- <p class="py-2 px-3 bg-green-50 mb-5 text-green-500 font-medium rounded-lg inline-block" id="notice"><%%= notice %></p>
5
- <%% end %>
6
-
7
- <%%= render @<%= singular_table_name %> %>
8
-
9
- <%%= link_to "Edit this <%= human_name.downcase %>", <%= edit_helper(type: :path) %>, class: "mt-2 rounded-lg py-3 px-5 bg-gray-100 inline-block font-medium" %>
10
- <%%= link_to "Back to <%= human_name.pluralize.downcase %>", <%= index_helper %>_path, class: "ml-2 rounded-lg py-3 px-5 bg-gray-100 inline-block font-medium" %>
11
- <div class="inline-block ml-2">
12
- <%%= button_to "Destroy this <%= human_name.downcase %>", <%= model_resource_name(prefix: "@") %>, method: :delete, class: "mt-2 rounded-lg py-3 px-5 bg-gray-100 font-medium" %>
13
- </div>
1
+ <%% content_for :title, "Showing <%= human_name.downcase %>" %>
2
+
3
+ <div class="md:w-2/3 w-full">
4
+ <%% if notice.present? %>
5
+ <p class="py-2 px-3 bg-green-50 mb-5 text-green-500 font-medium rounded-md inline-block" id="notice"><%%= notice %></p>
6
+ <%% end %>
7
+
8
+ <h1 class="font-bold text-4xl">Showing <%= human_name.downcase %></h1>
9
+
10
+ <%%= render @<%= singular_table_name %> %>
11
+
12
+ <%%= link_to "Edit this <%= human_name.downcase %>", <%= edit_helper(type: :path) %>, class: "mt-2 rounded-md px-3.5 py-2.5 bg-gray-100 hover:bg-gray-50 inline-block font-medium" %>
13
+ <%%= link_to "Back to <%= human_name.pluralize.downcase %>", <%= index_helper %>_path, class: "ml-2 rounded-md px-3.5 py-2.5 bg-gray-100 hover:bg-gray-50 inline-block font-medium" %>
14
+ <div class="inline-block ml-2">
15
+ <%%= button_to "Destroy this <%= human_name.downcase %>", <%= model_resource_name(prefix: "@") %>, method: :delete, class: "mt-2 rounded-md px-3.5 py-2.5 text-white bg-red-600 hover:bg-red-500 font-medium" %>
14
16
  </div>
15
17
  </div>
@@ -15,8 +15,8 @@ module.exports = {
15
15
  },
16
16
  },
17
17
  plugins: [
18
- require('@tailwindcss/forms'),
19
- require('@tailwindcss/typography'),
20
- require('@tailwindcss/container-queries'),
18
+ // require('@tailwindcss/forms'),
19
+ // require('@tailwindcss/typography'),
20
+ // require('@tailwindcss/container-queries'),
21
21
  ]
22
22
  }
@@ -1,3 +1,3 @@
1
1
  module Tailwindcss
2
- VERSION = "3.0.0"
2
+ VERSION = "3.2.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tailwindcss-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.0
4
+ version: 3.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Heinemeier Hansson
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain: []
11
- date: 2024-10-15 00:00:00.000000000 Z
10
+ date: 2025-01-10 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: railties
@@ -38,7 +37,6 @@ dependencies:
38
37
  - - ">="
39
38
  - !ruby/object:Gem::Version
40
39
  version: '0'
41
- description:
42
40
  email: david@loudthinking.com
43
41
  executables: []
44
42
  extensions: []
@@ -68,9 +66,6 @@ files:
68
66
  - lib/generators/tailwindcss/authentication/templates/app/views/passwords/edit.html.erb
69
67
  - lib/generators/tailwindcss/authentication/templates/app/views/passwords/new.html.erb
70
68
  - lib/generators/tailwindcss/authentication/templates/app/views/sessions/new.html.erb
71
- - lib/generators/tailwindcss/authentication/templates/views/passwords/edit.html.erb
72
- - lib/generators/tailwindcss/authentication/templates/views/passwords/new.html.erb
73
- - lib/generators/tailwindcss/authentication/templates/views/sessions/new.html.erb
74
69
  - lib/generators/tailwindcss/controller/controller_generator.rb
75
70
  - lib/generators/tailwindcss/controller/templates/view.html.erb.tt
76
71
  - lib/generators/tailwindcss/mailer/mailer_generator.rb
@@ -105,7 +100,6 @@ licenses:
105
100
  metadata:
106
101
  homepage_uri: https://github.com/rails/tailwindcss-rails
107
102
  rubygems_mfa_required: 'true'
108
- post_install_message:
109
103
  rdoc_options: []
110
104
  require_paths:
111
105
  - lib
@@ -120,8 +114,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
120
114
  - !ruby/object:Gem::Version
121
115
  version: 3.2.0
122
116
  requirements: []
123
- rubygems_version: 3.5.16
124
- signing_key:
117
+ rubygems_version: 3.6.2
125
118
  specification_version: 4
126
119
  summary: Integrate Tailwind CSS with the asset pipeline in Rails.
127
120
  test_files: []
@@ -1,21 +0,0 @@
1
- <div class="mx-auto md:w-2/3 w-full">
2
- <%% if alert = flash[:alert] %>
3
- <p class="py-2 px-3 bg-red-50 mb-5 text-red-500 font-medium rounded-lg inline-block" id="alert"><%%= alert %></p>
4
- <%% end %>
5
-
6
- <h1 class="font-bold text-4xl">Update your password</h1>
7
-
8
- <%%= form_with url: password_path(params[:token]), method: :put, class: "contents" do |form| %>
9
- <div class="my-5">
10
- <%%= 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" %>
11
- </div>
12
-
13
- <div class="my-5">
14
- <%%= form.password_field :password_confirmation, required: true, autocomplete: "new-password", placeholder: "Repeat new password", maxlength: 72, class: "block shadow rounded-md border border-gray-400 outline-none px-3 py-2 mt-2 w-full" %>
15
- </div>
16
-
17
- <div class="inline">
18
- <%%= form.submit "Save", class: "rounded-lg py-3 px-5 bg-blue-600 text-white inline-block font-medium cursor-pointer" %>
19
- </div>
20
- <%% end %>
21
- </div>
@@ -1,17 +0,0 @@
1
- <div class="mx-auto md:w-2/3 w-full">
2
- <%% if alert = flash[:alert] %>
3
- <p class="py-2 px-3 bg-red-50 mb-5 text-red-500 font-medium rounded-lg inline-block" id="alert"><%%= alert %></p>
4
- <%% end %>
5
-
6
- <h1 class="font-bold text-4xl">Forgot your password?</h1>
7
-
8
- <%%= form_with url: passwords_path, class: "contents" do |form| %>
9
- <div class="my-5">
10
- <%%= 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" %>
11
- </div>
12
-
13
- <div class="inline">
14
- <%%= form.submit "Email reset instructions", class: "rounded-lg py-3 px-5 bg-blue-600 text-white inline-block font-medium cursor-pointer" %>
15
- </div>
16
- <%% end %>
17
- </div>
@@ -1,31 +0,0 @@
1
- <div class="mx-auto md:w-2/3 w-full">
2
- <%% if alert = flash[:alert] %>
3
- <p class="py-2 px-3 bg-red-50 mb-5 text-red-500 font-medium rounded-lg inline-block" id="alert"><%%= alert %></p>
4
- <%% end %>
5
-
6
- <%% if notice = flash[:notice] %>
7
- <p class="py-2 px-3 bg-green-50 mb-5 text-green-500 font-medium rounded-lg inline-block" id="notice"><%%= notice %></p>
8
- <%% end %>
9
-
10
- <h1 class="font-bold text-4xl">Sign in</h1>
11
-
12
- <%%= form_with url: session_url, class: "contents" do |form| %>
13
- <div class="my-5">
14
- <%%= 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" %>
15
- </div>
16
-
17
- <div class="my-5">
18
- <%%= form.password_field :password, required: true, autocomplete: "current-password", placeholder: "Enter your password", maxlength: 72, class: "block shadow rounded-md border border-gray-400 outline-none px-3 py-2 mt-2 w-full" %>
19
- </div>
20
-
21
- <div class="col-span-6 sm:flex sm:items-center sm:gap-4">
22
- <div class="inline">
23
- <%%= form.submit "Sign in", class: "rounded-lg py-3 px-5 bg-blue-600 text-white inline-block font-medium cursor-pointer" %>
24
- </div>
25
-
26
- <div class="mt-4 text-sm text-gray-500 sm:mt-0">
27
- <%%= link_to "Forgot password?", new_password_path, class: "text-gray-700 underline" %>
28
- </div>
29
- </div>
30
- <%% end %>
31
- </div>