GithubHelp home page GithubHelp logo

imclab / gitty Goto Github PK

View Code? Open in Web Editor NEW

This project forked from michael-lynch/gitty

0.0 2.0 0.0 188 KB

A simple, lightweight jQuery plugin used to display a Github user's repositories.

License: MIT License

CSS 19.59% JavaScript 80.41%

gitty's Introduction

#Gitty

A simple, lightweight jQuery plugin used to display a Github user's repositories.

See a demo

##Instructions

Include jQuery and the plugin in the head or footer of your page.

<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
    
<script src="/js/plugins/gitty.js"></script>

Create a list where the repositories will display.

<ul class="repositories"></ul>

Initialize the plugin targeting the class, ID or element you've created.

$('.repositories').gitty();

####Options

username: string
A string that defines the Github username of the user you wish to retrieve repositories from (default: null).

type: "all / owner / public / private / member"
A string that defines the type of repositories to be retrieved (default: "all").

sort: "created / updated / pushed / full_name"
A string that defines the how the repositories should be sorted (default: "full_name").

direction: "asc/ desc"
A string that defines the direction the repositories should be listed in (default: "asc").

limit: 5
An integer that defines the number of repositories to display (default: null).

language: boolean
A boolean that indicates whether or not the language of each repository should be displayed (default: true).

success: function()
A callback function that is triggered after the request, if the request is successful.

error: function()
A callback function that is triggered after the request, if the request is fails.

#####Example:

$(function() {

	$('.repositories').gitty({
		username: 'michaelynch'
		type: 'member',
		sort: 'pushed',
		direction: 'desc',
		limit: 10,
		language: false
	});
	

#####Example Output:

<ul class="repositories">
	<li class="name-of-repository">
		<a class="gitty-name" title="name of repository" href="https://github.com/username/name-of-repository">name of repository</a>
		<span class="language">javascript</span>
		<span class="description">This is where the repository description would go.</span>
	</li>
	<li class="name-of-repository">
		<a class="gitty-name" title="name of repository" href="https://github.com/username/name-of-repository">name of repository</a>
		<span class="language">javascript</span>
		<span class="description">This is where the repository description would go.</span>
	</li>
</ul>

* Note that each list item has it's own unique class based on the name of the repository, so you can style each list item individually.

gitty's People

Watchers

 avatar  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.