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.
We do care about it.
IE 8+ ✔ | Latest ✔ | Latest ✔ | Latest ✔ | Latest ✔ |
Everwhere you want a widget to be placed, add the following markup:
<div class="github-widget" data-repo="hustcc/GitHub-Repo-Widget.js"></div>
Then include the javascript file somewhere after you've include jQuery:
<script type="text/javascript" src="GithubRepoWidget.min.js"></script>
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.document.getElementById('github-repos').innerHTML = '<div class="github-widget" data-repo="hustcc/GitHub-Repo-Widget.js"></div>';
GithubRepoWidget.init();
The repo is base on:
What I hava done:
GitHub-jQuery-Repo-Widget
, and remove jQuery, then get GitHub-Repo-Widget.js
. Do not depends on jQuery or Other
.API
to init repo Programmatic.7.62kb
to 5.28kb
.Welcome to push request and issue.
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。