npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

aurelia-gravatar

v0.1.1

Published

A simple custom element to handle gravatar based profile pictures

Downloads

4

Readme

Aurelia-Gravatar

A simple plugin for aurelia to add attributes to turn an image into a gravatar image as well as a custom element to just add gravatar images.

Installing

with jspm

jspm install grofit/aurelia-gravatar

then

aurelia.use.plugin("aurelia-gravatar");

Example

Live Example

View Example

You can see the code and everything in the examples folder!

Textual Examples

A simple example of adding a gravatar for a user:

<gravatar id="some-gravatar-element" credential.bind="myUser.EmailAddress" /> 

A more complicated example with custom settings:

<gravatar id="some-gravatar-element" credential.bind="myUser.Md5HashedEmailAddress" size="25" defaultImage="wavatar" is-secure="true" rating="g" />

As shown above you can pass in the plain text email address, or if you dont want to publicly expose the users email address you can always just md5 hash the users email before passing it over. (Internally it hashes an email address if it is passed over in plain-text anyway).

The available options for this binding are:

  • credential - The users email or hashed email address to be used to uniquely identify this user to gravatar
  • size - The size required for the generated image
  • default-image - The default gravatar generated images to use if no custom avatar exists, i.e (wavatar, identicon)
  • rating - The rating constraint for the images i.e (g, pg, r, x)
  • is-secure - If you want to use https or http for getting the image

You can mix and match the properties, if it is provided then it will be used, if not dont worry about it.