tailwind_views_generator 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (118) hide show
  1. checksums.yaml +7 -0
  2. data/.fasterer.yml +23 -0
  3. data/.gitignore +11 -0
  4. data/.rubocop.yml +34 -0
  5. data/.simplecov +9 -0
  6. data/.tool-versions +1 -0
  7. data/.yardopts +12 -0
  8. data/CHANGELOG.md +10 -0
  9. data/CODE_OF_CONDUCT.md +22 -0
  10. data/Gemfile +13 -0
  11. data/Gemfile.lock +98 -0
  12. data/LICENSE.txt +21 -0
  13. data/README.md +121 -0
  14. data/Rakefile +16 -0
  15. data/bin/console +15 -0
  16. data/bin/setup +8 -0
  17. data/lib/generators/tailwind_views/devise_generator.rb +52 -0
  18. data/lib/generators/tailwind_views/install_generator.rb +134 -0
  19. data/lib/tailwind_views_generator.rb +10 -0
  20. data/lib/tailwind_views_generator/helpers.rb +15 -0
  21. data/lib/tailwind_views_generator/version.rb +6 -0
  22. data/lib/templates/.DS_Store +0 -0
  23. data/lib/templates/devise/.DS_Store +0 -0
  24. data/lib/templates/devise/erb/confirmations/new.html.erb.tt +25 -0
  25. data/lib/templates/devise/erb/mailer/confirmation_instructions.html.erb +5 -0
  26. data/lib/templates/devise/erb/mailer/email_changed.html.erb +7 -0
  27. data/lib/templates/devise/erb/mailer/password_change.html.erb +3 -0
  28. data/lib/templates/devise/erb/mailer/reset_password_instructions.html.erb +8 -0
  29. data/lib/templates/devise/erb/mailer/unlock_instructions.html.erb +7 -0
  30. data/lib/templates/devise/erb/passwords/edit.html.erb.tt +33 -0
  31. data/lib/templates/devise/erb/passwords/new.html.erb.tt +23 -0
  32. data/lib/templates/devise/erb/registrations/edit.html.erb.tt +53 -0
  33. data/lib/templates/devise/erb/registrations/new.html.erb.tt +37 -0
  34. data/lib/templates/devise/erb/sessions/new.html.erb.tt +36 -0
  35. data/lib/templates/devise/erb/shared/_error_messages.html.erb +15 -0
  36. data/lib/templates/devise/erb/shared/_links.html.erb +28 -0
  37. data/lib/templates/devise/erb/unlocks/new.html.erb.tt +24 -0
  38. data/lib/templates/devise/haml/confirmations/new.html.haml.tt +15 -0
  39. data/lib/templates/devise/haml/mailer/confirmation_instructions.html.haml +3 -0
  40. data/lib/templates/devise/haml/mailer/email_changed.html.haml +7 -0
  41. data/lib/templates/devise/haml/mailer/password_change.html.haml +2 -0
  42. data/lib/templates/devise/haml/mailer/reset_password_instructions.html.haml +5 -0
  43. data/lib/templates/devise/haml/mailer/unlock_instructions.html.haml +4 -0
  44. data/lib/templates/devise/haml/passwords/edit.html.haml.tt +23 -0
  45. data/lib/templates/devise/haml/passwords/new.html.haml.tt +15 -0
  46. data/lib/templates/devise/haml/registrations/edit.html.haml.tt +42 -0
  47. data/lib/templates/devise/haml/registrations/new.html.haml.tt +27 -0
  48. data/lib/templates/devise/haml/sessions/new.html.haml.tt +25 -0
  49. data/lib/templates/devise/haml/shared/_error_messages.html.haml +6 -0
  50. data/lib/templates/devise/haml/shared/_links.html.haml +20 -0
  51. data/lib/templates/devise/haml/unlocks/new.html.haml.tt +16 -0
  52. data/lib/templates/devise/simple_form/erb/confirmations/new.html.erb.tt +18 -0
  53. data/lib/templates/devise/simple_form/erb/passwords/edit.html.erb.tt +20 -0
  54. data/lib/templates/devise/simple_form/erb/passwords/new.html.erb.tt +17 -0
  55. data/lib/templates/devise/simple_form/erb/registrations/edit.html.erb.tt +27 -0
  56. data/lib/templates/devise/simple_form/erb/registrations/new.html.erb.tt +19 -0
  57. data/lib/templates/devise/simple_form/erb/sessions/new.html.erb.tt +18 -0
  58. data/lib/templates/devise/simple_form/erb/unlocks/new.html.erb.tt +17 -0
  59. data/lib/templates/devise/simple_form/haml/confirmations/new.html.haml.tt +13 -0
  60. data/lib/templates/devise/simple_form/haml/passwords/edit.html.haml.tt +15 -0
  61. data/lib/templates/devise/simple_form/haml/passwords/new.html.haml.tt +12 -0
  62. data/lib/templates/devise/simple_form/haml/registrations/edit.html.haml.tt +21 -0
  63. data/lib/templates/devise/simple_form/haml/registrations/new.html.haml.tt +14 -0
  64. data/lib/templates/devise/simple_form/haml/sessions/new.html.haml.tt +13 -0
  65. data/lib/templates/devise/simple_form/haml/unlocks/new.html.haml.tt +12 -0
  66. data/lib/templates/devise/simple_form/slim/confirmations/new.html.slim.tt +13 -0
  67. data/lib/templates/devise/simple_form/slim/passwords/edit.html.slim.tt +15 -0
  68. data/lib/templates/devise/simple_form/slim/passwords/new.html.slim.tt +12 -0
  69. data/lib/templates/devise/simple_form/slim/registrations/edit.html.slim.tt +21 -0
  70. data/lib/templates/devise/simple_form/slim/registrations/new.html.slim.tt +14 -0
  71. data/lib/templates/devise/simple_form/slim/sessions/new.html.slim.tt +13 -0
  72. data/lib/templates/devise/simple_form/slim/unlocks/new.html.slim.tt +12 -0
  73. data/lib/templates/devise/slim/confirmations/new.html.slim.tt +16 -0
  74. data/lib/templates/devise/slim/mailer/confirmation_instructions.html.slim +3 -0
  75. data/lib/templates/devise/slim/mailer/email_changed.html.slim +5 -0
  76. data/lib/templates/devise/slim/mailer/password_change.html.slim +2 -0
  77. data/lib/templates/devise/slim/mailer/reset_password_instructions.html.slim +5 -0
  78. data/lib/templates/devise/slim/mailer/unlock_instructions.html.slim +4 -0
  79. data/lib/templates/devise/slim/passwords/edit.html.slim.tt +24 -0
  80. data/lib/templates/devise/slim/passwords/new.html.slim.tt +16 -0
  81. data/lib/templates/devise/slim/registrations/edit.html.slim.tt +43 -0
  82. data/lib/templates/devise/slim/registrations/new.html.slim.tt +28 -0
  83. data/lib/templates/devise/slim/sessions/new.html.slim.tt +26 -0
  84. data/lib/templates/devise/slim/shared/_error_messages.html.slim +6 -0
  85. data/lib/templates/devise/slim/shared/_links.html.slim +20 -0
  86. data/lib/templates/devise/slim/unlocks/new.html.slim.tt +17 -0
  87. data/lib/templates/layouts/application.html.erb.tt +36 -0
  88. data/lib/templates/layouts/application.html.haml.tt +32 -0
  89. data/lib/templates/layouts/application.html.slim.tt +31 -0
  90. data/lib/templates/scaffolds/erb/_form.html.erb +22 -0
  91. data/lib/templates/scaffolds/erb/edit.html.erb.tt +13 -0
  92. data/lib/templates/scaffolds/erb/index.html.erb.tt +38 -0
  93. data/lib/templates/scaffolds/erb/new.html.erb.tt +14 -0
  94. data/lib/templates/scaffolds/erb/show.html.erb.tt +20 -0
  95. data/lib/templates/scaffolds/haml/_form.html.haml +17 -0
  96. data/lib/templates/scaffolds/haml/edit.html.haml.tt +13 -0
  97. data/lib/templates/scaffolds/haml/index.html.haml.tt +29 -0
  98. data/lib/templates/scaffolds/haml/new.html.haml.tt +10 -0
  99. data/lib/templates/scaffolds/haml/show.html.haml.tt +18 -0
  100. data/lib/templates/scaffolds/simple_form/_form.html.erb +9 -0
  101. data/lib/templates/scaffolds/simple_form/_form.html.haml +9 -0
  102. data/lib/templates/scaffolds/simple_form/_form.html.slim +9 -0
  103. data/lib/templates/scaffolds/slim/_form.html.slim +17 -0
  104. data/lib/templates/scaffolds/slim/edit.html.slim.tt +13 -0
  105. data/lib/templates/scaffolds/slim/index.html.slim.tt +29 -0
  106. data/lib/templates/scaffolds/slim/new.html.slim.tt +11 -0
  107. data/lib/templates/scaffolds/slim/show.html.slim.tt +18 -0
  108. data/lib/templates/shared/footer/_footer.html.erb.tt +5 -0
  109. data/lib/templates/shared/footer/_footer.html.haml.tt +3 -0
  110. data/lib/templates/shared/footer/_footer.html.slim.tt +3 -0
  111. data/lib/templates/shared/navigation/_navigation.html.erb.tt +32 -0
  112. data/lib/templates/shared/navigation/_navigation.html.haml.tt +23 -0
  113. data/lib/templates/shared/navigation/_navigation.html.slim.tt +23 -0
  114. data/lib/templates/shared/pagination/_pagination.html.erb +5 -0
  115. data/lib/templates/shared/pagination/_pagination.html.haml +3 -0
  116. data/lib/templates/shared/pagination/_pagination.html.slim +3 -0
  117. data/tailwind_views_generator.gemspec +38 -0
  118. metadata +223 -0
