semantic_ui_views_generator 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +8 -1
- data/lib/generators/semantic/devise_generator.rb +61 -0
- data/lib/generators/semantic/install_generator.rb +21 -15
- data/lib/generators/semantic/templates/devise/erb/confirmations/new.html.erb.tt +34 -0
- data/lib/generators/semantic/templates/devise/erb/mailer/confirmation_instructions.html.erb +5 -0
- data/lib/generators/semantic/templates/devise/erb/mailer/email_changed.html.erb +7 -0
- data/lib/generators/semantic/templates/devise/erb/mailer/password_change.html.erb +3 -0
- data/lib/generators/semantic/templates/devise/erb/mailer/reset_password_instructions.html.erb +8 -0
- data/lib/generators/semantic/templates/devise/erb/mailer/unlock_instructions.html.erb +7 -0
- data/lib/generators/semantic/templates/devise/erb/passwords/edit.html.erb.tt +44 -0
- data/lib/generators/semantic/templates/devise/erb/passwords/new.html.erb.tt +35 -0
- data/lib/generators/semantic/templates/devise/erb/registrations/edit.html.erb.tt +54 -0
- data/lib/generators/semantic/templates/devise/erb/registrations/new.html.erb.tt +47 -0
- data/lib/generators/semantic/templates/devise/erb/sessions/new.html.erb.tt +47 -0
- data/lib/generators/semantic/templates/devise/erb/shared/_error_messages.html.erb +12 -0
- data/lib/generators/semantic/templates/devise/erb/shared/_links.html.erb +25 -0
- data/lib/generators/semantic/templates/devise/erb/unlocks/new.html.erb.tt +32 -0
- data/lib/generators/semantic/templates/devise/haml/confirmations/new.html.haml.tt +28 -0
- data/lib/generators/semantic/templates/devise/haml/mailer/confirmation_instructions.html.haml +4 -0
- data/lib/generators/semantic/templates/devise/haml/mailer/email_changed.html.haml +8 -0
- data/lib/generators/semantic/templates/devise/haml/mailer/password_change.html.haml +3 -0
- data/lib/generators/semantic/templates/devise/haml/mailer/reset_password_instructions.html.haml +6 -0
- data/lib/generators/semantic/templates/devise/haml/mailer/unlock_instructions.html.haml +5 -0
- data/lib/generators/semantic/templates/devise/haml/passwords/edit.html.haml.tt +35 -0
- data/lib/generators/semantic/templates/devise/haml/passwords/new.html.haml.tt +28 -0
- data/lib/generators/semantic/templates/devise/haml/registrations/edit.html.haml.tt +45 -0
- data/lib/generators/semantic/templates/devise/haml/registrations/new.html.haml.tt +37 -0
- data/lib/generators/semantic/templates/devise/haml/sessions/new.html.haml.tt +37 -0
- data/lib/generators/semantic/templates/devise/haml/shared/_error_messages.html.haml +7 -0
- data/lib/generators/semantic/templates/devise/haml/shared/_links.html.haml +13 -0
- data/lib/generators/semantic/templates/devise/haml/unlocks/new.html.haml.tt +27 -0
- data/lib/generators/semantic/templates/devise/simple_form/erb/confirmations/new.html.erb.tt +33 -0
- data/lib/generators/semantic/templates/devise/simple_form/erb/passwords/edit.html.erb.tt +33 -0
- data/lib/generators/semantic/templates/devise/simple_form/erb/passwords/new.html.erb.tt +30 -0
- data/lib/generators/semantic/templates/devise/simple_form/erb/registrations/edit.html.erb.tt +39 -0
- data/lib/generators/semantic/templates/devise/simple_form/erb/registrations/new.html.erb.tt +33 -0
- data/lib/generators/semantic/templates/devise/simple_form/erb/sessions/new.html.erb.tt +32 -0
- data/lib/generators/semantic/templates/devise/simple_form/erb/unlocks/new.html.erb.tt +32 -0
- data/lib/generators/semantic/templates/devise/simple_form/haml/confirmations/new.html.haml.tt +26 -0
- data/lib/generators/semantic/templates/devise/simple_form/haml/passwords/edit.html.haml.tt +27 -0
- data/lib/generators/semantic/templates/devise/simple_form/haml/passwords/new.html.haml.tt +24 -0
- data/lib/generators/semantic/templates/devise/simple_form/haml/registrations/edit.html.haml.tt +34 -0
- data/lib/generators/semantic/templates/devise/simple_form/haml/registrations/new.html.haml.tt +27 -0
- data/lib/generators/semantic/templates/devise/simple_form/haml/sessions/new.html.haml.tt +26 -0
- data/lib/generators/semantic/templates/devise/simple_form/haml/unlocks/new.html.haml.tt +26 -0
- data/lib/generators/semantic/templates/devise/simple_form/slim/confirmations/new.html.slim.tt +26 -0
- data/lib/generators/semantic/templates/devise/simple_form/slim/passwords/edit.html.slim.tt +25 -0
- data/lib/generators/semantic/templates/devise/simple_form/slim/passwords/new.html.slim.tt +22 -0
- data/lib/generators/semantic/templates/devise/simple_form/slim/registrations/edit.html.slim.tt +36 -0
- data/lib/generators/semantic/templates/devise/simple_form/slim/registrations/new.html.slim.tt +29 -0
- data/lib/generators/semantic/templates/devise/simple_form/slim/sessions/new.html.slim.tt +28 -0
- data/lib/generators/semantic/templates/devise/simple_form/slim/unlocks/new.html.slim.tt +28 -0
- data/lib/generators/semantic/templates/devise/slim/confirmations/new.html.slim.tt +28 -0
- data/lib/generators/semantic/templates/devise/slim/mailer/confirmation_instructions.html.slim +5 -0
- data/lib/generators/semantic/templates/devise/slim/mailer/email_changed.html.slim +6 -0
- data/lib/generators/semantic/templates/devise/slim/mailer/password_change.html.slim +2 -0
- data/lib/generators/semantic/templates/devise/slim/mailer/reset_password_instructions.html.slim +7 -0
- data/lib/generators/semantic/templates/devise/slim/mailer/unlock_instructions.html.slim +6 -0
- data/lib/generators/semantic/templates/devise/slim/passwords/edit.html.slim.tt +35 -0
- data/lib/generators/semantic/templates/devise/slim/passwords/new.html.slim.tt +28 -0
- data/lib/generators/semantic/templates/devise/slim/registrations/edit.html.slim.tt +45 -0
- data/lib/generators/semantic/templates/devise/slim/registrations/new.html.slim.tt +37 -0
- data/lib/generators/semantic/templates/devise/slim/sessions/new.html.slim.tt +37 -0
- data/lib/generators/semantic/templates/devise/slim/shared/_error_messages.html.slim +7 -0
- data/lib/generators/semantic/templates/devise/slim/shared/_links.html.slim +13 -0
- data/lib/generators/semantic/templates/devise/slim/unlocks/new.html.slim.tt +27 -0
- data/lib/semantic_ui_views_generator/version.rb +1 -1
- data/semantic_ui_views_generator.gemspec +1 -0
- metadata +66 -2
data/lib/generators/semantic/templates/devise/simple_form/slim/registrations/edit.html.slim.tt
ADDED
@@ -0,0 +1,36 @@
|
|
1
|
+
.ui.middle.aligned.center.aligned.grid
|
2
|
+
.column
|
3
|
+
<%- if options[:metatags] %>
|
4
|
+
h2.ui.center.aligned.dividing.header.teal
|
5
|
+
i.lock.icon
|
6
|
+
= title("Edit #{resource_name.to_s.humanize}")
|
7
|
+
<%- else %>
|
8
|
+
h2.ui.center.aligned.dividing.header.teal
|
9
|
+
i.lock.icon
|
10
|
+
| Edit #{resource_name.to_s.humanize}
|
11
|
+
<% end %>
|
12
|
+
div class=("ui form large #{"error" if resource.errors.any?}")
|
13
|
+
= simple_form_for(resource, as: resource_name, url: registration_path(resource_name), html: { method: :put }) do |f|
|
14
|
+
= f.error_notification
|
15
|
+
.field
|
16
|
+
= f.input :email, required: true, autofocus: true
|
17
|
+
- if devise_mapping.confirmable? && resource.pending_reconfirmation?
|
18
|
+
p
|
19
|
+
| Currently waiting confirmation for: #{resource.unconfirmed_email}
|
20
|
+
= f.input :password, hint: "Leave it blank if you don't want to change it", required: false, input_html: { autocomplete: 'new-password' }
|
21
|
+
= f.input :password_confirmation, required: false, input_html: { autocomplete: 'new-password' }
|
22
|
+
= f.input :current_password, hint: 'We need your current password to confirm your changes', required: true, input_html: { autocomplete: 'current-password' }
|
23
|
+
.actions
|
24
|
+
= f.button :submit
|
25
|
+
.ui.horizontal.divider or
|
26
|
+
h4.ui.light.grey.header Cancel my account
|
27
|
+
p
|
28
|
+
| Unhappy? #{button_to "Cancel my account", registration_path(resource_name), data: { confirm: "Are you sure?" }, method: :delete, class: "ui submit button red tiny "}
|
29
|
+
.ui.horizontal.list
|
30
|
+
.item= link_to "Back", :back
|
31
|
+
css:
|
32
|
+
body > .grid { height: 90%; }
|
33
|
+
.column { max-width: 450px; }
|
34
|
+
@media (min-width: 768px){
|
35
|
+
.column { max-width: 600px; }
|
36
|
+
}
|
@@ -0,0 +1,29 @@
|
|
1
|
+
.ui.middle.aligned.center.aligned.grid
|
2
|
+
.column
|
3
|
+
<%- if options[:metatags] %>
|
4
|
+
h2.ui.center.aligned.dividing.header.teal
|
5
|
+
i.signup.icon
|
6
|
+
= title("Sign up")
|
7
|
+
<%- else %>
|
8
|
+
h2.ui.center.aligned.dividing.header.teal
|
9
|
+
i.signup.icon
|
10
|
+
| Sign up
|
11
|
+
<%- end %>
|
12
|
+
div class=("ui large form #{"error" if resource.errors.any?}")
|
13
|
+
= simple_form_for(resource, as: resource_name, url: registration_path(resource_name)) do |f|
|
14
|
+
= f.error_notification
|
15
|
+
.field
|
16
|
+
= f.input :email, required: true, autofocus: true, input_html: { autocomplete: "email" }
|
17
|
+
= f.input :password, required: true, hint: ("#{@minimum_password_length} characters minimum" if @minimum_password_length), input_html: { autocomplete: "new-password" }
|
18
|
+
= f.input :password_confirmation, required: true, input_html: { autocomplete: "new-password" }
|
19
|
+
.actions
|
20
|
+
= f.button :submit, 'Sign up'
|
21
|
+
.ui.horizontal.divider or
|
22
|
+
.ui.horizontal.list
|
23
|
+
= render "devise/shared/links"
|
24
|
+
css:
|
25
|
+
body > .grid { height: 90%; }
|
26
|
+
.column { max-width: 450px; }
|
27
|
+
@media (min-width: 768px){
|
28
|
+
.column { max-width: 600px; }
|
29
|
+
}
|
@@ -0,0 +1,28 @@
|
|
1
|
+
.ui.middle.aligned.center.aligned.grid
|
2
|
+
.column
|
3
|
+
<%- if options[:metatags] %>
|
4
|
+
h2.ui.center.aligned.dividing.header.teal
|
5
|
+
i.sign.in.icon
|
6
|
+
= title('Log in')
|
7
|
+
<%- else %>
|
8
|
+
h2.ui.center.aligned.dividing.header.teal
|
9
|
+
i.sign.in.icon
|
10
|
+
| Log in
|
11
|
+
<%- end %>
|
12
|
+
.ui.large.form
|
13
|
+
= simple_form_for(resource, as: resource_name, url: session_path(resource_name)) do |f|
|
14
|
+
.field
|
15
|
+
= f.input :email, required: false, autofocus: true, input_html: { autocomplete: 'email' }
|
16
|
+
= f.input :password, required: false, input_html: { autocomplete: 'current-password' }
|
17
|
+
= f.input :remember_me, as: :boolean if devise_mapping.rememberable?
|
18
|
+
.actions
|
19
|
+
= f.button :submit, 'Log in'
|
20
|
+
.ui.horizontal.divider or
|
21
|
+
.ui.horizontal.list
|
22
|
+
= render "devise/shared/links"
|
23
|
+
css:
|
24
|
+
body > .grid { height: 90%; }
|
25
|
+
.column { max-width: 450px; }
|
26
|
+
@media (min-width: 768px){
|
27
|
+
.column { max-width: 600px; }
|
28
|
+
}
|
@@ -0,0 +1,28 @@
|
|
1
|
+
.ui.middle.aligned.center.aligned.grid
|
2
|
+
.column
|
3
|
+
<%- if options[:metatags] %>
|
4
|
+
h2.ui.center.aligned.dividing.header.teal
|
5
|
+
i.lock.icon
|
6
|
+
- = title('Resend unlock instructions')
|
7
|
+
<%- else %>
|
8
|
+
h2.ui.center.aligned.dividing.header.teal
|
9
|
+
i.lock.icon
|
10
|
+
| Resend unlock instructions
|
11
|
+
<%- end %>
|
12
|
+
div class=("ui form large #{"error" if resource.errors.any?}")
|
13
|
+
= simple_form_for(resource, as: resource_name, url: unlock_path(resource_name), html: { method: :post }) do |f|
|
14
|
+
= f.error_notification
|
15
|
+
= f.full_error :unlock_token
|
16
|
+
.field
|
17
|
+
= f.input :email, required: true, autofocus: true, input_html: { autocomplete: 'email' }
|
18
|
+
.actions
|
19
|
+
= f.button :submit, 'Resend unlock instructions'
|
20
|
+
.ui.horizontal.divider or
|
21
|
+
.ui.horizontal.list
|
22
|
+
= render "devise/shared/links"
|
23
|
+
css:
|
24
|
+
body > .grid { height: 90%; }
|
25
|
+
.column { max-width: 450px; }
|
26
|
+
@media (min-width: 768px){
|
27
|
+
.column { max-width: 600px; }
|
28
|
+
}
|
@@ -0,0 +1,28 @@
|
|
1
|
+
.ui.middle.aligned.center.aligned.grid.grey
|
2
|
+
.column
|
3
|
+
h2.ui.center.aligned.dividing.header.teal
|
4
|
+
i.signup.icon
|
5
|
+
<%- if options[:metatags] %>
|
6
|
+
= title('Sign up')
|
7
|
+
<% else -%>
|
8
|
+
| Sign up
|
9
|
+
<%- end %>
|
10
|
+
div class=("ui large form #{"error" if resource.errors.any?}")
|
11
|
+
= form_for(resource, as: resource_name, url: confirmation_path(resource_name), html: { method: :post }) do |f|
|
12
|
+
.ui.error.message
|
13
|
+
= render 'devise/shared/error_messages'
|
14
|
+
.field
|
15
|
+
= f.label :email
|
16
|
+
br
|
17
|
+
= f.email_field :email, autofocus: true, value: (resource.pending_reconfirmation? ? resource.unconfirmed_email : resource.email) ,placeholder: "Enter your email"
|
18
|
+
.actions
|
19
|
+
= f.submit 'Resend confirmation instructions', class: 'ui submit button teal fluid'
|
20
|
+
.ui.horizontal.divider or
|
21
|
+
.ui.horizontal.list
|
22
|
+
= render 'devise/shared/links'
|
23
|
+
css:
|
24
|
+
body > .grid { height: 90%; }
|
25
|
+
.column { max-width: 450px; }
|
26
|
+
@media (min-width: 768px){
|
27
|
+
.column { max-width: 600px; }
|
28
|
+
}
|
@@ -0,0 +1,6 @@
|
|
1
|
+
p = "Hello #{@email}!"
|
2
|
+
|
3
|
+
- if @resource.try(:unconfirmed_email?)
|
4
|
+
p = "We're contacting you to notify you that your email is being changed to #{@resource.unconfirmed_email} %>."
|
5
|
+
- else
|
6
|
+
p = "We're contacting you to notify you that your email has been changed to #{@resource.email}."
|
data/lib/generators/semantic/templates/devise/slim/mailer/reset_password_instructions.html.slim
ADDED
@@ -0,0 +1,7 @@
|
|
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
|
4
|
+
= link_to 'Change my password', edit_password_url(@resource, reset_password_token: @token)
|
5
|
+
|
6
|
+
p If you didn't request this, please ignore this email.
|
7
|
+
p Your password won't change until you access the link above and create a new one.
|
@@ -0,0 +1,35 @@
|
|
1
|
+
.ui.middle.aligned.center.aligned.grid
|
2
|
+
.column
|
3
|
+
h2.ui.center.aligned.dividing.header.teal
|
4
|
+
i.lock.icon
|
5
|
+
<%- if options[:metatags] %>
|
6
|
+
= title('Change your password')
|
7
|
+
<% else -%>
|
8
|
+
| Change your password
|
9
|
+
<%- end %>
|
10
|
+
div class=("ui form large #{"error" if resource.errors.any?}")
|
11
|
+
= form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :put }) do |f|
|
12
|
+
.ui.error.message
|
13
|
+
= render 'devise/shared/error_messages'
|
14
|
+
= f.hidden_field :reset_password_token
|
15
|
+
.field
|
16
|
+
= f.label :password, "New password"
|
17
|
+
- if @minimum_password_length
|
18
|
+
.ui.pointing.below.label
|
19
|
+
= @minimum_password_length
|
20
|
+
| characters minimum
|
21
|
+
= f.password_field :password, autofocus: true, autocomplete: "off" , placeholder: "Enter new password"
|
22
|
+
.field
|
23
|
+
= f.label :password_confirmation, "Confirm new password"
|
24
|
+
= f.password_field :password_confirmation, autocomplete: "off" , placeholder: "Confirm new password"
|
25
|
+
.actions
|
26
|
+
= f.submit "Change my password",class: "ui submit button teal fluid"
|
27
|
+
.ui.horizontal.divider or
|
28
|
+
.ui.horizontal.list
|
29
|
+
= render "devise/shared/links"
|
30
|
+
css:
|
31
|
+
body > .grid { height: 90%; }
|
32
|
+
.column { max-width: 450px; }
|
33
|
+
@media (min-width: 768px){
|
34
|
+
.column { max-width: 600px; }
|
35
|
+
}
|
@@ -0,0 +1,28 @@
|
|
1
|
+
.ui.middle.aligned.center.aligned.grid
|
2
|
+
.column
|
3
|
+
h2.ui.center.aligned.dividing.header.teal
|
4
|
+
i.lock.icon
|
5
|
+
<%- if options[:metatags] %>
|
6
|
+
= title('Forgot your password?')
|
7
|
+
<% else -%>
|
8
|
+
| Forgot your password?
|
9
|
+
<%- end %>
|
10
|
+
div class=("ui form large #{"error" if resource.errors.any?}")
|
11
|
+
= form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :post }) do |f|
|
12
|
+
.ui.error.message
|
13
|
+
= render 'devise/shared/error_messages'
|
14
|
+
.field
|
15
|
+
= f.label :email
|
16
|
+
= f.email_field :email, autofocus: true ,placeholder: "Enter your registered email"
|
17
|
+
br
|
18
|
+
.actions
|
19
|
+
= f.submit "Send me reset password instructions",class: "ui submit button teal fluid"
|
20
|
+
.ui.horizontal.divider or
|
21
|
+
.ui.horizontal.list
|
22
|
+
= render "devise/shared/links"
|
23
|
+
css:
|
24
|
+
body > .grid { height: 90%; }
|
25
|
+
.column { max-width: 450px; }
|
26
|
+
@media (min-width: 768px){
|
27
|
+
.column { max-width: 600px; }
|
28
|
+
}
|
@@ -0,0 +1,45 @@
|
|
1
|
+
.ui.middle.aligned.center.aligned.grid
|
2
|
+
.column
|
3
|
+
h2.ui.center.aligned.dividing.header.teal
|
4
|
+
i.lock.icon
|
5
|
+
<%- if options[:metatags] %>
|
6
|
+
= title("Edit #{resource_name.to_s.humanize}")
|
7
|
+
<% else -%>
|
8
|
+
= "Edit #{resource_name.to_s.humanize}"
|
9
|
+
<%- end %>
|
10
|
+
div class=("ui form large #{"error" if resource.errors.any?}")
|
11
|
+
= form_for(resource, as: resource_name, url: registration_path(resource_name), html: { method: :put }) do |f|
|
12
|
+
= render 'devise/shared/error_messages'
|
13
|
+
.field
|
14
|
+
= f.label :email
|
15
|
+
= f.email_field :email, autofocus: true
|
16
|
+
- if devise_mapping.confirmable? && resource.pending_reconfirmation?
|
17
|
+
div
|
18
|
+
| Currently waiting confirmation for: #{resource.unconfirmed_email}
|
19
|
+
.field
|
20
|
+
= f.label :password
|
21
|
+
- if @minimum_password_length
|
22
|
+
.ui.pointing.below.label
|
23
|
+
= @minimum_password_length
|
24
|
+
| characters minimum
|
25
|
+
= f.password_field :password, autocomplete: "off", placeholder: "Enter new password (leave blank if you don't want to change it)"
|
26
|
+
.field
|
27
|
+
= f.label :password_confirmation
|
28
|
+
= f.password_field :password_confirmation, autocomplete: "off" ,placeholder: "Confirm new password"
|
29
|
+
.field
|
30
|
+
= f.label :current_password
|
31
|
+
= f.password_field :current_password, autocomplete: "off",placeholder: "(we need your current password to confirm your changes)"
|
32
|
+
.actions
|
33
|
+
= f.submit "Update", class: "ui submit button fluid teal"
|
34
|
+
.ui.horizontal.divider or
|
35
|
+
h4.ui.light.grey.header Cancel my account
|
36
|
+
p
|
37
|
+
| Unhappy? #{button_to "Cancel my account", registration_path(resource_name), data: { confirm: "Are you sure?" }, method: :delete ,class: "ui submit button red tiny "}
|
38
|
+
.ui.horizontal.list
|
39
|
+
.item= link_to "Back", :back
|
40
|
+
css:
|
41
|
+
body > .grid { height: 90%; }
|
42
|
+
.column { max-width: 450px; }
|
43
|
+
@media (min-width: 768px){
|
44
|
+
.column { max-width: 600px; }
|
45
|
+
}
|
@@ -0,0 +1,37 @@
|
|
1
|
+
.ui.middle.aligned.center.aligned.grid.grey
|
2
|
+
.column
|
3
|
+
h2.ui.center.aligned.dividing.header.teal
|
4
|
+
i.signup.icon
|
5
|
+
<%- if options[:metatags] %>
|
6
|
+
= title("Sign up")
|
7
|
+
<% else -%>
|
8
|
+
| Sign up
|
9
|
+
<%- end %>
|
10
|
+
div class=("ui large form #{"error" if resource.errors.any?}")
|
11
|
+
= form_for(resource, as: resource_name, url: registration_path(resource_name)) do |f|
|
12
|
+
.ui.error.message
|
13
|
+
= render 'devise/shared/error_messages'
|
14
|
+
.field
|
15
|
+
= f.label :email
|
16
|
+
= f.email_field :email, autofocus: true ,placeholder: "mail@example.com"
|
17
|
+
.field
|
18
|
+
= f.label :password
|
19
|
+
- if @minimum_password_length
|
20
|
+
.ui.pointing.below.label
|
21
|
+
= @minimum_password_length
|
22
|
+
| characters minimum
|
23
|
+
= f.password_field :password, autocomplete: "off" ,placeholder: "Enter Password", data: { toggle: "tooltip", placement: "left" }
|
24
|
+
.field
|
25
|
+
= f.label :password_confirmation
|
26
|
+
= f.password_field :password_confirmation, autocomplete: "off" ,placeholder: "Confirm Password"
|
27
|
+
.actions
|
28
|
+
= f.submit "Sign up", class: "ui submit button fluid teal"
|
29
|
+
.ui.horizontal.divider or
|
30
|
+
.ui.horizontal.list
|
31
|
+
= render "devise/shared/links"
|
32
|
+
css:
|
33
|
+
body > .grid { height: 90%; }
|
34
|
+
.column { max-width: 450px; }
|
35
|
+
@media (min-width: 768px){
|
36
|
+
.column { max-width: 600px; }
|
37
|
+
}
|
@@ -0,0 +1,37 @@
|
|
1
|
+
.ui.middle.aligned.center.aligned.grid
|
2
|
+
.column
|
3
|
+
h2.ui.center.aligned.dividing.header.teal
|
4
|
+
i.sign.in.icon
|
5
|
+
<%- if options[:metatags] %>
|
6
|
+
= title('Log in')
|
7
|
+
<% else -%>
|
8
|
+
| Log in
|
9
|
+
<%- end %>
|
10
|
+
.ui.large.form
|
11
|
+
= form_for(resource, as: resource_name, url: session_path(resource_name)) do |f|
|
12
|
+
.field
|
13
|
+
= f.label :email
|
14
|
+
.ui.left.icon.input
|
15
|
+
= f.email_field :email, autofocus: true ,placeholder:"Email"
|
16
|
+
i.user.icon
|
17
|
+
.field
|
18
|
+
= f.label :password
|
19
|
+
.ui.left.icon.input
|
20
|
+
= f.password_field :password, autocomplete: "off" ,placeholder:"Password"
|
21
|
+
i.lock.icon
|
22
|
+
- if devise_mapping.rememberable?
|
23
|
+
.ui.checkbox
|
24
|
+
= f.check_box :remember_me
|
25
|
+
= f.label :remember_me
|
26
|
+
br
|
27
|
+
.actions
|
28
|
+
= f.submit "Log in", class: "ui submit button fluid teal"
|
29
|
+
.ui.horizontal.divider or
|
30
|
+
.ui.horizontal.list
|
31
|
+
= render "devise/shared/links"
|
32
|
+
css:
|
33
|
+
body > .grid { height: 90%; }
|
34
|
+
.column { max-width: 450px; }
|
35
|
+
@media (min-width: 768px){
|
36
|
+
.column { max-width: 600px; }
|
37
|
+
}
|
@@ -0,0 +1,13 @@
|
|
1
|
+
- if controller_name != 'sessions'
|
2
|
+
.item = link_to "Log in", new_session_path(resource_name)
|
3
|
+
- if devise_mapping.registerable? && controller_name != 'registrations'
|
4
|
+
.item = link_to "Sign up", new_registration_path(resource_name)
|
5
|
+
- if devise_mapping.recoverable? && controller_name != 'passwords' && controller_name != 'registrations'
|
6
|
+
.item = link_to "Forgot your password?", new_password_path(resource_name)
|
7
|
+
- if devise_mapping.confirmable? && controller_name != 'confirmations'
|
8
|
+
.item = link_to "Didn't receive confirmation instructions?", new_confirmation_path(resource_name)
|
9
|
+
- if devise_mapping.lockable? && resource_class.unlock_strategy_enabled?(:email) && controller_name != 'unlocks'
|
10
|
+
.item = link_to "Didn't receive unlock instructions?", new_unlock_path(resource_name)
|
11
|
+
- if devise_mapping.omniauthable?
|
12
|
+
- resource_class.omniauth_providers.each do |provider|
|
13
|
+
.item = link_to "Sign in with # OmniAuth::Utils.camelize(provider) ", omniauth_authorize_path(resource_name, provider)
|
@@ -0,0 +1,27 @@
|
|
1
|
+
.ui.middle.aligned.center.aligned.grid
|
2
|
+
.column
|
3
|
+
h2.ui.center.aligned.dividing.header.teal
|
4
|
+
i.lock.icon
|
5
|
+
<%- if options[:metatags] %>
|
6
|
+
= title('Resend unlock instructions')
|
7
|
+
<% else -%>
|
8
|
+
| Resend unlock instructions
|
9
|
+
<%- end %>
|
10
|
+
div class=("ui form large #{"error" if resource.errors.any?}")
|
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
|
+
.field
|
14
|
+
= f.label :email
|
15
|
+
br/
|
16
|
+
= f.email_field :email, autofocus: true, autocomplete: "email"
|
17
|
+
.actions
|
18
|
+
= f.submit "Resend unlock instructions", class: "ui submit button fluid teal"
|
19
|
+
.ui.horizontal.divider or
|
20
|
+
.ui.horizontal.list
|
21
|
+
= render "devise/shared/links"
|
22
|
+
css:
|
23
|
+
body > .grid { height: 90%; }
|
24
|
+
.column { max-width: 450px; }
|
25
|
+
@media (min-width: 768px){
|
26
|
+
.column { max-width: 600px; }
|
27
|
+
}
|