1 Star 0 Fork 0

Feng-TianXiang / GitHubRepoWidget.js

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README

GitHub Repo Widget

Build Status npm npm npm

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?

Widget Image

Browser Support

We do care about it.

IE Chrome Firefox Opera Safari
IE 8+ ✔ Latest ✔ Latest ✔ Latest ✔ Latest ✔

How do I use it?

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();

Issues

The repo is base on:

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.
  3. Compress the image, then compress the file size. from 7.62kb to 5.28kb.
  4. Update demo/index.html and screenshot.png.

Welcome to push request and issue.

空文件

简介

GitHub Repo Widget 展开 收起
JavaScript
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
JavaScript
1
https://gitee.com/feng-tianxiang/GitHubRepoWidget.js.git
git@gitee.com:feng-tianxiang/GitHubRepoWidget.js.git
feng-tianxiang
GitHubRepoWidget.js
GitHubRepoWidget.js
master

搜索帮助

53164aa7 5694891 3bd8fe86 5694891