@@ -0,0 +1,18 @@
1
+ <div class="md:mx-auto md:max-w-md overflow-hidden mx-0">
2
+ <div class="shadow-md rounded px-8 pt-6 pb-8 mb-4 flex flex-col justify-center bg-gray-50">
3
+ <h2 class="text-center text-xl text-black">
4
+ <%- if options[:metatags] -%>
5
+ <%%= title('Log In') %>
6
+ <%- else -%>
7
+ Log In
8
+ <%- end -%>
9
+ </h2>
10
+ <%%= simple_form_for(resource, as: resource_name, url: session_path(resource_name)) do |f| %>
11
+ <%%= f.input :email, required: false, autofocus: true, input_html: { autocomplete: 'email' } %>
12
+ <%%= f.input :password, required: false, input_html: { autocomplete: 'current-password' } %>
13
+ <%%= f.input :remember_me, as: :boolean if devise_mapping.rememberable? %>
14
+ <%%= f.button :submit, 'Log in', class: 'w-full' %>
15
+ <%% end %>
16
+ <%%= render 'devise/shared/links' %>
17
+ </div>
18
+ </div>
@@ -0,0 +1,17 @@
1
+ <div class="md:mx-auto md:max-w-md overflow-hidden mx-0">
2
+ <div class="shadow-md rounded px-8 pt-6 pb-8 mb-4 flex flex-col justify-center bg-gray-50">
3
+ <h2 class="text-center text-xl text-black">
4
+ <%- if options[:metatags] -%>
5
+ <%%= title('Resend unlock instructions') %>
6
+ <%- else -%>
7
+ Resend unlock instructions
8
+ <%- end -%>
9
+ </h2>
10
+ <%%= simple_form_for(resource, as: resource_name, url: unlock_path(resource_name), html: { method: :post }) do |f| %>
11
+ <%%= render 'devise/shared/error_messages', resource: resource %>
12
+ <%%= f.input :email, autofocus: true, placeholder: 'Email Address', autocomplete: 'email' %>
13
+ <%%= f.button :submit, 'Resend unlock instructions', class: 'w-full' %>
14
+ <%% end %>
15
+ <%%= render 'devise/shared/links' %>
16
+ </div>
17
+ </div>
@@ -0,0 +1,13 @@
1
+ .md:mx-auto.md:max-w-md.overflow-hidden.mx-0
2
+ .shadow-md.rounded.px-8.pt-6.pb-8.mb-4.flex.flex-col.justify-center.bg-gray-50
3
+ <%- if options[:metatags] -%>
4
+ %h2.text-center.text-xl.text-black= title('Resend confirmation instructions')
5
+ <%- else -%>
6
+ %h2.text-center.text-xl.text-black Resend confirmation instructions
7
+ <%- end -%>
8
+ = simple_form_for(resource, as: resource_name, url: confirmation_path(resource_name), html: { method: :post }) do |f|
9
+ = f.error_notification
10
+ = f.full_error :confirmation_token
11
+ = f.input :email, required: true, autofocus: true, value: (resource.pending_reconfirmation? ? resource.unconfirmed_email : resource.email), input_html: { autocomplete: "email" }
12
+ = f.button :submit, 'Resend confirmation instructions', class: 'w-full'
13
+ = render 'devise/shared/links'
@@ -0,0 +1,15 @@
1
+ .md:mx-auto.md:max-w-md.overflow-hidden.mx-0
2
+ .shadow-md.rounded.px-8.pt-6.pb-8.mb-4.flex.flex-col.justify-center.bg-gray-50
3
+ <%- if options[:metatags] -%>
4
+ %h2.text-center.text-xl.text-black= title('Change your password')
5
+ <%- else -%>
6
+ %h2.text-center.text-xl.text-black Change your password
7
+ <%- end -%>
8
+ = simple_form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :put }) do |f|
9
+ = f.error_notification
10
+ = f.input :reset_password_token, as: :hidden
11
+ = f.full_error :reset_password_token
12
+ = f.input :password, label: 'New password', required: true, autofocus: true, hint: ("#{@minimum_password_length} characters minimum" if @minimum_password_length), input_html: { autocomplete: 'new-password' }
13
+ = f.input :password_confirmation, label: 'Confirm your new password', required: true, input_html: { autocomplete: 'new-password' }
14
+ = f.button :submit, 'Change my password', class: 'w-full'
15
+ = render 'devise/shared/links'
@@ -0,0 +1,12 @@
1
+ .md:mx-auto.md:max-w-md.overflow-hidden.mx-0
2
+ .shadow-md.rounded.px-8.pt-6.pb-8.mb-4.flex.flex-col.justify-center.bg-gray-50
3
+ <%- if options[:metatags] -%>
4
+ %h2.text-center.text-xl.text-black= title('Forgot your password?')
5
+ <%- else -%>
6
+ %h2.text-center.text-xl.text-black Forgot your password?
7
+ <%- end -%>
8
+ = simple_form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :post }) do |f|
9
+ = f.error_notification
10
+ = f.input :email, required: true, autofocus: true, input_html: { autocomplete: "email" }
11
+ = f.button :submit, 'Send me reset password instructions', class: 'w-full'
12
+ = render 'devise/shared/links'
@@ -0,0 +1,21 @@
1
+ .md:mx-auto.md:max-w-md.overflow-hidden.mx-0
2
+ .shadow-md.rounded.px-8.pt-6.pb-8.mb-4.flex.flex-col.justify-center.bg-gray-50
3
+ <%- if options[:metatags] -%>
4
+ %h2.text-center.text-xl.text-black= title("Edit #{resource_name.to_s.humanize}")
5
+ <%- else -%>
6
+ %h2.text-center.text-xl.text-black= "Edit #{resource_name.to_s.humanize}"
7
+ <%- end -%>
8
+ %hr.my-5
9
+ = simple_form_for(resource, as: resource_name, url: registration_path(resource_name), html: { method: :put }) do |f|
10
+ = f.error_notification
11
+ = f.input :email, required: true, autofocus: true
12
+ - if devise_mapping.confirmable? && resource.pending_reconfirmation?
13
+ p = "Currently waiting confirmation for: #{resource.unconfirmed_email}"
14
+ = f.input :password, hint: "Leave it blank if you don't want to change it", required: false, input_html: { autocomplete: 'new-password' }
15
+ = f.input :password_confirmation, required: false, input_html: { autocomplete: 'new-password' }
16
+ = f.input :current_password, hint: 'We need your current password to confirm your changes', required: true, input_html: { autocomplete: 'current-password' }
17
+ = f.button :submit, 'Update', class: 'w-full'
18
+ %hr.my-5
19
+ = button_to 'Cancel my account', registration_path(resource_name), class: 'my-2 bg-red-500 hover:bg-red-700 text-white font-bold text-sm py-2 px-4 rounded w-full', data: { confirm: 'Are you sure? You cannot undo this.' }, method: :delete
20
+ %hr.my-5
21
+ = link_to 'Back', :back
@@ -0,0 +1,14 @@
1
+ .md:mx-auto.md:max-w-md.overflow-hidden.mx-0
2
+ .shadow-md.rounded.px-8.pt-6.pb-8.mb-4.flex.flex-col.justify-center.bg-gray-50
3
+ <%- if options[:metatags] -%>
4
+ %h2.text-center.text-xl.text-black= title('Sign Up')
5
+ <%- else -%>
6
+ %h2.text-center.text-xl.text-black Sign Up
7
+ <%- end -%>
8
+ = simple_form_for(resource, as: resource_name, url: registration_path(resource_name)) do |f|
9
+ = f.error_notification
10
+ = f.input :email, required: true, autofocus: true, input_html: { autocomplete: "email" }
11
+ = f.input :password, required: true, hint: ("#{@minimum_password_length} characters minimum" if @minimum_password_length), input_html: { autocomplete: "new-password" }
12
+ = f.input :password_confirmation, required: true, input_html: { autocomplete: "new-password" }
13
+ = f.button :submit, 'Sign up', class: 'w-full'
14
+ = render 'devise/shared/links'
@@ -0,0 +1,13 @@
1
+ .md:mx-auto.md:max-w-md.overflow-hidden.mx-0
2
+ .shadow-md.rounded.px-8.pt-6.pb-8.mb-4.flex.flex-col.justify-center.bg-gray-50
3
+ <%- if options[:metatags] -%>
4
+ %h2.text-center.text-xl.text-black = title('Log In')
5
+ <%- else -%>
6
+ %h2.text-center.text-xl.text-black Log In
7
+ <%- end -%>
8
+ = simple_form_for(resource, as: resource_name, url: session_path(resource_name)) do |f|
9
+ = f.input :email, required: false, autofocus: true, input_html: { autocomplete: 'email' }
10
+ = f.input :password, required: false, input_html: { autocomplete: 'current-password' }
11
+ = f.input :remember_me, as: :boolean if devise_mapping.rememberable?
12
+ = f.button :submit, 'Log in', class: 'w-full'
13
+ = render 'devise/shared/links'
@@ -0,0 +1,12 @@
1
+ .md:mx-auto.md:max-w-md.overflow-hidden.mx-0
2
+ .shadow-md.rounded.px-8.pt-6.pb-8.mb-4.flex.flex-col.justify-center.bg-gray-50
3
+ <%- if options[:metatags] -%>
4
+ %h2.text-center.text-xl.text-black= title('Resend unlock instructions')
5
+ <%- else -%>
6
+ %h2.text-center.text-xl.text-black Resend unlock instructions
7
+ <%- end -%>
8
+ = simple_form_for(resource, as: resource_name, url: unlock_path(resource_name), html: { method: :post }) do |f|
9
+ = render 'devise/shared/error_messages', resource: resource
10
+ = f.input :email, autofocus: true, placeholder: 'Email Address', autocomplete: 'email'
11
+ = f.button :submit, 'Resend unlock instructions', class: 'w-full'
12
+ = render 'devise/shared/links'
@@ -0,0 +1,13 @@
1
+ .md:mx-auto.md:max-w-md.overflow-hidden.mx-0
2
+ .shadow-md.rounded.px-8.pt-6.pb-8.mb-4.flex.flex-col.justify-center.bg-gray-50
3
+ <%- if options[:metatags] -%>
4
+ h2.text-center.text-xl.text-black = title('Resend confirmation instructions')
5
+ <%- else -%>
6
+ h2.text-center.text-xl.text-black Resend confirmation instructions
7
+ <%- end -%>
8
+ = simple_form_for(resource, as: resource_name, url: confirmation_path(resource_name), html: { method: :post }) do |f|
9
+ = f.error_notification
10
+ = f.full_error :confirmation_token
11
+ = f.input :email, required: true, autofocus: true, value: (resource.pending_reconfirmation? ? resource.unconfirmed_email : resource.email), input_html: { autocomplete: "email" }
12
+ = f.button :submit, 'Resend confirmation instructions', class: 'w-full'
13
+ = render 'devise/shared/links'
@@ -0,0 +1,15 @@
1
+ .md:mx-auto.md:max-w-md.overflow-hidden.mx-0
2
+ .shadow-md.rounded.px-8.pt-6.pb-8.mb-4.flex.flex-col.justify-center.bg-gray-50
3
+ <%- if options[:metatags] -%>
4
+ h2.text-center.text-xl.text-black = title('Change your password')
5
+ <%- else -%>
6
+ h2.text-center.text-xl.text-black Change your password
7
+ <%- end -%>
8
+ = simple_form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :put }) do |f|
9
+ = f.error_notification
10
+ = f.input :reset_password_token, as: :hidden
11
+ = f.full_error :reset_password_token
12
+ = f.input :password, label: 'New password', required: true, autofocus: true, hint: ("#{@minimum_password_length} characters minimum" if @minimum_password_length), input_html: { autocomplete: 'new-password' }
13
+ = f.input :password_confirmation, label: 'Confirm your new password', required: true, input_html: { autocomplete: 'new-password' }
14
+ = f.button :submit, 'Change my password', class: 'w-full'
15
+ = render 'devise/shared/links'
@@ -0,0 +1,12 @@
1
+ .md:mx-auto.md:max-w-md.overflow-hidden.mx-0
2
+ .shadow-md.rounded.px-8.pt-6.pb-8.mb-4.flex.flex-col.justify-center.bg-gray-50
3
+ <%- if options[:metatags] -%>
4
+ h2.text-center.text-xl.text-black = title('Forgot your password?')
5
+ <%- else -%>
6
+ h2.text-center.text-xl.text-black Forgot your password?
7
+ <%- end -%>
8
+ = simple_form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :post }) do |f|
9
+ = f.error_notification
10
+ = f.input :email, required: true, autofocus: true, input_html: { autocomplete: "email" }
11
+ = f.button :submit, 'Send me reset password instructions', class: 'w-full'
12
+ = render 'devise/shared/links'
@@ -0,0 +1,21 @@
1
+ .md:mx-auto.md:max-w-md.overflow-hidden.mx-0
2
+ .shadow-md.rounded.px-8.pt-6.pb-8.mb-4.flex.flex-col.justify-center.bg-gray-50
3
+ <%- if options[:metatags] -%>
4
+ h2.text-center.text-xl.text-black = title("Edit #{resource_name.to_s.humanize}")
5
+ <%- else -%>
6
+ h2.text-center.text-xl.text-black = "Edit #{resource_name.to_s.humanize}"
7
+ <%- end -%>
8
+ hr.my-5
9
+ = simple_form_for(resource, as: resource_name, url: registration_path(resource_name), html: { method: :put }) do |f|
10
+ = f.error_notification
11
+ = f.input :email, required: true, autofocus: true
12
+ - if devise_mapping.confirmable? && resource.pending_reconfirmation?
13
+ p = "Currently waiting confirmation for: #{resource.unconfirmed_email}"
14
+ = f.input :password, hint: "Leave it blank if you don't want to change it", required: false, input_html: { autocomplete: 'new-password' }
15
+ = f.input :password_confirmation, required: false, input_html: { autocomplete: 'new-password' }
16
+ = f.input :current_password, hint: 'We need your current password to confirm your changes', required: true, input_html: { autocomplete: 'current-password' }
17
+ = f.button :submit, 'Update', class: 'w-full'
18
+ hr.my-5
19
+ = button_to 'Cancel my account', registration_path(resource_name), class: 'my-2 bg-red-500 hover:bg-red-700 text-white font-bold text-sm py-2 px-4 rounded w-full', data: { confirm: 'Are you sure? You cannot undo this.' }, method: :delete
20
+ hr.my-5
21
+ = link_to 'Back', :back
@@ -0,0 +1,14 @@
1
+ .md:mx-auto.md:max-w-md.overflow-hidden.mx-0
2
+ .shadow-md.rounded.px-8.pt-6.pb-8.mb-4.flex.flex-col.justify-center.bg-gray-50
3
+ <%- if options[:metatags] -%>
4
+ h2.text-center.text-xl.text-black = title('Sign Up')
5
+ <%- else -%>
6
+ h2.text-center.text-xl.text-black Sign Up
7
+ <%- end -%>
8
+ = simple_form_for(resource, as: resource_name, url: registration_path(resource_name)) do |f|
9
+ = f.error_notification
10
+ = f.input :email, required: true, autofocus: true, input_html: { autocomplete: "email" }
11
+ = f.input :password, required: true, hint: ("#{@minimum_password_length} characters minimum" if @minimum_password_length), input_html: { autocomplete: "new-password" }
12
+ = f.input :password_confirmation, required: true, input_html: { autocomplete: "new-password" }
13
+ = f.button :submit, 'Sign up', class: 'w-full'
14
+ = render 'devise/shared/links'
@@ -0,0 +1,13 @@
1
+ .md:mx-auto.md:max-w-md.overflow-hidden.mx-0
2
+ .shadow-md.rounded.px-8.pt-6.pb-8.mb-4.flex.flex-col.justify-center.bg-gray-50
3
+ <%- if options[:metatags] -%>
4
+ h2.text-center.text-xl.text-black = title('Log In')
5
+ <%- else -%>
6
+ h2.text-center.text-xl.text-black Log In
7
+ <%- end -%>
8
+ = simple_form_for(resource, as: resource_name, url: session_path(resource_name)) do |f|
9
+ = f.input :email, required: false, autofocus: true, input_html: { autocomplete: 'email' }
10
+ = f.input :password, required: false, input_html: { autocomplete: 'current-password' }
11
+ = f.input :remember_me, as: :boolean if devise_mapping.rememberable?
12
+ = f.button :submit, 'Log in', class: 'w-full'
13
+ = render 'devise/shared/links'
@@ -0,0 +1,12 @@
1
+ .md:mx-auto.md:max-w-md.overflow-hidden.mx-0
2
+ .shadow-md.rounded.px-8.pt-6.pb-8.mb-4.flex.flex-col.justify-center.bg-gray-50
3
+ <%- if options[:metatags] -%>
4
+ h2.text-center.text-xl.text-black = title('Resend unlock instructions')
5
+ <%- else -%>
6
+ h2.text-center.text-xl.text-black Resend unlock instructions
7
+ <%- end -%>
8
+ = simple_form_for(resource, as: resource_name, url: unlock_path(resource_name), html: { method: :post }) do |f|
9
+ = render 'devise/shared/error_messages', resource: resource
10
+ = f.input :email, autofocus: true, placeholder: 'Email Address', autocomplete: 'email'
11
+ = f.button :submit, 'Resend unlock instructions', class: 'w-full'
12
+ = render 'devise/shared/links'
@@ -0,0 +1,16 @@
1
+ div class='md:mx-auto md:max-w-md overflow-hidden mx-0'
2
+ .shadow-md.rounded.px-8.pt-6.pb-8.mb-4.flex.flex-col.justify-center.bg-gray-50
3
+ h2.text-center.text-xl.text-black
4
+ <%- if options[:metatags] -%>
5
+ = title('Resend confirmation instructions')
6
+ <%- else -%>
7
+ | Resend confirmation instructions
8
+ <%- end -%>
9
+
10
+ = form_for(resource, as: resource_name, url: confirmation_path(resource_name), html: { method: :post }) do |f|
11
+ = render 'devise/shared/error_messages', resource: resource
12
+ .mb-4
13
+ = f.label :email, class: 'text-sm font-medium text-gray-600'
14
+ = f.email_field :email, autofocus: true, autocomplete: 'email', value: (resource.pending_reconfirmation? ? resource.unconfirmed_email : resource.email), class: 'shadow appearance-none border border-gray-300 rounded w-full py-2 px-3 bg-white focus:outline-none focus:ring-0 focus:border-blue-500 text-gray-400 leading-6 transition-colors duration-200 ease-in-out'
15
+ = f.submit "Resend confirmation instructions" class: 'my-2 bg-blue-500 hover:bg-blue-700 text-white font-bold text-sm py-2 px-4 rounded w-full'
16
+ = render 'devise/shared/links' %>
@@ -0,0 +1,3 @@
1
+ p Welcome #{@email}!
2
+ p You can confirm your account email through the link below:
3
+ p= link_to 'Confirm my account', confirmation_url(@resource, confirmation_token: @token)
@@ -0,0 +1,5 @@
1
+ p Hello #{@email}!
2
+ - if @resource.try(:unconfirmed_email?)
3
+ p We're contacting you to notify you that your email is being changed to #{@resource.unconfirmed_email}.
4
+ - else
5
+ p We're contacting you to notify you that your email has been changed to #{@resource.email}.
@@ -0,0 +1,2 @@
1
+ p Hello #{@resource.email}!
2
+ p We're contacting you to notify you that your password has been changed.
@@ -0,0 +1,5 @@
1
+ p Hello #{@resource.email}!
2
+ p Someone has requested a link to change your password. You can do this through the link below.
3
+ p = link_to 'Change my password', edit_password_url(@resource, reset_password_token: @token)
4
+ p If you didn't request this, please ignore this email.
5
+ p Your password won't change until you access the link above and create a new one.
@@ -0,0 +1,4 @@
1
+ p Hello #{@resource.email}!
2
+ p Your account has been locked due to an excessive number of unsuccessful sign in attempts.
3
+ p Click the link below to unlock your account:
4
+ p = link_to 'Unlock my account', unlock_url(@resource, unlock_token: @token)
@@ -0,0 +1,24 @@
1
+ div class='md:mx-auto md:max-w-md overflow-hidden mx-0'
2
+ .shadow-md.rounded.px-8.pt-6.pb-8.mb-4.flex.flex-col.justify-center.bg-gray-50
3
+ h2.text-center.text-xl.text-black
4
+ <%- if options[:metatags] -%>
5
+ = title('Change your password')
6
+ <%- else -%>
7
+ | Change your password
8
+ <%- end -%>
9
+
10
+ = form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :put }) do |f|
11
+ = render 'devise/shared/error_messages', resource: resource
12
+ = f.hidden_field :reset_password_token
13
+
14
+ .mb-4
15
+ = f.label :password, "New password", class: 'text-sm font-medium text-gray-600'
16
+ - if @minimum_password_length
17
+ em = "(#{@minimum_password_length} characters minimum)"
18
+ br
19
+ = f.password_field :password, autofocus: true, autocomplete: "new-password", class: 'text-sm font-medium text-gray-600'
20
+ .mb-4
21
+ = f.label :password_confirmation, "Confirm new password", class: 'text-sm font-medium text-gray-600'
22
+ = f.password_field :password_confirmation, autocomplete: "new-password", class: 'text-sm font-medium text-gray-600'
23
+ = f.submit "Change my password" class: 'my-2 bg-blue-500 hover:bg-blue-700 text-white font-bold text-sm py-2 px-4 rounded w-full'
24
+ = render 'devise/shared/links'
@@ -0,0 +1,16 @@
1
+ div class='md:mx-auto md:max-w-md overflow-hidden mx-0'
2
+ .shadow-md.rounded.px-8.pt-6.pb-8.mb-4.flex.flex-col.justify-center.bg-gray-50
3
+ h2.text-center.text-xl.text-black
4
+ <%- if options[:metatags] -%>
5
+ = title('Forgot your password?')
6
+ <%- else -%>
7
+ | Forget your password?
8
+ <%- end -%>
9
+
10
+ = form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :post }) do |f|
11
+ = render 'devise/shared/error_messages', resource: resource
12
+ .mb-4
13
+ = f.label :email, class: 'block email text-sm font-medium text-gray-600'
14
+ = f.email_field :email, autofocus: true, autocomplete: 'email', class: 'shadow appearance-none border border-gray-300 rounded w-full py-2 px-3 bg-white focus:outline-none focus:ring-0 focus:border-blue-500 text-gray-400 leading-6 transition-colors duration-200 ease-in-out'
15
+ = f.submit 'Send me reset password instructions', class: 'my-2 bg-blue-500 hover:bg-blue-700 text-white font-bold text-sm py-2 px-4 rounded w-full'
16
+ = render 'devise/shared/links'
@@ -0,0 +1,43 @@
1
+ div class='md:mx-auto md:max-w-md overflow-hidden mx-0'
2
+ .shadow-md.rounded.px-8.pt-6.pb-8.mb-4.flex.flex-col.justify-center.bg-gray-50
3
+ h2.text-center.text-xl.text-black
4
+ <%- if options[:metatags] -%>
5
+ = title("Edit #{resource_name.to_s.humanize}")
6
+ <%- else -%>
7
+ = "Edit #{resource_name.to_s.humanize"
8
+ <%- end -%>
9
+ hr.my-5
10
+
11
+ = form_for(resource, as: resource_name, url: registration_path(resource_name), html: { method: :put }) do |f|
12
+ = render 'devise/shared/error_messages', resource: resource
13
+
14
+ .mb-4
15
+ = f.label :email, class: 'block email text-sm font-medium text-gray-600'
16
+ = f.email_field :email, autofocus: true, autocomplete: 'email', class: 'shadow appearance-none border border-gray-300 rounded w-full py-2 px-3 bg-white focus:outline-none focus:ring-0 focus:border-blue-500 text-gray-400 leading-6 transition-colors duration-200 ease-in-out string'
17
+
18
+ - if devise_mapping.confirmable? && resource.pending_reconfirmation?
19
+ div = "Currently waiting confirmation for: #{resource.unconfirmed_email}"
20
+
21
+ .mb-4
22
+ = f.label :password, class: 'block password text-sm font-medium text-gray-600'
23
+ = f.password_field :password, autocomplete: 'new-password', class: 'shadow appearance-none border border-gray-300 rounded w-full py-2 px-3 bg-white focus:outline-none focus:ring-0 focus:border-blue-500 text-gray-400 leading-6 transition-colors duration-200 ease-in-out'
24
+ p.mt-2.text-grey-700.text-xs.italic Leave it blank if you don't want to change it
25
+ - if @minimum_password_length
26
+ br
27
+ em = "#{@minimum_password_length} characters minimum"
28
+
29
+ .mb-4
30
+ = f.label :password_confirmation, class: 'block password text-sm font-medium text-gray-600'
31
+ = f.password_field :password_confirmation, autocomplete: 'new-password', class: 'shadow appearance-none border border-gray-300 rounded w-full py-2 px-3 bg-white focus:outline-none focus:ring-0 focus:border-blue-500 text-gray-400 leading-6 transition-colors duration-200 ease-in-out'
32
+
33
+ .mb-4
34
+ = f.label :current_password, class: 'block password text-sm font-medium text-gray-600'
35
+ = f.password_field :current_password, autocomplete: 'current-password', class: 'shadow appearance-none border border-gray-300 rounded w-full py-2 px-3 bg-white focus:outline-none focus:ring-0 focus:border-blue-500 text-gray-400 leading-6 transition-colors duration-200 ease-in-out'
36
+ p.mt-2.text-grey-700.text-xs.italic We need your current password to confirm your changes
37
+
38
+ = f.submit 'Update', class: 'my-2 bg-blue-500 hover:bg-blue-700 text-white font-bold text-sm py-2 px-4 rounded w-full'
39
+ hr.my-5
40
+ = button_to 'Cancel my account', registration_path(resource_name), class: 'my-2 bg-red-500 hover:bg-red-700 text-white font-bold text-sm py-2 px-4 rounded w-full', data: { confirm: 'Are you sure? You cannot undo this.' }, method: :delete
41
+
42
+ hr.my-5
43
+ = link_to "Back", :back
@@ -0,0 +1,28 @@
1
+ div class='md:mx-auto md:max-w-md overflow-hidden mx-0'
2
+ .shadow-md.rounded.px-8.pt-6.pb-8.mb-4.flex.flex-col.justify-center.bg-gray-50
3
+ h2.text-center.text-xl.text-black
4
+ <%- if options[:metatags] -%>
5
+ = title('Sign Up')
6
+ <%- else -%>
7
+ | Sign Up
8
+ <%- end -%>
9
+
10
+ = form_for(resource, as: resource_name, url: registration_path(resource_name)) do |f|
11
+ = render 'devise/shared/error_messages', resource: resource
12
+
13
+ .mb-4
14
+ = f.label :email, class: 'block email text-sm font-medium text-gray-600'
15
+ = f.email_field :email, autofocus: true, autocomplete: 'email', class: 'shadow appearance-none border border-gray-300 rounded w-full py-2 px-3 bg-white focus:outline-none focus:ring-0 focus:border-blue-500 text-gray-400 leading-6 transition-colors duration-200 ease-in-out'
16
+
17
+ .mb-4
18
+ = f.label :password, class: 'block email text-sm font-medium text-gray-600'
19
+ - if @minimum_password_length
20
+ em = "(#{@minimum_password_length} characters minimum)"
21
+ = f.password_field :password, autocomplete: 'new-password', class: 'shadow appearance-none border border-gray-300 rounded w-full py-2 px-3 bg-white focus:outline-none focus:ring-0 focus:border-blue-500 text-gray-400 leading-6 transition-colors duration-200 ease-in-out'
22
+
23
+ .mb-4
24
+ = f.label :password_confirmation, class: 'block email text-sm font-medium text-gray-600'
25
+ = f.password_field :password_confirmation, autocomplete: 'new-password', class: 'shadow appearance-none border border-gray-300 rounded w-full py-2 px-3 bg-white focus:outline-none focus:ring-0 focus:border-blue-500 text-gray-400 leading-6 transition-colors duration-200 ease-in-out'
26
+ = f.submit 'Sign Up', class: 'my-2 bg-blue-500 hover:bg-blue-700 text-white font-bold text-sm py-2 px-4 rounded w-full'
27
+
28
+ = render 'devise/shared/links'
@@ -0,0 +1,26 @@
1
+ div class='md:mx-auto md:max-w-md overflow-hidden mx-0'
2
+ .shadow-md.rounded.px-8.pt-6.pb-8.mb-4.flex.flex-col.justify-center.bg-gray-50
3
+ h2.text-center.text-xl.text-black
4
+ <%- if options[:metatags] -%>
5
+ = title('Log In')
6
+ <%- else -%>
7
+ | Log In
8
+ <%- end -%>
9
+
10
+ = form_for(resource, as: resource_name, url: session_path(resource_name)) do |f|
11
+ .mb-4
12
+ = f.label :email, class: 'block email optional text-sm font-medium text-gray-600'
13
+ = f.email_field :email, autofocus: true, class: 'shadow appearance-none border border-gray-300 rounded w-full py-2 px-3 bg-white focus:outline-none focus:ring-0 focus:border-blue-500 text-gray-400 leading-6 transition-colors duration-200 ease-in-out'
14
+
15
+ .mb-4
16
+ = f.label :password, class: 'block email optional text-sm font-medium text-gray-600'
17
+ = f.password_field :password, class: 'shadow appearance-none border border-gray-300 rounded w-full py-2 px-3 bg-white focus:outline-none focus:ring-0 focus:border-blue-500 text-gray-400 leading-6 transition-colors duration-200 ease-in-out'
18
+
19
+ - if devise_mapping.rememberable?
20
+ .mb-4.flex.items-start.boolean.optional.user_remember_me
21
+ .flex.items-center.h-5
22
+ = f.check_box :remember_me, class: 'focus:ring-2 focus:ring-indigo-500:focus ring-offset-2 h-4 w-4 text-indigo-600 border-gray-300 rounded boolean optional'
23
+ .ml-3.text-sm
24
+ = f.label :remember_me, class: 'block boolean optional text-sm font-medium text-gray-600'
25
+ = f.submit 'Log in', class: 'my-2 bg-blue-500 hover:bg-blue-700 text-white font-bold text-sm py-2 px-4 rounded w-full'
26
+ = render 'devise/shared/links'