GithubHelp home page GithubHelp logo

kabanoki / vue-gravatar Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jirichara/vue-gravatar

0.0 1.0 0.0 1.81 MB

A dead-simple gravatar component for VueJS

License: MIT License

JavaScript 80.99% Vue 19.01%

vue-gravatar's Introduction

vue-gravatar

Build Status NPM Version NPM Dowloads

A dead-simple gravatar component for VueJS applications.

DEMO

Installation

yarn add vue-gravatar

Usage

Register the component

import Vue from 'vue';
import Gravatar from 'vue-gravatar';

Vue.component('v-gravatar', Gravatar);

You may now use the component in your markup

<v-gravatar email="[email protected]" />

Props

The following props are available:

  • hash (type: String) md5 hash of the gravatar
  • email (type: String) email address of the gravatar (used when md5 hash not given)
  • size (type: Number, default: 80) size of the avatar
  • default-img (type: String, default: 'retro') default image type (see. http://en.gravatar.com/site/implement/images/)
  • rating (type: String, default: 'g') rating of the image (see. http://en.gravatar.com/site/implement/images/)
  • alt (type: String, default: 'Avatar') The alternative text of the image
  • protocol (type: String, default: '') The protocol to use (use 'https' in electron apps)
  • hostname (type: String, default: 'www.gravatar.com') Alternative hostname for gravatar images

Example

<v-gravatar hash="f3ada405ce890b6f8204094deb12d8a8" alt="Nobody" :size="200" default-img="mm" />

License

The MIT License (MIT) - See file 'LICENSE' in this project

Copyright

Copyright © 2017 Jiří Chára. All Rights Reserved.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.