A Javascript client library for easily displaying meta-information about baked open badges.
https://curlee.github.io/openbadges-displayer.js/
bower install git@github.com:cmcavoy/openbadges-displayer.js.git
Insert openbadges-displayer.js at the bottom of your web page that contains badges.
<script type="text/javascript" src="openbadges-displayer.min.js" ></script>
<script type="text/javascript">
window.openbadges.unbake([options]);
</script>
Badges will be unbaked and included in window.openbadges.badges
which you can
explore in the browser console.
Additionally, a lightbox will be added to the page. Partial badge info will be displayed when rolling over the badge, and full info will be displayed in the lightbox after clicking a badge.
openbadges-displayer.js
is under active development. To help out, fork this
library and submit pull requests with new features. Get started by picking up an
issue, or filing
bug.
After cloning this repo:
npm start
This will install requirements and then use gulp to compile the code and run the server. Requirements will only install once (unless they change).
openbadges-displayer.js uses Gulp. For available commands, take a look at gulpfile.litcoffee
After compiling and running the demo server (npm start
or gulp
) go to:
gulp test
or npm test
Tests are written using coffeescript and are run with gulp-mocha.
Need more test coverage.