diff --git a/.meteor/packages b/.meteor/packages index 54ddb8016f0b..59f5e9f5e6a8 100644 --- a/.meteor/packages +++ b/.meteor/packages @@ -39,7 +39,6 @@ tap:i18n tmeasday:crypto-md5 tmeasday:errors todda00:friendly-slugs -utilities:avatar simple:highlight.js percolate:migrations underscorestring:underscore.string diff --git a/.meteor/versions b/.meteor/versions index 1cb8698f2518..073052963642 100644 --- a/.meteor/versions +++ b/.meteor/versions @@ -115,7 +115,6 @@ simple:highlight.js@1.0.9 spacebars@1.0.6 spacebars-compiler@1.0.6 srp@1.0.3 -stylus@1.0.7 tap:i18n@1.4.1 templating@1.1.1 tmeasday:crypto-base@3.1.2 @@ -127,7 +126,6 @@ ui@1.0.6 underscore@1.0.3 underscorestring:underscore.string@3.0.3_1 url@1.0.4 -utilities:avatar@0.7.10 webapp@1.2.0 webapp-hashing@1.0.3 yasaricli:slugify@0.0.5 diff --git a/client/stylesheets/base.less b/client/stylesheets/base.less index a01fef8d9b0a..df4ce0d67861 100644 --- a/client/stylesheets/base.less +++ b/client/stylesheets/base.less @@ -663,7 +663,12 @@ a.github-fork { height: 100%; width: 100%; overflow: hidden; + position: relative; .avatar-image { + height: 100%; + width: 100%; + min-height: 40px; + min-width: 40px; display: block; background-color: transparent; background-size: cover; diff --git a/client/views/avatar/avatar.coffee b/client/views/avatar/avatar.coffee index 7580440909ea..fbdfd105e19c 100644 --- a/client/views/avatar/avatar.coffee +++ b/client/views/avatar/avatar.coffee @@ -1,53 +1,13 @@ -Template.avatarPrompt.onCreated -> - self = this - self.suggestions = new ReactiveVar - self.upload = new ReactiveVar - - self.getSuggestions = -> - self.suggestions.set undefined - Meteor.call 'getAvatarSuggestion', (error, avatars) -> - self.suggestions.set - ready: true - avatars: avatars - - self.getSuggestions() - - -Template.avatarPrompt.helpers - suggestions: -> - return Template.instance().suggestions.get() - - upload: -> - return Template.instance().upload.get() - - -Template.avatarPrompt.events - 'click .select-service': (e) -> - Meteor.call 'setAvatarFromService', this.blob, this.service, -> - console.log arguments - - 'click .login-with-service': (event, template) -> - loginWithService = "loginWith#{_.capitalize(this)}" - - serviceConfig = {} - - Meteor[loginWithService] serviceConfig, (error) -> - if error?.error is 'github-no-public-email' - alert t("loginServices.github_no_public_email") - return - - console.log error - if error? - toastr.error error.message - return - - template.getSuggestions() - - 'change .myFileInput': (event, template) -> - FS.Utility.eachFile event, (blob) -> - reader = new FileReader() - reader.readAsDataURL(blob) - reader.onloadend = -> - template.upload.set - service: 'upload' - blob: reader.result +Template.avatar.helpers + dimensions: -> + return { + width: 40 + height: 40 + } + + imageUrl: -> + username = this.username + if not username? and this.userId? + username = Meteor.users.findOne(this.userId)?.username + url = "#{Meteor.absoluteUrl()}/avatar/#{username}" + return url \ No newline at end of file diff --git a/client/views/avatar/avatar.html b/client/views/avatar/avatar.html index b54e2e735da2..cd1e1da0f2c3 100644 --- a/client/views/avatar/avatar.html +++ b/client/views/avatar/avatar.html @@ -1,71 +1,6 @@ - - - - - + \ No newline at end of file diff --git a/client/views/avatar/avatarPrompt.coffee b/client/views/avatar/avatarPrompt.coffee new file mode 100644 index 000000000000..7580440909ea --- /dev/null +++ b/client/views/avatar/avatarPrompt.coffee @@ -0,0 +1,53 @@ +Template.avatarPrompt.onCreated -> + self = this + self.suggestions = new ReactiveVar + self.upload = new ReactiveVar + + self.getSuggestions = -> + self.suggestions.set undefined + Meteor.call 'getAvatarSuggestion', (error, avatars) -> + self.suggestions.set + ready: true + avatars: avatars + + self.getSuggestions() + + +Template.avatarPrompt.helpers + suggestions: -> + return Template.instance().suggestions.get() + + upload: -> + return Template.instance().upload.get() + + +Template.avatarPrompt.events + 'click .select-service': (e) -> + Meteor.call 'setAvatarFromService', this.blob, this.service, -> + console.log arguments + + 'click .login-with-service': (event, template) -> + loginWithService = "loginWith#{_.capitalize(this)}" + + serviceConfig = {} + + Meteor[loginWithService] serviceConfig, (error) -> + if error?.error is 'github-no-public-email' + alert t("loginServices.github_no_public_email") + return + + console.log error + if error? + toastr.error error.message + return + + template.getSuggestions() + + 'change .myFileInput': (event, template) -> + FS.Utility.eachFile event, (blob) -> + reader = new FileReader() + reader.readAsDataURL(blob) + reader.onloadend = -> + template.upload.set + service: 'upload' + blob: reader.result diff --git a/client/views/avatar/avatarPrompt.html b/client/views/avatar/avatarPrompt.html new file mode 100644 index 000000000000..b54e2e735da2 --- /dev/null +++ b/client/views/avatar/avatarPrompt.html @@ -0,0 +1,71 @@ + + + + + diff --git a/packages/meteor-avatar/.versions b/packages/meteor-avatar/.versions deleted file mode 100644 index 2395dce81cfe..000000000000 --- a/packages/meteor-avatar/.versions +++ /dev/null @@ -1,27 +0,0 @@ -base64@1.0.3 -blaze@2.1.2 -blaze-tools@1.0.3 -deps@1.0.7 -ejson@1.0.6 -geojson-utils@1.0.3 -html-tools@1.0.4 -htmljs@1.0.4 -id-map@1.0.3 -jparker:crypto-core@0.1.0 -jparker:crypto-md5@0.1.1 -jparker:gravatar@0.3.1 -jquery@1.11.3_2 -json@1.0.3 -meteor@1.1.6 -minifiers@1.1.5 -minimongo@1.0.8 -observe-sequence@1.0.6 -ordered-dict@1.0.3 -random@1.0.3 -reactive-var@1.0.5 -spacebars-compiler@1.0.6 -stylus@1.0.7 -templating@1.1.1 -tracker@1.0.7 -underscore@1.0.3 -utilities:avatar@0.7.8 diff --git a/packages/meteor-avatar/History.md b/packages/meteor-avatar/History.md deleted file mode 100644 index 303f4a42866b..000000000000 --- a/packages/meteor-avatar/History.md +++ /dev/null @@ -1,8 +0,0 @@ -### 0.7.9 - -- Adding `customImageProperty` option for storing avatars on a custom user property. -- Refactored `getServices`. -- Started using `getDescendantProp` instead of assuming properties are stored on the `user.profile` object. -- Added roadmap. -- Changed package name to `utilities:avatar`. -- Changed logo to the only “Avatar” that matters. \ No newline at end of file diff --git a/packages/meteor-avatar/README.md b/packages/meteor-avatar/README.md deleted file mode 100644 index 9069d7173035..000000000000 --- a/packages/meteor-avatar/README.md +++ /dev/null @@ -1,159 +0,0 @@ -![logo](https://s3.amazonaws.com/f.cl.ly/items/1u233B1J332D393D2m2j/avatar-logo.png) -================================================================================ - -Consolidated Avatar Template Package for Meteor ------------------------------------------------ - -ANNOUNCEMENT ------------- - -I've forked @bengott's Avatar package to take over maintenance until he has time to come back to it. -Sacha - -BREAKING CHANGES ----------------- -The template parameters were overhauled in version 0.5.0. The `Avatar.options` object changed quite a bit in version 0.6.0 too. And make sure you note the `defaultType`/`fallbackType` changes in version 0.7.0. Basically, things are still in a state of flux (pre-1.0.0), so check for breaking changes and read the rest of the README carefully when you update the package. - - -Installation ------------- -In your Meteor project directory, run: -```shell -$ meteor add utilities:avatar -``` -Of course, you also need to add the accounts- packages for the services you're using (e.g. accounts-twitter) and accounts-ui or something similar in order to add login functionality to your app. - -Usage ------ -In an HTML file: -```handlebars -{{> avatar (user= || userId=) - (size="large" || "small" || "extra-small") - (shape="rounded" || "circle") - (class="some custom classes") - (initials="") (bgColor="") (txtColor="") }} -``` - -That may look like a lot of options, but they are all optional. Most of the time, your HTML will look more like this: -```handlebars -{{> avatar user=this shape="circle"}} -``` - -Optional template parameters: - - `user` or `userId`: Either a user object or userId string, default avatar if omitted - - `size`: Size of the avatar, either "large" (80px), "small" (30px), or "extra-small" (20px), medium/normal (50px) if omitted - - `shape`: Used for CSS border-radius property, either "rounded" or "circle", square if omitted - - `class`: Any custom CSS classes you'd like to define on the avatar container. The string is passed straight through to the `class` attribute on the `div` container element. - - `initials`: Specify the initials to show for the initials avatar. The package automatically tries to determine the user's initials from profile data, but if defined, this param will override that. - - `bgColor` and `txtColor`: Override the default colors for the initials avatar (color name or hex value string). The default colors are white (`"#FFF"`) text on a gray (`"#AAA"`) background. You could also override these default colors in your CSS if you wanted to, but this param allows you to do it directly from the template call. - -Global Configuration Options ----------------------------- -The package exports a global `Avatar` object which has a property named `options` (also an object). If defined (e.g. from a config file in your app), these options override default functionality. - - - `fallbackType`: Determines the type of fallback to use when no image can be found via linked services (Gravatar included): - - "default image" (the default option, which will show either the image specified by defaultImageUrl, the package's default image, or a Gravatar default image). - OR - - "initials" (show the user's initials) - - `defaultImageUrl`: This will replace the included package default image URL ("packages/bengott_avatar/default.png"). It can be a relative path (e.g. "images/defaultAvatar.png"). - - `gravatarDefault`: Gravatar default option to use (overrides defaultImageUrl option and included package default image URL). Options are available [here](https://secure.gravatar.com/site/implement/images/#default-image). - - `emailHashProperty`: This property on the user object will be used for retrieving gravatars (useful when user emails are not published). - - `customImageProperty`: If you're storing images URLs in a property on the user object, you can specify it here. - -Example usage: -- To show initials when no avatar image can be found via linked services: -```javascript -Avatar.options = { - fallbackType: "initials" -}; -``` - -- To show the included package default image, you don't need to specify any options because this is the default functionality. However, you could specify it explicitly like so: -```javascript -Avatar.options = { - fallbackType: "default image" -}; -``` -- To show a custom default image: -```javascript -Avatar.options = { - defaultImageUrl: "img/default-avatar.png" OR "http://example.com/default-avatar.png" -}; -``` - ***Note that Gravatar's default option requires a publicly accessible URL, so it won't work when your app is running on localhost and you're using either the included package default image or a custom defaultImageUrl that is a relative path. It will work fine once deployed though.*** - -- To show one of Gravatar's default options (e.g. "identicon"): -```javascript -Avatar.options = { - gravatarDefault: "identicon" -}; -``` - ***Note that gravatarDefault overrides defaultImageUrl and the included package default image.*** - -- And if your app does not publish the user.emails object/property but publishes an email hash property instead, you can specify it like this (the Gravatar package generates a hash internally when you give it an email too; this just allows you to decouple those two steps so as not to make all your users' emails public): -```javascript -Avatar.options = { - emailHashProperty: "email_hash" -}; -``` - -Test App --------- -The app I use to test Avatar is available here: -https://github.com/bengott/avatar-tester - -How the package chooses an avatar ---------------------------------- -Given a user object or userId string, Avatar will retrieve the user's image with the following priority: - 1. Twitter - 2. Facebook - 3. Google - 4. GitHub - 5. Instagram - 6. Gravatar, which will try to return an avatar matching the user's email address/hash. If it can't find one, then: - - If `Avatar.options.fallbackType` is "initials", Gravatar returns a 404 (Not Found) response. - - Else, - - If `Avatar.options.gravatarDefault` is valid, Gravatar will return a default image (e.g. an identicon). - - If `Avatar.options.gravatarDefault` is invalid or undefined, Gravatar will return either the image referenced by `Avatar.options.defaultImageUrl` or the included default image. - 7. If no image can be retrieved, the user's initials will be shown. - 8. More to come... - -**Required Fields/Properties on the User Object** - -Since fields in `user.services` contain security info, it's often wise to restrict access to those in publications, e.g.: -```javascript -UsersCollection.find({ /* query */ }, { - fields: { - //... - "services.facebook.id" : true - //... - } -}); -``` - -Fields used to get avatar image (one per service): -```javascript -"services.twitter.profile_image_url_https" -"services.facebook.id" -"services.google.picture" -"services.github.username" -"services.instagram.profile_picture" -``` - -Fields used to form initials (if needed): -```javascript - "profile.firstName" - "profile.lastName" - "profile.familyName" - "profile.secondName" - "profile.name" -``` - -**Linked Services/Accounts:** -By default, the Meteor accounts system creates a separate user account for each service you login with. In order to merge those accounts together, you'd need to use a package like [accounts-meld](https://atmospherejs.com/splendido/accounts-meld) or [link-accounts](https://atmospherejs.com/bozhao/link-accounts). In the future, the plan is to add UI to allow the user to select which avatar they want to use ([Issue #10](https://github.com/bengott/meteor-avatar/issues/10)) and/or upload their own image ([Issue #9](https://github.com/bengott/meteor-avatar/issues/9)). - -Credits -------- -- [Sacha Greif](https://github.com/SachaG), for [suggesting the idea on crater.io](http://crater.io/posts/BfMsgzs5AzEdp6Byu) -- [Shai Alon](https://github.com/shaialon), for [contributing the Gravatar functionality to Telescope](https://github.com/TelescopeJS/Telescope/pull/436) that [I later modified](https://github.com/TelescopeJS/Telescope/pull/438) -- [Jérémie Parker](https://github.com/p-j), for providing the [gravatar package](https://github.com/p-j/meteor-gravatar) -- [Everyone who has contributed](https://github.com/bengott/meteor-avatar/graphs/contributors) to this project. :) diff --git a/packages/meteor-avatar/Roadmap.md b/packages/meteor-avatar/Roadmap.md deleted file mode 100644 index 638cb72e3db5..000000000000 --- a/packages/meteor-avatar/Roadmap.md +++ /dev/null @@ -1,4 +0,0 @@ -### Roadmap - -- Make `getInitials` code more flexible (accept options to specify where to look for initials). -- Make every CSS class prefixable with a custom prefix. \ No newline at end of file diff --git a/packages/meteor-avatar/default.png b/packages/meteor-avatar/default.png deleted file mode 100644 index 1695c1157d27..000000000000 Binary files a/packages/meteor-avatar/default.png and /dev/null differ diff --git a/packages/meteor-avatar/export.js b/packages/meteor-avatar/export.js deleted file mode 100644 index 6acba8aa1687..000000000000 --- a/packages/meteor-avatar/export.js +++ /dev/null @@ -1,121 +0,0 @@ -// Avatar object to be exported -Avatar = { - - // If defined (e.g. from a startup config file in your app), these options - // override default functionality - options: { - - // Determines the type of fallback to use when no image can be found via - // linked services (Gravatar included): - // "default image" (the default option, which will show either the image - // specified by defaultImageUrl, the package's default image, or a Gravatar - // default image) - // OR - // "initials" (show the user's initials). - fallbackType: '', - - // This will replace the included default avatar image's URL - // ('packages/bengott_avatar/default.png'). It can be a relative path - // (relative to website's base URL, e.g. 'images/defaultAvatar.png'). - defaultImageUrl: '', - - // This property name will be used to fetch an avatar url from the user's profile - // (e.g. 'avatar'). If this property is set and a property of that name exists - // on the user's profile (e.g. user.profile.avatar) that property will be used - // as the avatar url. - customImageProperty: '', - - // Gravatar default option to use (overrides default image URL) - // Options are available at: - // https://secure.gravatar.com/site/implement/images/#default-image - gravatarDefault: '', - - // This property on the user object will be used for retrieving gravatars - // (useful when user emails are not published). - emailHashProperty: '' - }, - - // Get the initials of the user - getInitials: function (user) { - - var initials = ''; - var name = ''; - var parts = []; - - if (user && user.profile && user.profile.firstName) { - initials = user.profile.firstName.charAt(0).toUpperCase(); - - if (user.profile.lastName) { - initials += user.profile.lastName.charAt(0).toUpperCase(); - } - else if (user.profile.familyName) { - initials += user.profile.familyName.charAt(0).toUpperCase(); - } - else if (user.profile.secondName) { - initials += user.profile.secondName.charAt(0).toUpperCase(); - } - } - else { - if (user && user.profile && user.profile.name) { - name = user.profile.name; - } - else if (user && user.username) { - name = user.username; - } - - parts = name.split(' '); - // Limit getInitials to first and last initial to avoid problems with - // very long multi-part names (e.g. "Jose Manuel Garcia Galvez") - initials = _.first(parts).charAt(0).toUpperCase(); - if (parts.length > 1) { - initials += _.last(parts).charAt(0).toUpperCase(); - } - } - - return initials; - }, - - // Get the url of the user's avatar - getUrl: function (user) { - - var url = ''; - var defaultUrl, svc; - - if (user) { - svc = getService(user); - if (svc === 'twitter') { - // use larger image (200x200 is smallest custom option) - url = user.services.twitter.profile_image_url_https.replace('_normal.', '_200x200.'); - } - else if (svc === 'facebook') { - // use larger image (~200x200) - url = 'https://graph.facebook.com/' + user.services.facebook.id + '/picture?type=large'; - } - else if (svc === 'google') { - url = user.services.google.picture; - } - else if (svc === 'github') { - url = 'https://avatars.githubusercontent.com/' + user.services.github.username + '?s=200'; - } - else if (svc === 'instagram') { - url = user.services.instagram.profile_picture; - } - else if (svc === "custom") { - url = getDescendantProp(user, Avatar.options.customImageProperty); - } - else if (svc === 'none') { - defaultUrl = Avatar.options.defaultImageUrl || 'packages/bengott_avatar/default.png'; - // If it's a relative path (no '//' anywhere), complete the URL - if (defaultUrl.indexOf('//') === -1) { - // Strip starting slash if it exists - if (defaultUrl.charAt(0) === '/') defaultUrl = defaultUrl.slice(1); - // Then add the relative path to the server's base URL - defaultUrl = Meteor.absoluteUrl() + defaultUrl; - } - url = getGravatarUrl(user, defaultUrl); - } - } - - return url; - } -}; diff --git a/packages/meteor-avatar/helpers.js b/packages/meteor-avatar/helpers.js deleted file mode 100644 index dfc9488bbc93..000000000000 --- a/packages/meteor-avatar/helpers.js +++ /dev/null @@ -1,57 +0,0 @@ -// Get the account service to use for the user's avatar -// Priority: Twitter > Facebook > Google > GitHub > Instagram -getService = function (user) { - var services = user && user.services; - var customProp = user && Avatar.options.customImageProperty; - if (customProp && getDescendantProp(user, customProp)) { return 'custom'; } - else if (services && services.twitter) { return 'twitter'; } - else if (services && services.facebook) { return 'facebook'; } - else if (services && services.google) { return 'google'; } - else if (services && services.github) { return 'github'; } - else if (services && services.instagram) { return 'instagram'; } - else { return 'none'; } -}; - -getGravatarUrl = function (user, defaultUrl) { - var gravatarDefault; - var validGravatars = ['404', 'mm', 'identicon', 'monsterid', 'wavatar', 'retro', 'blank']; - - // Initials are shown when Gravatar returns 404. - if (Avatar.options.fallbackType !== 'initials') { - var valid = _.contains(validGravatars, Avatar.options.gravatarDefault); - gravatarDefault = valid ? Avatar.options.gravatarDefault : defaultUrl; - } - else { - gravatarDefault = '404'; - } - - var options = { - // NOTE: Gravatar's default option requires a publicly accessible URL, - // so it won't work when your app is running on localhost and you're - // using an image with either the standard default image URL or a custom - // defaultImageUrl that is a relative path (e.g. 'images/defaultAvatar.png'). - default: gravatarDefault, - size: 200, // use 200x200 like twitter and facebook above (might be useful later) - secure: true - }; - - var emailOrHash = getEmailOrHash(user); - return Gravatar.imageUrl(emailOrHash, options); -}; - -// Get the user's email address or (if the emailHashProperty is defined) hash -getEmailOrHash = function (user) { - var emailOrHash; - if (user && Avatar.options.emailHashProperty && !!getDescendantProp(user, Avatar.options.emailHashProperty)) { - emailOrHash = getDescendantProp(user, Avatar.options.emailHashProperty); - } - else if (user && user.emails) { - emailOrHash = user.emails[0].address; // TODO: try all emails - } - else { - // If all else fails, return 32 zeros (trash hash, hehe) so that Gravatar - // has something to build a URL with at least. - emailOrHash = '00000000000000000000000000000000'; - } - return emailOrHash; -}; diff --git a/packages/meteor-avatar/package.js b/packages/meteor-avatar/package.js deleted file mode 100644 index b1de2ccf5166..000000000000 --- a/packages/meteor-avatar/package.js +++ /dev/null @@ -1,30 +0,0 @@ -Package.describe({ - name: "utilities:avatar", - summary: "Consolidated user avatar template (twitter, facebook, gravatar, etc.)", - version: "0.7.10", - git: "https://github.com/bengott/meteor-avatar" -}); - -Package.onUse(function(api) { - api.versionsFrom(['METEOR@0.9.4.1', 'METEOR@1.1.0.1']); - api.use(['templating', 'stylus', 'reactive-var'], ['client']); - api.use(['underscore', 'jparker:gravatar@0.3.1'], ['client', 'server']); - api.addFiles( - [ - 'template/avatar.html', - 'template/avatar.js', - 'template/avatar.styl' - ], - ['client'] - ); - api.addFiles( - [ - 'utils.js', - 'export.js', - 'helpers.js', - 'default.png' - ], - ['client', 'server'] - ); - api.export('Avatar'); -}); diff --git a/packages/meteor-avatar/template/avatar.html b/packages/meteor-avatar/template/avatar.html deleted file mode 100644 index 593063a1ca90..000000000000 --- a/packages/meteor-avatar/template/avatar.html +++ /dev/null @@ -1,6 +0,0 @@ - diff --git a/packages/meteor-avatar/template/avatar.js b/packages/meteor-avatar/template/avatar.js deleted file mode 100644 index f12434bb9fb6..000000000000 --- a/packages/meteor-avatar/template/avatar.js +++ /dev/null @@ -1,49 +0,0 @@ -Template.avatar.helpers({ - - size: function () { - var valid = ['large', 'small', 'extra-small']; - return _.contains(valid, this.size) ? 'avatar-' + this.size : ''; - }, - - dimensions: function () { - var value; - if (this.size === 'large') value = 80; - else if (this.size === 'small') value = 30; - else if (this.size === 'extra-small') value = 20; - else value = 50; - - return { width: value, height: value }; - }, - - shape: function () { - var valid = ['rounded', 'circle']; - return _.contains(valid, this.shape) ? 'avatar-' + this.shape : ''; - }, - - class: function () { return this.class; }, - - imageUrl: function () { - var user = this.user ? this.user : Meteor.users.findOne(this.userId); - var url = Avatar.getUrl(user); - if (url && url.trim() !== '' && Template.instance().firstNode) { - var img = Template.instance().find('img'); - if (img.src !== url.trim()) { - img.style.removeProperty('display'); - } - } - return url; - }, - - initialsCss: function () { - var css = ''; - if (this.bgColor) css += 'background-color: ' + this.bgColor + ';'; - if (this.txtColor) css += 'color: ' + this.txtColor + ';'; - return css; - }, - - initialsText: function () { - var user = this.user ? this.user : Meteor.users.findOne(this.userId); - return this.initials || Avatar.getInitials(user); - } - -}); diff --git a/packages/meteor-avatar/template/avatar.styl b/packages/meteor-avatar/template/avatar.styl deleted file mode 100644 index a823302a5940..000000000000 --- a/packages/meteor-avatar/template/avatar.styl +++ /dev/null @@ -1,65 +0,0 @@ -@import "nib" - -.avatar - height 50px - width 50px - position relative - - .avatar-image, .avatar-initials - height 100% - width 100% - position absolute - top 0px - left 0px - - .avatar-image - z-index 10 - background-color white - - .avatar-initials - display block - background-size 100% 100% - background-color #aaa - color #fff - font-size 25px - line-height 50px - font-family "Helvetica Neue", Helvetica, "Hiragino Sans GB", Arial, sans-serif - text-align center - z-index 1 - -.avatar-large - height 80px - width 80px - .avatar-initials - font-size 40px - line-height 80px - -.avatar-small - height 30px - width 30px - .avatar-initials - font-size 15px - line-height 30px - -.avatar-extra-small - height 20px - width 20px - .avatar-initials - font-size 10px - line-height 20px - -.avatar-rounded - .avatar-image, .avatar-initials - border-radius 5px - -.avatar-circle - .avatar-image, .avatar-initials - border-radius 50% - -.avatar-hide-image - .avatar-image - display none - -.avatar-hide-initials - .avatar-initials - display none diff --git a/packages/meteor-avatar/utils.js b/packages/meteor-avatar/utils.js deleted file mode 100644 index 4715f1937ba0..000000000000 --- a/packages/meteor-avatar/utils.js +++ /dev/null @@ -1,6 +0,0 @@ -// see http://stackoverflow.com/questions/8051975/access-object-child-properties-using-a-dot-notation-string -getDescendantProp = function (obj, desc) { - var arr = desc.split("."); - while(arr.length && (obj = obj[arr.shift()])); - return obj; -}; \ No newline at end of file diff --git a/packages/meteor-avatar/versions.json b/packages/meteor-avatar/versions.json deleted file mode 100644 index 022f4a421c80..000000000000 --- a/packages/meteor-avatar/versions.json +++ /dev/null @@ -1,95 +0,0 @@ -{ - "dependencies": [ - [ - "base64", - "1.0.1" - ], - [ - "blaze", - "2.0.3" - ], - [ - "deps", - "1.0.5" - ], - [ - "ejson", - "1.0.4" - ], - [ - "geojson-utils", - "1.0.1" - ], - [ - "htmljs", - "1.0.2" - ], - [ - "id-map", - "1.0.1" - ], - [ - "jparker:crypto-core", - "0.1.0" - ], - [ - "jparker:crypto-md5", - "0.1.1" - ], - [ - "jparker:gravatar", - "0.3.1" - ], - [ - "jquery", - "1.0.1" - ], - [ - "json", - "1.0.1" - ], - [ - "meteor", - "1.1.3" - ], - [ - "minimongo", - "1.0.5" - ], - [ - "observe-sequence", - "1.0.3" - ], - [ - "ordered-dict", - "1.0.1" - ], - [ - "random", - "1.0.1" - ], - [ - "reactive-var", - "1.0.3" - ], - [ - "stylus", - "1.0.5" - ], - [ - "templating", - "1.0.9" - ], - [ - "tracker", - "1.0.3" - ], - [ - "underscore", - "1.0.1" - ] - ], - "pluginDependencies": [], - "toolVersion": "meteor-tool@1.0.36", - "format": "1.0" -} \ No newline at end of file