Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
32 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
Renders a link to a This Is My Jam user's profile, with an image, text or both. | ||
If the user has no active jam, renders a simple 'follow me' link. | ||
|
||
Usage | ||
----- | ||
|
||
<script src="http://www.thisismyjam.com/includes/js/medallion.js"></script> | ||
<script>Jam.Medallion.insert({username: "..."})</script> | ||
|
||
You can pass several options to Jam.Medallion.insert: | ||
|
||
- text: Set to false to stop showing the 'My current jam is:' tag. | ||
- image: Set to false to stop showing the jam avatar. | ||
- imageSize: "small" (default), "medium" or "large". | ||
|
||
Markup | ||
------ | ||
|
||
The generated markup will look something like this: | ||
|
||
<div class="jam-medallion"> | ||
<a class="jam-image" href="..."> | ||
<img class="jam-jamvatar" src="..."> | ||
</a> | ||
|
||
<p class="jam-text"> | ||
My current jam is <a href="...">...</a>. | ||
</p> | ||
</div> | ||
|
||
A "jam-loading" class is added to the outer div while the jam data is being | ||
loaded from the API, so that you can style it appropriately. |