added hover to edit photo
This commit is contained in:
parent
71247a8f04
commit
c46ab1a98b
2 changed files with 23 additions and 1 deletions
|
@ -106,6 +106,25 @@ body,
|
||||||
float: right;
|
float: right;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.edit_user .userImage {
|
||||||
|
width: 120px;
|
||||||
|
margin: 0 auto;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
.edit_user .editPhoto {
|
||||||
|
display: none;
|
||||||
|
width: 40px;
|
||||||
|
height: 40px;
|
||||||
|
background-image: url(photo.png);
|
||||||
|
position: absolute;
|
||||||
|
top: 40px;
|
||||||
|
left: 40px;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
.edit_user .userImage:hover .editPhoto {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
html {
|
html {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,7 +8,10 @@
|
||||||
<div id="yield">
|
<div id="yield">
|
||||||
<%= form_for @user, url: user_url, :html =>{ :class => "edit_user centerGreyForm"} do |form| %>
|
<%= form_for @user, url: user_url, :html =>{ :class => "edit_user centerGreyForm"} do |form| %>
|
||||||
<h3>Edit Account</h3>
|
<h3>Edit Account</h3>
|
||||||
<% if @user.image %><%= image_tag @user.image.url(:round), :size => "120x120" %><% end %>
|
<div class="userImage">
|
||||||
|
<%= image_tag @user.image.url(:round), :size => "120x120" %>
|
||||||
|
<div class="editPhoto"></div>
|
||||||
|
</div>
|
||||||
<div class="name"> <%= @user.name %> </div>
|
<div class="name"> <%= @user.name %> </div>
|
||||||
<div><%= form.label :email, "Email:", :class => "firstFieldText" %>
|
<div><%= form.label :email, "Email:", :class => "firstFieldText" %>
|
||||||
<%= form.email_field :email %></div>
|
<%= form.email_field :email %></div>
|
||||||
|
|
Loading…
Add table
Reference in a new issue