Merge pull request #105 from cmgustavo/ref/design-28

Fix Address book directive. Adds gravatar
This commit is contained in:
Gustavo Maximiliano Cortez 2016-09-14 10:06:50 -03:00 committed by GitHub
commit 9f88d9a3cb
7 changed files with 53 additions and 4 deletions

View file

@ -9,6 +9,7 @@ var modules = [
'angular-clipboard',
'ngLodash',
'ngCsv',
'angular-md5',
'bwcModule',
'pbkdf2Module',
'copayApp.filters',

View file

@ -0,0 +1,20 @@
'use strict';
angular.module('copayApp.directives')
.directive('gravatar', function(md5) {
return {
restrict: 'AE',
replace: true,
scope: {
name: '@',
height: '@',
width: '@',
email: '@'
},
link: function(scope, el, attr) {
scope.emailHash = md5.createHash(scope.email || '');
},
template: '<img class="gravatar" alt="{{ name }}" height="{{ height }}" width="{{ width }}" src="https://secure.gravatar.com/avatar/{{ emailHash }}.jpg?s={{ width }}&d=mm">'
}
});

View file

@ -937,6 +937,27 @@ input[type=number] {
}
}
/** Gravatar **/
.gravatar {
border-radius: 50%;
}
.gravatar-content {
position: relative;
height: 70px;
border-color: #172565;
background-color: #1e3186;
background-image: linear-gradient(0deg, #172565, #172565 0%, transparent 0%);
color: #fff;
margin-bottom: 50px;
.gravatar {
position: absolute;
bottom: -30px;
left: 41%;
}
}
/* Spinner */
.item-icon-left ion-spinner {