# GitHub-Repo-Widget.js **Repository Path**: hustcc/GitHub-Repo-Widget.js ## Basic Information - **Project Name**: GitHub-Repo-Widget.js - **Description**: :zap: A good looking github repo widget to add to your website. Do not depends on jQuery or Other. - **Primary Language**: JavaScript - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2016-01-04 - **Last Updated**: 2020-12-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # GitHub Repo Widget [](https://travis-ci.org/hustcc/GitHub-Repo-Widget.js) [](https://www.npmjs.com/package/github-repo-widget.js) [](https://www.npmjs.com/package/github-repo-widget.js) [](https://www.npmjs.com/package/github-repo-widget.js) > A good looking github repository widget to add to your website. `Do not depends on jQuery or Other framework`. Drop this script on your page and it will build you a beautiful widget that displays the status of your GitHub Repositories. ## What does it look like?  ## Browser Support We do care about it.  |  |  |  |  --- | --- | --- | --- | --- | IE 8+ ✔ | Latest ✔ | Latest ✔ | Latest ✔ | Latest ✔ | ## How do I use it? Everwhere you want a widget to be placed, add the following markup: ```html
``` Then include the javascript file somewhere ~~after you've include jQuery~~: ```html ``` That's it! All of the styling is included and image assets are pulled from GitHub. This automatically handles the CSS styling as well by adding a script tag into the head of the document. This makes it really easy to add to page since there are no other dependencies. Also, the container is fluid so it fills whatever width is available. **`All the usage is same with GitHub-jQuery-Repo-Widget`**. Additional, you can `Programmatic` init the github repo div element and render it, e.g. - **`GithubRepoWidget.init()`**: init the repo Programmatic. ```javascript document.getElementById('github-repos').innerHTML = ''; GithubRepoWidget.init(); ``` ## Issues The repo is base on: - [GitHub-jQuery-Repo-Widget](https://github.com/JoelSutherland/GitHub-jQuery-Repo-Widget) - [You-Dont-Need-jQuery](https://github.com/oneuijs/You-Dont-Need-jQuery) What I hava done: 1. Rewrite `GitHub-jQuery-Repo-Widget`, and remove jQuery, then get `GitHub-Repo-Widget.js`. `Do not depends on jQuery or Other`. 2. Add a `API` to init repo Programmatic. 2. Compress the image, then compress the file size. from `7.62kb` to `5.28kb`. 3. Update demo/index.html and screenshot.png. Welcome to push request and issue.