Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added app/assets/images/cam-edit-user-avatar.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
26 changes: 6 additions & 20 deletions app/assets/stylesheets/app/application/base.scss
Original file line number Diff line number Diff line change
Expand Up @@ -411,15 +411,6 @@ form {
}
}

.navbar-user-chip.open {
.navbar-user-toggle {
.border {
border: $m-logo-border-size solid $m-color-primary-soft;
border-radius: 50%;
}
}
}

.navbar-user-chip {
font-size: $m-font-mini;
margin: ($m-navbar-height - $m-navbar-btn-size - $m-logo-border-size - $m-logo-border-size)/2 0;
Expand All @@ -432,29 +423,24 @@ form {
background: $m-navbar-font-highlight;
}

.border {
border: $m-logo-border-size solid $m-logo-border;
border-radius: 50%;
@include transition(all 0.2s ease-in-out);
}

.border:hover {
border: $m-logo-border-size solid $m-color-primary-soft;
border-radius: 50%;
}

img, .logo-user {
height: $m-navbar-btn-size;
width: $m-navbar-btn-size;
float: none;
display: inline-block;
border: $m-logo-border-size solid $m-logo-border;
font-size: $m-logo-font-size;
padding: 2px;
transition: border .2s ease-in;

&.logo-initials {
padding: $m-logo-initials-padding;
}
}

.logo-user:hover {
border: $m-logo-border-size solid $m-color-primary-soft;
}
}

.navbar-user-menu {
Expand Down
34 changes: 29 additions & 5 deletions app/assets/stylesheets/app/users/show.scss
Original file line number Diff line number Diff line change
Expand Up @@ -30,22 +30,46 @@ body.users.update {
font-weight: $m-font-weight-bold;
}

@include logo-container;
.logo-image-container {
margin-top: -50%;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please change it to a 'px' value. Note that the number will change too.

height: 250px;
}

.logo-user {
height: 250px;
width: 250px;
float: none;
margin-top: -35%;
display: inline-block;
border: 1px solid $m-logo-border;
border-radius: 50%;
border: 10px solid $m-logo-border;//espessura da borda
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comments always in English, but remove this one. Not relevant.

margin: 0 auto;

&.logo-initials {
padding: 90px 0;
font-size: 80px;
}
}

.logo-image-controls {
height: 250px;
width: 250px;
background: rgba(10, 23, 55, 0.5);
border-radius: 50%;
position: absolute;
left: 0;
top: 0;
right: 0;
margin: 0 auto;
border: 10px solid $m-logo-border;
}

.logo-image-text {
color: white;
margin-top: 30%;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please change it to a 'px' value. Note that the number will change too.

img {
height: 85px;
width: 110px;
}
}

.dropdown-toggle {
background: none;
}
Expand Down
8 changes: 2 additions & 6 deletions app/helpers/logo_images_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,9 @@ def logo_image(resource, options={})
elsif version_name == :logo336x256
version_name = :logo168x128 unless resource.logo_image.send(version_name).file.exists?
end
content_tag :div, class: 'border' do
concat image_tag(resource.logo_image_url(version_name), options)
end
image_tag(resource.logo_image_url(version_name), options)
else
content_tag :div, class: 'border' do
concat logo_initials(resource, options)
end
logo_initials(resource, options)
end

# Try a gravatar image if we have a confirmed user
Expand Down
8 changes: 7 additions & 1 deletion app/views/users/edit_data.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,12 @@
#content-strip.container-fluid
.dropdown
.dropdown-toggle{ data: { toggle: 'dropdown' } }
= logo_image(@user, class: "logo-user")
.logo-image-container
= logo_image(@user, class: "logo-user")
.logo-image-controls
.logo-image-text
=image_tag("cam-edit-user-avatar.png")

%ul.dropdown-menu.dropdown-menu-right
%li= upload_logo_controls(@user)
%li= link_to t('.remove_picture'), remove_logo_user_path(@user), method: "post"
Expand All @@ -25,6 +30,7 @@
= p.input :description, as: :text
= p.input :url


Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unnecessary line. Remove it.

%h3= t('.address')
= f.simple_fields_for :profile do |p|
.form-group.select.optional.user_profile_country
Expand Down
3 changes: 2 additions & 1 deletion app/views/users/show.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
= render :partial => 'users/menu'

#content-strip.container-fluid
= logo_image(@user, class: "logo-user")
.logo-image-container
= logo_image(@user, class: "logo-user")

.user-profile
%span.name= @user.name
Expand Down