资讯专栏INFORMATION COLUMN

一个简洁好看的Github项目展示挂件GitHub-Repo-Widget.js

ctriptech / 750人阅读

摘要:

GitHub Repo Widget

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:

Then include the javascript file somewhere after you"ve include jQuery:

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 = "
"; GithubRepoWidget.init();
Issues

The repo is base on:

GitHub-jQuery-Repo-Widget

You-Dont-Need-jQuery

What I hava done:

Rewrite GitHub-jQuery-Repo-Widget, and remove jQuery, then get GitHub-Repo-Widget.js. Do not depends on jQuery or Other.

Add a API to init repo Programmatic.

Compress the image, then compress the file size. from 7.62kb to 5.41kb.

Update demo/index.html and screenshot.png.

Welcome to push request and issue.

文章版权归作者所有,未经允许请勿转载,若此文章存在违规行为,您可以联系管理员删除。

转载请注明本文地址:https://www.ucloud.cn/yun/78420.html

相关文章

  • 收集整理适用博客建站免费开源Wordpress主题-简约好看WP主题

    摘要:最重要的就是找一个适合自己的主题了。事实上,免费主题也非常多,而且很多的免费主题在功能上和界面美观上已经大大超过了付费的主题。加上这些主题都是开源的,基本上可以在上找得到源码,安全性是没有问题,主题的作者也在不断更新当中。WordPress最重要的就是找一个适合自己的主题了。好一点的WordPress主题基本上都是要收费的,而且价格还不便宜,这导致了不少的新手朋友们很为难。而有时我们仅仅根据...

    番茄西红柿 评论0 收藏2637
  • React造轮子:拖拽排序组件「Dragact」

    摘要:造轮子的一些思考首先,我们的需求是用户能够方便的调整后台的各种表盘位置。内的所有组件必须不能重叠,还要能自动排序某些组件要可以设定静态的,也就是固定在那里,不被布局的任何变动而影响。为了快速获得这种心态的转变,你要做的就是造轮子。 先来一张图看看: showImg(https://segmentfault.com/img/remote/1460000013305417?w=600&h=...

    Charlie_Jade 评论0 收藏0
  • React造轮子:拖拽排序组件「Dragact」

    摘要:造轮子的一些思考首先,我们的需求是用户能够方便的调整后台的各种表盘位置。内的所有组件必须不能重叠,还要能自动排序某些组件要可以设定静态的,也就是固定在那里,不被布局的任何变动而影响。为了快速获得这种心态的转变,你要做的就是造轮子。 先来一张图看看: showImg(https://segmentfault.com/img/remote/1460000013305417?w=600&h=...

    yangrd 评论0 收藏0
  • React造轮子:拖拽排序组件「Dragact」

    摘要:造轮子的一些思考首先,我们的需求是用户能够方便的调整后台的各种表盘位置。内的所有组件必须不能重叠,还要能自动排序某些组件要可以设定静态的,也就是固定在那里,不被布局的任何变动而影响。为了快速获得这种心态的转变,你要做的就是造轮子。 先来一张图看看: showImg(https://segmentfault.com/img/remote/1460000013305417?w=600&h=...

    tracymac7 评论0 收藏0

发表评论

0条评论

ctriptech

|高级讲师

TA的文章

阅读更多
最新活动
阅读需要支付1元查看
<