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,36 @@
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
+
11
+ <%%= form_for(resource, as: resource_name, url: session_path(resource_name)) do |f| %>
12
+ <div class="mb-4">
13
+ <%%= f.label :email, class: 'block email optional text-sm font-medium text-gray-600' %>
14
+ <%%= 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 string' %>
15
+ </div>
16
+
17
+ <div class="mb-4">
18
+ <%%= f.label :password, class: 'block email optional text-sm font-medium text-gray-600' %>
19
+ <%%= 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 string' %>
20
+ </div>
21
+
22
+ <%% if devise_mapping.rememberable? %>
23
+ <div class="mb-4 flex items-start boolean optional user_remember_me">
24
+ <div class="flex items-center h-5">
25
+ <%%= 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' %>
26
+ </div>
27
+ <div class="ml-3 text-sm">
28
+ <%%= f.label :remember_me, class: 'block boolean optional text-sm font-medium text-gray-600' %>
29
+ </div>
30
+ </div>
31
+ <%% end %>
32
+ <%%= 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' %>
33
+ <%% end %>
34
+ <%%= render 'devise/shared/links' %>
35
+ </div>
36
+ </div>
@@ -0,0 +1,15 @@
1
+ <% if resource.errors.any? %>
2
+ <div id="error_explanation">
3
+ <h2>
4
+ <%= I18n.t("errors.messages.not_saved",
5
+ count: resource.errors.count,
6
+ resource: resource.class.model_name.human.downcase)
7
+ %>
8
+ </h2>
9
+ <ul class="mt-2 text-red-500 text-xs italic">
10
+ <% resource.errors.full_messages.each do |message| %>
11
+ <li><%= message %></li>
12
+ <% end %>
13
+ </ul>
14
+ </div>
15
+ <% end %>
@@ -0,0 +1,28 @@
1
+ <div class="text-center text-sm mt-2">
2
+ <%- if controller_name != 'sessions' -%>
3
+ <%= link_to "Log in", new_session_path(resource_name) %>
4
+ <br />
5
+ <%- end -%>
6
+ <%- if devise_mapping.registerable? && controller_name != 'registrations' -%>
7
+ <%= link_to "Sign up", new_registration_path(resource_name) %>
8
+ <br />
9
+ <%- end -%>
10
+ <%- if devise_mapping.recoverable? && controller_name != 'passwords' && controller_name != 'registrations' -%>
11
+ <%= link_to "Forgot your password?", new_password_path(resource_name) %>
12
+ <br />
13
+ <%- end -%>
14
+ <%- if devise_mapping.confirmable? && controller_name != 'confirmations' -%>
15
+ <%= link_to "Didn't receive confirmation instructions?", new_confirmation_path(resource_name) %>
16
+ <br />
17
+ <%- end -%>
18
+ <%- if devise_mapping.lockable? && resource_class.unlock_strategy_enabled?(:email) && controller_name != 'unlocks' -%>
19
+ <%= link_to "Didn't receive unlock instructions?", new_unlock_path(resource_name) %>
20
+ <br />
21
+ <%- end -%>
22
+ <%- if devise_mapping.omniauthable? -%>
23
+ <%- resource_class.omniauth_providers.each do |provider| %>
24
+ <%= link_to "Sign in with #{OmniAuth::Utils.camelize(provider)}", omniauth_authorize_path(resource_name, provider) -%>
25
+ <br />
26
+ <%- end -%>
27
+ <%- end -%>
28
+ </div>
@@ -0,0 +1,24 @@
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
+
11
+ <%%= form_for(resource, as: resource_name, url: unlock_path(resource_name), html: { method: :post }) do |f| %>
12
+ <%%= render 'devise/shared/error_messages', resource: resource %>
13
+
14
+ <div class="mb-4">
15
+ <%%= f.label :email, class: 'block email optional 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
+ </div>
18
+
19
+ <%%= f.submit 'Resend unlock instructions', class: 'my-2 bg-blue-500 hover:bg-blue-700 text-white font-bold text-sm py-2 px-4 rounded w-full' %>
20
+ <%% end %>
21
+
22
+ <%%= render 'devise/shared/links' %>
23
+ </div>
24
+ </div>
@@ -0,0 +1,15 @@
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
+ <%- 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
+
9
+ = form_for(resource, as: resource_name, url: confirmation_path(resource_name), html: { method: :post }) do |f|
10
+ = render 'devise/shared/error_messages', resource: resource
11
+ .mb-4
12
+ = f.label :email, class: 'text-sm font-medium text-gray-600'
13
+ = 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'
14
+ = 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'
15
+ = 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,7 @@
1
+ %p Hello #{@email}!
2
+ - if @resource.try(:unconfirmed_email?)
3
+ %p
4
+ We're contacting you to notify you that your email is being changed to #{@resource.unconfirmed_email}.
5
+ - else
6
+ %p
7
+ 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,23 @@
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
+ <%- 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
+
9
+ = form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :put }) do |f|
10
+ = render 'devise/shared/error_messages', resource: resource
11
+ = f.hidden_field :reset_password_token
12
+
13
+ .mb-4
14
+ = f.label :password, "New password", class: 'text-sm font-medium text-gray-600'
15
+ - if @minimum_password_length
16
+ %em= "(#{@minimum_password_length} characters minimum)"
17
+ %br
18
+ = f.password_field :password, autofocus: true, autocomplete: "new-password", class: 'text-sm font-medium text-gray-600'
19
+ .mb-4
20
+ = f.label :password_confirmation, "Confirm new password", class: 'text-sm font-medium text-gray-600'
21
+ = f.password_field :password_confirmation, autocomplete: "new-password", class: 'text-sm font-medium text-gray-600'
22
+ = 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'
23
+ = render 'devise/shared/links'
@@ -0,0 +1,15 @@
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
+ <%- 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 Forget your password?
7
+ <%- end -%>
8
+
9
+ = form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :post }) do |f|
10
+ = render 'devise/shared/error_messages', resource: resource
11
+ .mb-4
12
+ = f.label :email, class: 'block email text-sm font-medium text-gray-600'
13
+ = 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'
14
+ = 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'
15
+ = render 'devise/shared/links'
@@ -0,0 +1,42 @@
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
+ <%- 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
+
10
+ = form_for(resource, as: resource_name, url: registration_path(resource_name), html: { method: :put }) 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
+ - if devise_mapping.confirmable? && resource.pending_reconfirmation?
18
+ %div= "Currently waiting confirmation for: #{resource.unconfirmed_email}"
19
+
20
+ .mb-4
21
+ = f.label :password, class: 'block password text-sm font-medium text-gray-600'
22
+ = 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'
23
+ %p.mt-2.text-grey-700.text-xs.italic= "Leave it blank if you don't want to change it"
24
+ - if @minimum_password_length
25
+ %br
26
+ %em= "#{@minimum_password_length} characters minimum"
27
+
28
+ .mb-4
29
+ = f.label :password_confirmation, class: 'block password text-sm font-medium text-gray-600'
30
+ = 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'
31
+
32
+ .mb-4
33
+ = f.label :current_password, class: 'block password text-sm font-medium text-gray-600'
34
+ = 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'
35
+ %p.mt-2.text-grey-700.text-xs.italic We need your current password to confirm your changes
36
+
37
+ = 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'
38
+ %hr.my-5
39
+ = 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
40
+
41
+ %hr.my-5
42
+ = link_to "Back", :back
@@ -0,0 +1,27 @@
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
+ <%- 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
+
9
+ = form_for(resource, as: resource_name, url: registration_path(resource_name)) do |f|
10
+ = render 'devise/shared/error_messages', resource: resource
11
+
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
+
16
+ .mb-4
17
+ = f.label :password, class: 'block email text-sm font-medium text-gray-600'
18
+ - if @minimum_password_length
19
+ %em= "(#{@minimum_password_length} characters minimum)"
20
+ = 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'
21
+
22
+ .mb-4
23
+ = f.label :password_confirmation, class: 'block email text-sm font-medium text-gray-600'
24
+ = 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'
25
+ = 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'
26
+
27
+ = render 'devise/shared/links'
@@ -0,0 +1,25 @@
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
+ <%- 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
+
9
+ = form_for(resource, as: resource_name, url: session_path(resource_name)) do |f|
10
+ .mb-4
11
+ = f.label :email, class: 'block email optional text-sm font-medium text-gray-600'
12
+ = 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'
13
+
14
+ .mb-4
15
+ = f.label :password, class: 'block email optional text-sm font-medium text-gray-600'
16
+ = 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'
17
+
18
+ - if devise_mapping.rememberable?
19
+ .mb-4.flex.items-start.boolean.optional.user_remember_me
20
+ .flex.items-center.h-5
21
+ = 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'
22
+ .ml-3.text-sm
23
+ = f.label :remember_me, class: 'block boolean optional text-sm font-medium text-gray-600'
24
+ = 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'
25
+ = render 'devise/shared/links'
@@ -0,0 +1,6 @@
1
+ - if resource.errors.any?
2
+ .error_explanation
3
+ %h2= I18n.t('errors.messages.not_saved', count: resource.errors.count, resource: resource.class.model_name.human.downcase)
4
+ %ul
5
+ - resource.errors.full_messages.each do |message|
6
+ %li= message
@@ -0,0 +1,20 @@
1
+ .text-center.text-sm.mt-2
2
+ - if controller_name != 'sessions'
3
+ = link_to "Log in", new_session_path(resource_name)
4
+ %br
5
+ - if devise_mapping.registerable? && controller_name != 'registrations'
6
+ = link_to "Sign up", new_registration_path(resource_name)
7
+ %br
8
+ - if devise_mapping.recoverable? && controller_name != 'passwords' && controller_name != 'registrations'
9
+ = link_to "Forgot your password?", new_password_path(resource_name)
10
+ %br
11
+ - if devise_mapping.confirmable? && controller_name != 'confirmations'
12
+ = link_to "Didn't receive confirmation instructions?", new_confirmation_path(resource_name)
13
+ %br
14
+ - if devise_mapping.lockable? && resource_class.unlock_strategy_enabled?(:email) && controller_name != 'unlocks'
15
+ = link_to "Didn't receive unlock instructions?", new_unlock_path(resource_name)
16
+ %br
17
+ - if devise_mapping.omniauthable?
18
+ - resource_class.omniauth_providers.each do |provider|
19
+ = link_to "Sign in with #{OmniAuth::Utils.camelize(provider)}", omniauth_authorize_path(resource_name, provider)
20
+ %br
@@ -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
+ <%- 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
+
9
+ = form_for(resource, as: resource_name, url: unlock_path(resource_name), html: { method: :post }) do |f|
10
+ = render 'devise/shared/error_messages', resource: resource
11
+
12
+ .mb-4
13
+ = f.label :email, class: 'block email optional 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 'Resend unlock 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,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('Resend confirmation instructions') %>
6
+ <%- else -%>
7
+ Resend confirmation instructions
8
+ <%- end -%>
9
+ </h2>
10
+ <%%= simple_form_for(resource, as: resource_name, url: confirmation_path(resource_name), html: { method: :post }) do |f| %>
11
+ <%%= f.error_notification %>
12
+ <%%= f.full_error :confirmation_token %>
13
+ <%%= f.input :email, required: true, autofocus: true, value: (resource.pending_reconfirmation? ? resource.unconfirmed_email : resource email), input_html: { autocomplete: 'email' } %>
14
+ <%%= f.button :submit, 'Resend confirmation instructions', class: 'w-full' %>
15
+ <%% end %>
16
+ <%%= render 'devise/shared/links' %>
17
+ </div>
18
+ </div>
@@ -0,0 +1,20 @@
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('Change your password') %>
6
+ <%- else -%>
7
+ Change your password
8
+ <%- end -%>
9
+ </h2>
10
+ <%%= simple_form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :put }) do |f| %>
11
+ <%%= f.error_notification %>
12
+ <%%= f.input :reset_password_token, as: :hidden %>
13
+ <%%= f.full_error :reset_password_token %>
14
+ <%%= 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' } %>
15
+ <%%= f.input :password_confirmation, label: 'Confirm your new password', required: true, input_html: { autocomplete: 'new-password' } %>
16
+ <%%= f.button :submit, 'Change my password', class: 'w-full' %>
17
+ <%% end %>
18
+ <%%= render 'devise/shared/links'
19
+ </div>
20
+ </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('Forgot your password?') %>
6
+ <%- else -%>
7
+ Forgot your password?
8
+ <%- end -%>
9
+ </h2>
10
+ <%%= simple_form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :post }) do |f| %>
11
+ <%%= f.error_notification %>
12
+ <%%= f.input :email, required: true, autofocus: true, input_html: { autocomplete: 'email' } %>
13
+ <%%= f.button :submit, 'Send me reset password instructions', class: 'w-full' %>
14
+ <%% end %>
15
+ <%%= render 'devise/shared/links' %>
16
+ </div>
17
+ </div>
@@ -0,0 +1,27 @@
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("Edit #{resource_name.to_s.humanize}") %>
6
+ <%- else -%>
7
+ <%%= "Edit #{resource_name.to_s.humanize}" %>
8
+ <%- end -%>
9
+ </h2>
10
+ <hr class="my-5">
11
+ <%% simple_form_for(resource, as: resource_name, url: registration_path(resource_name), html: { method: :put }) do |f| %>
12
+ <%%= f.error_notification %>
13
+ <%%= f.input :email, required: true, autofocus: true %>
14
+ <%%- if devise_mapping confirmable? && resource pending_reconfirmation? %>
15
+ <p><%%= "Currently waiting confirmation for: #{resource.unconfirmed_email}" %></p>
16
+ <%%- end %>
17
+ <%%= f.input :password, hint: "Leave it blank if you don't want to change it", required: false, input_html: { autocomplete: 'new-password' } %>
18
+ <%%= f.input :password_confirmation, required: false, input_html: { autocomplete: 'new-password' } %>
19
+ <%%= f.input :current_password, hint: 'We need your current password to confirm your changes', required: true, input_html: { autocomplete: 'current-password' } %>
20
+ <%%= f.button :submit, 'Update', class: 'w-full' %>
21
+ <%% end %>
22
+ <hr class="my-5">
23
+ <%%= 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 %>
24
+ <hr class="my-5">
25
+ <%%= link_to 'Back', :back %>
26
+ </div>
27
+ </div>
@@ -0,0 +1,19 @@
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('Sign Up') %>
6
+ <%- else -%>
7
+ Sign Up
8
+ <%- end -%>
9
+ </h2>
10
+ <%%= simple_form_for(resource, as: resource_name, url: registration_path(resource_name)) do |f| %>
11
+ <%%= f.error_notification %>
12
+ <%%= f.input :email, required: true, autofocus: true, input_html: { autocomplete: 'email' } %>
13
+ <%%= f.input :password, required: true, hint: ("#{@minimum_password_length} characters minimum" if @minimum_password_length), input_html: { autocomplete: 'new-password' } %>
14
+ <%%= f.input :password_confirmation, required: true, input_html: { autocomplete: 'new-password' } %>
15
+ <%%= f.button :submit, 'Sign up', class: 'w-full' %>
16
+ <%% end %>
17
+ <%%= render 'devise/shared/links' %>
18
+ </div>
19
+ </div>