thebinarypenguin / guaw

A jQuery plugin for displaying GitHub user activity in a handsome little widget
MIT License
4 stars 0 forks source link

Description

A jQuery plugin for displaying GitHub user activity in a handsome little widget

Check out the demo

Details

Optional Dependency

GUAW checks for the presence of date libraries such as Moment.js or the jQuery timeago plugin and if it finds one will use it to display fuzzy relative dates. If no date library is found it will fall back to the US-centric date format of month-day-year

Usage

<html>
  <head>
    <!-- Include the plugin stylesheet -->
    <link href="https://github.com/thebinarypenguin/guaw/blob/master/css/jquery.guaw.min.css" rel="stylesheet">
  </head>
  <body>
    <!-- Create a container -->
    <div id="widget-container"></div>

    <!-- Include jQuery -->
    <script src="http://code.jquery.com/jquery-latest.min.js"></script>

    <!-- Optionally include Moment.js or the jQuery timeago plugin here -->

    <!-- Include GUAW -->
    <script src="https://github.com/thebinarypenguin/guaw/raw/master/js/jquery.guaw.min.js"></script>
    <script>
      $(function(){

        // Activate the plugin
        $('#widget-container').guaw({
          username: 'thebinarypenguin',  // The GitHub user
          timeout: 180,                  // Time to wait (in seconds) between API requests, optional, default 300
          debug: true                    // Output debug info to the console, optional, default false
        });

      });
    </script>
  </body>
</html>