GithubHelp home page GithubHelp logo

mayuri-saha18 / github-calendar Goto Github PK

View Code? Open in Web Editor NEW

This project forked from bloggify/github-calendar

1.0 0.0 0.0 195 KB

:bar_chart: Embed your GitHub calendar everywhere.

Home Page: https://bloggify.github.io/github-calendar/example/

License: MIT License

JavaScript 73.31% CSS 7.49% HTML 19.20%
github

github-calendar's Introduction

github-calendar.js

Version Downloads

Embed your GitHub contributions calendar anywhere.

Everybodywell, haters gonna hate loves GitHub and everybody loves stats. So, why not making the GitHub contributions calendar available for being embeded in your web pages? Now you can. ๐ŸŽ‰

โ˜๏ธ Installation

Check out the dist directory to download the needed files and include them on your page.

If you're using this module in a CommonJS environment, you can install it using npm or yarn and require it:

# Using npm
npm install --save github-calendar

# Using yarn
yarn add github-calendar
<!-- Include the library. -->
<script
  src="https://unpkg.com/github-calendar@latest/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://unpkg.com/github-calendar@latest/dist/github-calendar-responsive.css"
/>

<!-- Prepare a container for your calendar. -->
<div class="calendar">
    <!-- Loading stuff -->
    Loading the data just for you.
</div>

<script>
    GitHubCalendar(".calendar", "your-username");

    // or enable responsive functionality:
    GitHubCalendar(".calendar", "your-username", { responsive: true });

    // Use a proxy
    GitHubCalendar(".calendar", "your-username", {
       proxy (username) {
         return fetch(`https://your-proxy.com/github?user=${username}`)
       }
    }).then(r => r.text())
</script>

Here you can see this example in action.

โ“ Get Help

There are few ways to get help:

  1. Please post questions on Stack Overflow. You can open issues with questions, as long you add a link to your Stack Overflow question.
  2. For bug reports and feature requests, open issues. ๐Ÿ›

๐Ÿ“ Documentation

GitHubCalendar(container, username, options)

Brings the contributions calendar from GitHub (provided username) into your page.

Params

  • String|HTMLElement container: The calendar container (query selector or the element itself).
  • String username: The GitHub username.
  • Object options: An object containing the following fields:
    • summary_text (String): The text that appears under the calendar (defaults to: "Summary of pull requests, issues opened, and commits made by <username>").
    • proxy (Function): A function that receives as argument the username (string) and should return a promise resolving the HTML content of the contributions page. The default is using @Bloggify's APIs.
    • global_stats (Boolean): If false, the global stats (total, longest and current streaks) will not be calculated and displayed. By default this is enabled.
    • responsive (Boolean): If true, the graph is changed to scale with the container. Custom CSS should be applied to the element to scale it appropriately. By default this is disabled.
    • tooltips (Boolean): If true, tooltips will be shown when hovered over calendar days. By default this is disabled.
    • cache (Number) The cache time in seconds.

Return

  • Promise A promise returned by the fetch() call.

๐Ÿ˜‹ How to contribute

Have an idea? Found a bug? See how to contribute.

๐Ÿ’ซ Where is this library used?

If you are using this library in one of your projects, add it in this list. โœจ

  • @pengliheng/github-report
  • github-alike-calendar
  • @axetroy/react-github-calendar
  • react-ts-github-calendar
  • github-calendar-element
  • github-calendar-web-component
  • @philipwhiuk/react-github-calendar

๐Ÿ“œ License

MIT ยฉ Bloggify

github-calendar's People

Contributors

benprime avatar francescotonini avatar giselak avatar ionicabizau avatar khaledmostafame avatar miroslavvidovic avatar mn6 avatar onkar-shaligram avatar palmerev avatar rathirohit avatar redmike avatar rembrandtsx avatar rhnvrm avatar rodrigograca31 avatar snowztail avatar togami2864 avatar

Stargazers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.