Giter VIP home page Giter VIP logo

leetcode-stats-card's Introduction

LeetCode Stats Card

CodeFactor

Show your dynamically generated LeetCode stats on your GitHub profile or your website!

LeetCode and LeetCode CN are both supported.

Playground: Try It Now

LeetCode Stats

Features

  • ๐Ÿ“ˆ Clean and simple LeetCode stats, for both us and cn sites
  • ๐ŸŽจ Multiple themes and 1,300+ fonts - Theme, Font
  • ๐Ÿช„ Fully customizable using CSS - Custom Stylesheets
  • โšก๏ธ Fast and global edge network - Cloudflare Workers
  • ๐Ÿšซ No tracking, controlable cache - Cache
  • ๐Ÿ€ Open source - MIT License
  • โš™๏ธ Extended-cards: activity, contest, heatmap

It also has a NPM package and a highly extensible system, so you can easily customize it to your needs.

CLI tool will be created if I have time. Want to contribute? Feel free to open a pull request!

Usage

Simply copy the code below, paste it into your README.md, and change the path to your leetcode username (case-insensitive).

![Leetcode Stats](https://leetcard.jacoblin.cool/JacobLinCool)

Congratulation! You are now showing your LeetCode stats on your profile!

Want a hyperlink? Try this:

[![Leetcode Stats](https://leetcard.jacoblin.cool/JacobLinCool)](https://leetcode.com/JacobLinCool)

Endpoint

The endpoint of this tool is:

https://leetcard.jacoblin.cool/

The legacy one: https://leetcode.card.workers.dev/

Options

There are many options, you can configure them by passing a query string to the endpoint.

site (default: us)

Data source, can be us or cn.

![](https://leetcard.jacoblin.cool/leetcode?site=cn)

theme (default: light,dark)

Card theme, see Theme for more information.

Use a comma to separate the light and dark theme.

![](https://leetcard.jacoblin.cool/jacoblincool?theme=unicorn)
![](https://leetcard.jacoblin.cool/jacoblincool?theme=light,unicorn)

font (default: Baloo_2)

Card font, you can use almost all fonts on Google Fonts.

It is case-insensitive, and you can use font=dancing_script or font=Dancing%20Script to get the same result.

![](https://leetcard.jacoblin.cool/jacoblincool?font=Dancing_Script)

width and height (default: 500 and 200)

Change the card size, it will not resize the content.

But it will be helpful if you want to use custom css.

![](https://leetcard.jacoblin.cool/jacoblincool?width=500&height=500)

border and radius (default: 1 and 4)

Change the card border and radius.

![](https://leetcard.jacoblin.cool/jacoblincool?border=0&radius=20)

animation (default: true)

Enable or disable the animation.

![](https://leetcard.jacoblin.cool/jacoblincool?animation=false)

hide (default: "")

Hide elements on the card, it is a comma-separated list of element ids.

![](https://leetcard.jacoblin.cool/jacoblincool?hide=ranking,total-solved-text,easy-solved-count,medium-solved-count,hard-solved-count)

ext (default: "")

Extension, it is a comma-separated list of extension names.

NOTICE: You can only use one of extended-card extensions (activity, contest, heatmap) at a time now, maybe they can be used together in the future.

Animation, font, theme, and external stylesheet are all implemented by extensions and enabled by default.

Want to contribute a nyan-cat extension? PR is welcome!

![](https://leetcard.jacoblin.cool/jacoblincool?ext=activity)

![](https://leetcard.jacoblin.cool/lapor?ext=contest)

![](https://leetcard.jacoblin.cool/lapor?ext=heatmap)

cache (default: 60)

Cache time in seconds.

Note: it will not be a good idea to set it to a long time because GitHub will fetch and cache the card.

![](https://leetcard.jacoblin.cool/jacoblincool?cache=0)

You can make DELETE request to /:site/:username to delete the cache.

sheets (default: "")

External stylesheet, it is a comma-separated list of urls.

You can upload your custom CSS to gist and use the url.

![](https://leetcard.jacoblin.cool/jacoblincool?sheets=url1,url2)

They will be injected in the order you specified.

Legacy Options

Still work, but deprecated.

Key Description Default Value
border_radius Same as radius 4
show_rank Display/Hide Rank: Boolean true
extension Same as ext ""

Themes

Now we have 6 themes. If you have any great idea, please feel free to open a PR!

Light

![Leetcode Stats](https://leetcard.jacoblin.cool/JacobLinCool?theme=light)

Leetcode Stats

Dark

![Leetcode Stats](https://leetcard.jacoblin.cool/JacobLinCool?theme=dark)

Leetcode Stats

Nord

![Leetcode Stats](https://leetcard.jacoblin.cool/JacobLinCool?theme=nord)

Leetcode Stats

Forest

![Leetcode Stats](https://leetcard.jacoblin.cool/JacobLinCool?theme=forest)

Leetcode Stats

WTF

![Leetcode Stats](https://leetcard.jacoblin.cool/JacobLinCool?theme=wtf)

Leetcode Stats

Unicorn

![Leetcode Stats](https://leetcard.jacoblin.cool/JacobLinCool?theme=unicorn)

Leetcode Stats

Fonts

You can now use almost all fonts on Google Fonts.

Some examples:

Milonga

![Leetcode Stats](https://leetcard.jacoblin.cool/JacobLinCool?font=milonga)

Leetcode Stats

Patrick Hand

![Leetcode Stats](https://leetcard.jacoblin.cool/JacobLinCool?font=patrick_hand)

Leetcode Stats

Ruthie

![Leetcode Stats](https://leetcard.jacoblin.cool/JacobLinCool?font=ruthie)

Leetcode Stats

Extensions

Extension, it is a comma-separated list of extension names.

NOTICE: You can only use one of extended-card extensions (activity, contest, heatmap) at a time now, maybe they can be used together in the future.

Animation, font, theme, and external stylesheet are all implemented by extensions and enabled by default.

Want to contribute a nyan-cat extension? PR is welcome!

activity

Show your recent submissions.

![Leetcode Stats](https://leetcard.jacoblin.cool/JacobLinCool?ext=activity)

Leetcode Stats

contest

Show your contest rating history.

![Leetcode Stats](https://leetcard.jacoblin.cool/lapor?ext=contest)

Leetcode Stats

heatmap

Show heatmap in the past 52 weeks.

![Leetcode Stats](https://leetcard.jacoblin.cool/lapor?ext=heatmap)

Leetcode Stats

leetcode-stats-card's People

Contributors

jacoblincool avatar renovate-bot avatar renovate[bot] avatar panchajanya1999 avatar lnogueir avatar anurag01a avatar kevin-roman avatar inzamam-ul 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.