A Polymer-based web component for displaying a profile's information.
Clone the repo and install npm and bower depedencies:
npm installRun tests:
npm testTo see a demo of the user-tile in action, you can use Polymer CLI's serve command. Run polymer serve and navigate to http://localhost:8000/components/d2l-user-tile/demo/index.html.
There are two variants of the tile - d2l-user-tile and d2l-user-tile-auto. Both variants of the tile support the common attribute placeholders, a boolean attribute which will render placeholder elements in place of missing data when true.
The basic tile - it will display a user tile for provided user information - name, user icon, and either a background URL or a background-color.
<d2l-user-tile
background="/path/to/background/image.jpg"
background-color="#00FF00"
name="User's name"
icon="/path/to/user/icon.jpg"
placeholders>
<!-- Content to appear in the user tile goes here -->
</d2l-user-tile>Automatically fetches and fills in the user tile info from user-url when given a token, using user-profile-behavior.
<d2l-user-tile-auto
token="some-oauth2-token"
user-url="http://example.com/users/12"
placeholders>
<!-- Content to appear in the user tile goes here -->
</d2l-user-tile>Follow the EditorConfig rules used in this repo.