From 5f3faad7e5d540bea9eba1a0171f4d1a6e812106 Mon Sep 17 00:00:00 2001 From: pete Date: Mon, 26 Apr 2010 11:19:22 +0000 Subject: Update to site user avatars to use CSS3 rounding for modern browsers. Older browsers will display as square avatars. git-svn-id: http://code.elgg.org/elgg/trunk@5870 36083f99-b078-4883-b0ff-0f9b5a30f544 --- mod/profile/views/default/profile/css.php | 34 +++++++++++++++++++++++++++--- mod/profile/views/default/profile/icon.php | 11 ++++++++-- 2 files changed, 40 insertions(+), 5 deletions(-) (limited to 'mod/profile/views/default') diff --git a/mod/profile/views/default/profile/css.php b/mod/profile/views/default/profile/css.php index e36aa1184..435aa4cc3 100644 --- a/mod/profile/views/default/profile/css.php +++ b/mod/profile/views/default/profile/css.php @@ -46,13 +46,41 @@ .usericon { position:relative; } -.usericon.tiny { +.usericon.tiny, +img.tiny { width:25px; height:25px; -} -.usericon.small { + /* remove the border-radius if you don't want rounded avatars in supported browsers */ + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + -moz-background-clip: border; + + -o-background-size: 25px; + -webkit-background-size: 25px; + -khtml-background-size: 25px; + -moz-background-size: 25px; +} +.usericon.small, +img.small { width:40px; height:40px; + /* remove the border-radius if you don't want rounded avatars in supported browsers */ + -webkit-border-radius: 5px; + -moz-border-radius: 5px; + -moz-background-clip: border; + + -o-background-size: 40px; + -webkit-background-size: 40px; + -khtml-background-size: 40px; + -moz-background-size: 40px; +} +img.large { + width:200px; + height:200px; +} +img.medium { + width:100px; + height:100px; } /* *************************************** diff --git a/mod/profile/views/default/profile/icon.php b/mod/profile/views/default/profile/icon.php index d5623e0c8..775da97ab 100644 --- a/mod/profile/views/default/profile/icon.php +++ b/mod/profile/views/default/profile/icon.php @@ -98,8 +98,15 @@ if ($vars['entity'] instanceof ElggUser) { } } - - ?> alt="name, ENT_QUOTES, 'UTF-8'); ?>" title="name, ENT_QUOTES, 'UTF-8'); ?>" /> + alt="name, ENT_QUOTES, 'UTF-8'); ?>" title="name, ENT_QUOTES, 'UTF-8'); ?>" style="background: url(getIcon($vars['size']); ?>) no-repeat;" class="" /> + getIcon($vars['size']); ?>" border="0" alt="name, ENT_QUOTES, 'UTF-8'); ?>" title="name, ENT_QUOTES, 'UTF-8'); ?>" /> + */ if (!$override) { ?> -- cgit v1.2.3