Some badges generated with Shields.io
Show your awesome LeetCode badges.
https://badges.peiyuan.ch/leetcode/{username}/name
https://badges.peiyuan.ch/leetcode/{username}/ranking
https://badges.peiyuan.ch/leetcode/{username}/rate?difficulty=<value>
Query | Value | Default | Description |
---|---|---|---|
difficulty | all / easy / medium / hard |
all |
Identity the submission of difficulty |
https://badges.peiyuan.ch/leetcode/{username}/solved?difficulty=<value>
Query | Value | Default | Description |
---|---|---|---|
difficulty | all / easy / medium / hard |
all |
Identity the submission of difficulty |
https://badges.peiyuan.ch/leetcode/{username}/submission?accepted=<value>&difficulty=<value>
Query | Value | Default | Description |
---|---|---|---|
accepted | true / false |
false |
Accepted Submissions or Total Submissions |
difficulty | all / easy / medium / hard |
all |
Identity the submission of difficulty |
Since the all badges are generated by Shields.io, most of shied query parameters are supported as well:
https://badges.peiyuan.ch/leetcode/puiiyuen/ranking?logo=leetcode&label=puiiyuen&style=for-the-badge&color=green
Parameter | Support | Demo |
---|---|---|
style | Yes | |
label | Yes | |
labelColor | Yes | |
color | Yes | |
logo | Yes | |
logoColor | Yes | |
logoWidth | Yes | |
link | Yes* | N/A on GitHub README |
cacheSeconds | No | N/A |
- Refer to Shields.io: Specify what clicking on the left/right of a badge should do. Note that
this only works when integrating your badge in an
<object>
HTML tag, but not an<img>
tag or a markup language.
JDK Version 11 | API Documentations
Build the package
./gradlew clean build
Run jar package
Directory:
.
└── build
└── libs
└── badges-{version}.jar
java -jar badges-{version}.jar
docker run -d -p 8080:8080 puiiyuen/badge
Build Your Own Image
Use Google Jib
In build.gradle
, configure your own parameters:
jib {
to {
image = '{username}/{repository}'
}
container {
ports = ['8080']
}
}
Run:
./gralew jib
The docker image will be built and pushed to your remote registry. For more configurations, please refer to Google Jib Gradle Plugin
Build with Dockerfile
Ref:
- Handle Exception
MIT