anurag01a / LeetCode-Stats-Card

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

Home Page:https://leetcard.jacoblin.cool

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

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.

Now there is only a notable extension: activity.

But actually animation, font, theme, and external stylesheet are all implemented by extensions and enabled by default.

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

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

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

Now there is only a notable extension: activity.

But actually animation, font, theme, and external stylesheet are all implemented by extensions and enabled by default.

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

activity

Show your recent submissions.

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

Leetcode Stats

About

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

https://leetcard.jacoblin.cool

License:MIT License


Languages

Language:TypeScript 96.2%Language:HTML 3.8%