Html 在网站中嵌入Github贡献图
有没有办法在HTML5中嵌入Github贡献图Html 在网站中嵌入Github贡献图,html,api,github,github-api,Html,Api,Github,Github Api,有没有办法在HTML5中嵌入Github贡献图 您可以在以下url中删除HTML:https://github.com/users//contributions并将其放在页面上。我编写了一个JavaScript库来实现这一点: 下面是一个如何使用它的示例: <!-- Prepare a container for your calendar. --> <script src="https://cdn.rawgit.com/IonicaBizau/github-calenda
您可以在以下url中删除HTML:
https://github.com/users//contributions
并将其放在页面上。我编写了一个JavaScript库来实现这一点:
下面是一个如何使用它的示例:
<!-- Prepare a container for your calendar. -->
<script
src="https://cdn.rawgit.com/IonicaBizau/github-calendar/gh-pages/dist/github-calendar.min.js"
>
</script>
<!-- Optionally, include the theme (if you don't want to struggle to write the CSS) -->
<link
rel="stylesheet"
href="https://cdn.rawgit.com/IonicaBizau/github-calendar/gh-pages/dist/github-calendar.css"
/>
<!-- Prepare a container for your calendar. -->
<div class="calendar">
<!-- Loading stuff -->
Loading the data just for you.
</div>
<script>
new GitHubCalendar(".calendar", "your-username");
</script>
为您加载数据。
新日历(“日历”、“您的用户名”);
您可以看到它的作用:
基本上,因为我们需要跨域请求,所以我们需要一个代理。它向GitHub概要页面(GitHub.com/
)发出请求,然后从那里带回所需的内容
有关更多信息,请查看。这个家伙:编写了一个Github图表API。这肯定会有帮助。加上它只是HTML,所以不能得到任何清洁。
只需将用户名和alt标记更改为您的。我可以通过执行以下操作来实现Angular 4:
https://github.com/users//contributions
@geek4079别忘了接受答案。:)@geek4079点击✔代码>按钮(答案的左侧)。@geek4079你接受另一个答案而不是我的答案有什么具体原因吗?这看起来更像是一个评论。我确信我有,对不起:)@Tanzeel我建议问一个关于这个的问题。我希望React专家能帮助你代码不是“仅html”要求他的服务运行,因此它引发了很多可靠性和隐私问题。这意味着你必须嵌入的代码是html,您不必处理任何JS代码。@Soren它是开源的,因此您可以轻松地在Heroku上自己托管它,因为它是基于ruby的。如果您使用网格CSS布局进行此操作,请注意Chrome中有1000行或1000列的限制。你的博客链接断了