Skip to content

Commit 5b9bb3b

Browse files
committed
Agregando estilo a las vista de login y registrase
1 parent 3bee86b commit 5b9bb3b

File tree

7 files changed

+106
-81
lines changed

7 files changed

+106
-81
lines changed

Gemfile

100644100755
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,3 +80,4 @@ gem 'rqrcode'
8080
gem 'geocoder'
8181
gem 'icalendar'
8282
gem 'leaflet-rails'
83+
gem "font-awesome-rails"

README.md

100644100755
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,15 +60,15 @@ Things you may want to cover:
6060
```
6161
```ruby
6262
# Creat user
63-
User.create!({:name=>"name",:email => "[email protected]", :password => "111111", :password_confirmation => "111111" })
63+
User.create!({:name=>"name",:email => "you_email@gmail.com", :password => "111111", :password_confirmation => "111111" })
6464
u=User.first
6565
```
6666
```ruby
6767
# Creat role
6868
r=Role.new
6969
r.name="Admin"
7070
r.save
71-
a=u.assingnments.new
71+
a=u.assignments.new
7272
a.role_id=1
7373
a.save
7474
```

app/assets/stylesheets/application.css.scss

100644100755
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,14 @@
1818
@import "leaflet";
1919

2020
@import "events";
21+
22+
/* Import font awesome*/
23+
@import "font-awesome";
24+
25+
.social-login {
26+
padding-right: 20px;
27+
& .btn {
28+
border-radius: 10%;
29+
width: 80px;
30+
}
31+
}
Lines changed: 43 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,46 @@
11
div class="container"
22
div class="row"
3-
div class="bs-docs-section clearfix"
3+
div class="jumbotron"
44
div class="row"
5-
div class="page-header"
6-
div class="jumbotron"
7-
div class="row"
8-
h2 class="display-3"
9-
= t(:sign_up_with)
10-
11-
= form_for(resource, as: resource_name, url: registration_path(resource_name)) do |f|
12-
13-
= devise_error_messages!
14-
div class="form-group row"
15-
= link_to "<i class='fa fa-facebook'></i>".html_safe + t(:facebook), user_facebook_omniauth_authorize_path, :class => "btn btn-primary btn-lg btn-block"
16-
17-
= link_to "<i class='fa fa-twitter'></i>".html_safe + t(:github), user_github_omniauth_authorize_path, :class => "btn btn-primary btn-lg btn-block"
18-
div class="form-group row"
19-
h2 class="display-3"
20-
= t(:sign_up_with)
21-
| &nbsp;
22-
= t(:email)
23-
div class="form-group row"
24-
= f.label t(:name), class: "form-input-label"
25-
= f.text_field :name, required: true, minlength: "8", maxlength: "50", class: "form-control"
26-
div class="form-group row"
27-
= f.label t(:photo), class: "form-input-label"
28-
= f.file_field :avatar, class: "form-control-file"
29-
div class="form-group row"
30-
= f.label t(:email), class: "form-input-label"
31-
= f.email_field :email, autofocus: true, autocomplete: "email", required: true, "data-parsley-type": "email",class: "form-control"
32-
33-
div class="form-group row"
34-
= f.label t(:password), class: "form-input-label"
35-
- if @minimum_password_length
36-
em
37-
= @minimum_password_length
38-
| &nbsp;
39-
= t(:characters_minimum)
40-
= f.password_field :password, autocomplete: "off", required: true, minlength: "8", maxlength: "50", "data-parsley-type": "alphanum", class: "form-control"
41-
42-
div class="form-group row"
43-
= f.label t(:password_confirmation), required: true, "data-parsley-equalto": "#user_password", class: "form-input-label"
44-
= f.password_field :password_confirmation, autocomplete: "off", class: "form-control"
45-
46-
div class="form-group row"
47-
= f.submit t(:sign_up), class: "btn btn-primary"
48-
49-
hr class="my-4"
50-
= render "devise/shared/links"
5+
div class="col-md-4"
6+
h2 class="display-3 text-center"
7+
= t(:sign_up_with)
8+
div class="form-group"
9+
span class="social-login"
10+
= link_to "<i class='fa fa-facebook fa-4x'></i>".html_safe, user_facebook_omniauth_authorize_path, :class => "btn btn-primary"
11+
span class="social-login"
12+
= link_to "<i class='fa fa-github fa-4x'></i>".html_safe, user_github_omniauth_authorize_path, :class => "btn btn-default"
13+
div class="col-md-7 col-md-offset-1"
14+
= form_for(resource, as: resource_name, url: registration_path(resource_name)) do |f|
15+
= devise_error_messages!
16+
h2 class="display-3 text-center"
17+
= t(:sign_up_with)
18+
| &nbsp;
19+
= t(:email)
20+
div class="form-group"
21+
= f.label t(:name), for: "name"
22+
= f.text_field :name, required: true, minlength: "8", maxlength: "50", class: "form-control", id: "name", placeholder: t(:name)
23+
div class="form-group"
24+
= f.label t(:email), for: "email"
25+
= f.email_field :email, autofocus: true, autocomplete: "email", required: true, "data-parsley-type": "email", class: "form-control", id: "email", placeholder: t(:email)
26+
27+
div class="form-group"
28+
= f.label t(:photo), for: "avatar"
29+
= f.file_field :avatar, class: "form-control-file", id: "avatar"
30+
div class="form-group"
31+
= f.label t(:password), for: "password"
32+
- if @minimum_password_length
33+
em
34+
= @minimum_password_length
35+
| &nbsp;
36+
= t(:characters_minimum)
37+
= f.password_field :password, autocomplete: "off", required: true, minlength: "8", maxlength: "50", "data-parsley-type": "alphanum", class: "form-control", id: "password", placeholder: t(:password)
38+
39+
div class="form-group"
40+
= f.label t(:password_confirmation), "data-parsley-equalto": "#user_password", for: "confirmation"
41+
= f.password_field :password_confirmation, required: true, autocomplete: "off", class: "form-control", id: "confirmation", placeholder: t(:password_confirmation)
42+
43+
= f.submit t(:sign_up), class: "btn btn-primary "
44+
45+
hr class="my-4"
46+
= render "devise/shared/links"

app/views/devise/sessions/new.html.slim

100644100755
Lines changed: 34 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,36 @@
11
div class="container"
22
div class="row"
3-
div class="jumbotron"
4-
h2 class="display-3"
5-
= t(:log_in_with)
6-
= form_for(resource, as: resource_name, url: session_path(resource_name)) do |f|
7-
div class="from-group row"
8-
= link_to "<i class='fa fa-facebook'></i>".html_safe + t(:facebook), user_facebook_omniauth_authorize_path, :class => "btn btn-primary btn-lg btn-block"
9-
= link_to "<i class='fa fa-twitter'></i>".html_safe + t(:github), user_github_omniauth_authorize_path, :class => "btn btn-primary btn-lg btn-block"
10-
hr class="my-4"
11-
12-
div class="form-group row"
13-
h3 class="display-3"
14-
= t(:log_in_with_email)
15-
16-
div class="form-group row"
17-
= f.label t(:email), class: "form-input-label"
18-
= f.email_field :email, autofocus: true, autocomplete: "email", class: "form-control"
19-
20-
div class="form-group row"
21-
= f.label :password, class: "form-input-label"
22-
= f.password_field :password, autocomplete: "off", class: "form-control"
23-
24-
- if devise_mapping.rememberable?
25-
div class="form-group row"
26-
div class="form-check-lable"
27-
= f.check_box :remember_me, class: "form-check-input"
28-
|&nbsp;
29-
= f.label t(:remember_me)
30-
31-
div class="form-group row"
32-
= f.submit t(:sign_in), class: "btn btn-primary"
33-
hr class="my-4"
34-
= render "devise/shared/links"
3+
div class="jumbotron"
4+
div class="row col-md-offset-2"
5+
div class="col-md-4"
6+
h2 class="display-3 text-center"
7+
= t(:log_in_with)
8+
span class="social-login"
9+
= link_to "<i class='fa fa-facebook fa-4x'></i>".html_safe, user_facebook_omniauth_authorize_path, :class => "btn btn-primary"
10+
span class="social-login"
11+
= link_to "<i class='fa fa-github fa-4x'></i>".html_safe, user_github_omniauth_authorize_path, :class => "btn btn-default"
12+
hr class="my-4"
13+
div class="col-md-5 col-md-offset-1"
14+
h2 class="display-3 text-center"
15+
= t(:log_in)
16+
= form_for(resource, as: resource_name, url: session_path(resource_name)) do |f|
17+
18+
div class="form-group"
19+
= f.label t(:email), for: "email"
20+
= f.email_field :email, autofocus: true, autocomplete: "email", class: "form-control", id: "email", placeholder: t(:email)
21+
22+
div class="form-group"
23+
= f.label t(:password), for: "password"
24+
= f.password_field :password, autocomplete: "off", class: "form-control", id: "password", placeholder: t(:password)
25+
26+
- if devise_mapping.rememberable?
27+
div class="form-group"
28+
div class="form-check-lable"
29+
= f.check_box :remember_me, class: "form-check-input", id: "check"
30+
|&nbsp;
31+
= f.label t(:remember_me), for: "check"
32+
33+
div class="text-center"
34+
= f.submit t(:sign_in), class: "btn btn-primary btn-lg"
35+
hr class="my-4"
36+
= render "devise/shared/links"

config/locales/en.yml

100644100755
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,3 +152,11 @@ en:
152152
required: "Required"
153153
location_instruction: "You can write the address or drag the marker on the map to get more acurate address"
154154
tickets_info: "Add the URL of the ticket system you use, if you are using Floss-pa tickets, the system will add the url for your"
155+
sign_up_with: "Sign up with"
156+
sign_up: "Sign up"
157+
log_in: "Log In"
158+
log_in_with: "Log In with"
159+
log_in_with_email: "Log In"
160+
forgot_your_password: "Forgot your password"
161+
didnt_receive_confirmation_instructions: "Didn't receive confirmation_instructions?"
162+
didnt_receive_unlock_instructions: "Didn't receive unlock instructions?"

config/locales/es.yml

100644100755
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -357,3 +357,10 @@ es:
357357
required: "Campo Requerido"
358358
location_instruction: 'Puedes escribir la dirección o arrastrar el marcador en el map, esto agrega la dirección exacta al campo de "Dirección"'
359359
tickets_info: "Ingresa la dirección web del sistema de tickets externo, dejalo en blanco si usas nuestros tickets, el sistema ingresa la dirección por usted"
360+
sign_up_with: "Registrarse con"
361+
sign_up: "Registrarse"
362+
log_in: "Iniciar sesión"
363+
log_in_with: "Iniciar sesión con"
364+
forgot_your_password: "Restablecer contraseña"
365+
didnt_receive_confirmation_instructions: "¿No recibió instrucciones de confirmación?"
366+
didnt_receive_unlock_instructions: "¿No recibió instrucciones de desbloqueo?"

0 commit comments

Comments
 (0)