From 7be56849d9d7d29f18c7d0ad23ebead9ad94fc2f Mon Sep 17 00:00:00 2001 From: Marcelo Briones Date: Thu, 5 Mar 2015 20:42:30 -0300 Subject: [PATCH] DRY on avatars --- app/assets/stylesheets/header.scss | 1 - app/assets/stylesheets/new_styles/_base.scss | 16 ++++++++-------- app/assets/stylesheets/new_styles/_settings.scss | 7 +++++-- app/assets/stylesheets/notifications.scss | 4 ---- app/assets/stylesheets/single-post-view.scss | 3 --- app/assets/templates/header_tpl.jst.hbs | 2 +- app/views/photos/_new_profile_photo.haml | 2 +- 7 files changed, 15 insertions(+), 20 deletions(-) diff --git a/app/assets/stylesheets/header.scss b/app/assets/stylesheets/header.scss index 4ce2735a1..7e4757ae8 100644 --- a/app/assets/stylesheets/header.scss +++ b/app/assets/stylesheets/header.scss @@ -339,7 +339,6 @@ body > header { left: 8px; top: 8px; display: block; - border-radius: 3px; } .header-nav { diff --git a/app/assets/stylesheets/new_styles/_base.scss b/app/assets/stylesheets/new_styles/_base.scss index 609876def..0f078ecba 100644 --- a/app/assets/stylesheets/new_styles/_base.scss +++ b/app/assets/stylesheets/new_styles/_base.scss @@ -31,22 +31,22 @@ a { color : $link-blue } .icon-blue { background-image: image_url("img/glyphicons-halflings-blue.png"); } .avatar { + border-radius: 4px; + &.micro { height: 20px; width: 20px; - box-shadow: 0px 1px 2px 0px #666; - -webkit-box-shadow: 0px 1px 2px 0px #666; - -moz-box-shadow: 0px 1px 2px 0px #666; - border-radius: 3px; } &.small { height: 35px; width: 35px; - box-shadow: 0px 1px 2px 0px #666; - -webkit-box-shadow: 0px 1px 2px 0px #666; - -moz-box-shadow: 0px 1px 2px 0px #666; - border-radius: 4px; + } + + &.medium { + height: auto; + width: auto; + max-width: 75px; } } diff --git a/app/assets/stylesheets/new_styles/_settings.scss b/app/assets/stylesheets/new_styles/_settings.scss index d5324108c..f0679ed8a 100644 --- a/app/assets/stylesheets/new_styles/_settings.scss +++ b/app/assets/stylesheets/new_styles/_settings.scss @@ -13,5 +13,8 @@ } #profile_photo_upload .avatar { - max-width: 150px; -} \ No newline at end of file + height: auto; + width: auto; + max-width: 200px; + margin-bottom: 10px; +} diff --git a/app/assets/stylesheets/notifications.scss b/app/assets/stylesheets/notifications.scss index 5aa393d13..9b67bf0fb 100644 --- a/app/assets/stylesheets/notifications.scss +++ b/app/assets/stylesheets/notifications.scss @@ -78,10 +78,6 @@ .avatar { width: 35px; height: 35px; - box-shadow: 0px 1px 2px 0px #666; - -webkit-box-shadow: 0px 1px 2px 0px #666; - -moz-box-shadow: 0px 1px 2px 0px #666; - border-radius: 3px; } .unread-toggle { diff --git a/app/assets/stylesheets/single-post-view.scss b/app/assets/stylesheets/single-post-view.scss index f931fc61f..3a371efbb 100644 --- a/app/assets/stylesheets/single-post-view.scss +++ b/app/assets/stylesheets/single-post-view.scss @@ -20,9 +20,6 @@ line-height: $font-size-text; } } - .avatar.medium { - max-width: 75px; - } .bd { padding-left: 10px; } diff --git a/app/assets/templates/header_tpl.jst.hbs b/app/assets/templates/header_tpl.jst.hbs index 2c2bb2d86..0361701e0 100644 --- a/app/assets/templates/header_tpl.jst.hbs +++ b/app/assets/templates/header_tpl.jst.hbs @@ -72,7 +72,7 @@
- {{current_user.name}} + {{current_user.name}} {{current_user.name}}
  • {{t "header.profile"}}
  • diff --git a/app/views/photos/_new_profile_photo.haml b/app/views/photos/_new_profile_photo.haml index 2c6b50b0c..af526be04 100644 --- a/app/views/photos/_new_profile_photo.haml +++ b/app/views/photos/_new_profile_photo.haml @@ -58,7 +58,7 @@ window.onload = createUploader; #profile_photo_upload - = owner_image_tag(:thumb_medium) + = owner_image_tag(:thumb_large) .clearfix