Giter Site home page Giter Site logo

notgrm / ember-initials Goto Github PK

View Code? Open in Web Editor NEW

This project forked from emberexperts/ember-initials

0.0 1.0 0.0 6.57 MB

Advanced avatars generator for Ember applications. Initials โ“‚, images ๐ŸŒ‡, gravatars ๐Ÿ‘ฉ๐Ÿป and adorables ๐Ÿ˜ All you need for your users profiles!

Home Page: http://exelord.github.io/ember-initials/

License: MIT License

JavaScript 53.59% HTML 8.05% Handlebars 33.20% Sass 5.16%

ember-initials's Introduction

ember-initials

Ember Initials is a package for generating simple avatars using users initials, images, gravatars or adorables. It definitely supports Ember 3.16 (or higher). Thanks to highly customizable interface you can define defaults and even set fallbacks.

Demo App with code generators

Demo app with interactive examples you can find at http://exelord.github.io/ember-initials

Compatibility

  • Ember.js v3.16 or above
  • Ember CLI v2.13 or above
  • Node.js v10 or above

This addon has been tested on:

  • IE 10 and UP including EDGE
  • Firefox 44 and UP
  • Chrome 48 and UP
  • Opera 35 and UP

Install

ember install ember-initials

Quick start

Ember Initials gives you a built-in components which you can use in yours templates:

Initials avatars:
<EmberInitials @name="John Doe" />

or

<EmberInitials::Initials @name="John Doe" />
Image avatars:
<EmberInitials::Image @image="/url/to/avatar.png" />
Gravatar avatars:
<EmberInitials::Gravatar @email="[email protected]" />
Adorables avatars:
<EmberInitials::Adorable @email="[email protected]" />

Examples, configuration and code generator are available on Project Site.

API Documentation

EmberInitials

<EmberInitials
  @image="images/user.jpg"
  @name="Ember Initials"
  @defaultName="?"
  @seedText="Ember Initials"
  @textColor="white"
  @fontSize=55
  @fontWeight=100
  @fontFamily="Helvetica Neue Light, Arial, sans-serif"
  @size=200
/>
  • image - image url | if image will be not found the initials avatars will be used

  • name - name of user to generate initials

  • defaultName - if name will be not passed this name will be used

  • seedText - uniq string which will be used to generate background color, eg. user's email

  • textColor - color of the text (initials) | hash or name

  • fontSize - font size in px

  • fontWeight - font weight in px

  • fontFamily - names of fonts with fallbacks | at this time only system fonts can be used

  • size - size of the avatar in pixels (set null if you do not want to use elements attributes like width and height)

EmberInitials::Image

<EmberInitials::Image
  @image="images/user.jpg"
  @size=200
  @defaultImage="images/default.jpg"
/>
  • image - image url | if image will be not found the defaultImage will be used

  • defaultImage - default image url

  • size - size of the avatar in pixels (set null if you do not want to use elements attributes like width and height)

EmberInitials::Gravatar

<EmberInitials::Gravatar
  @image="images/user.jpg"
  @email="[email protected]"
  @defaultImage="images/default.jpg"
  @relativeUrl="true"
  @size=200
/>
  • image - image url | if image will be not passed the avatar will be generated form email thanks to gravatar

  • email - Email which will be used to fetching the gravatar

  • defaultImage - image src (relative or absolute URL depends on relativeUrl option) | if gravatar will not be found this image will be used

  • relativeUrl - true or false | decide which defaultImage url do you want to use - relative or absolute

  • size - size of the avatar in pixels (set null if you do not want to use elements attributes like width and height)

EmberInitials::Adorable

<EmberInitials::Adorable
  @image="images/user.jpg"
  @email="[email protected]"
  @size=50
/>
  • image - image url | if image will be not found the avatar will be generated form email thanks to adorable

  • email - Email which will be used to generating unique adorable avatar

  • size - size of the avatar in pixels (set null if you do not want to use elements attributes like width and height)

ember-initials's People

Contributors

exelord avatar alexdiliberto avatar donaldwasserman avatar frozenfire92 avatar marcemira avatar ember-tomster avatar

Watchers

James Cloos avatar

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.