forked from mirrored/github-readme-stats
Compare commits
2
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
33ad0f4ee8 | ||
|
|
26a8a23421 |
@@ -1,4 +1,3 @@
|
|||||||
themes: themes/index.js
|
themes: themes/index.js
|
||||||
doc-translation: docs/*
|
doc-translation: docs/*
|
||||||
card-i18n: src/translations.js
|
card-i18n: src/translations.js
|
||||||
documentation: readme.md
|
|
||||||
|
|||||||
@@ -23,10 +23,6 @@ jobs:
|
|||||||
node-version: ${{ matrix.node-version }}
|
node-version: ${{ matrix.node-version }}
|
||||||
cache: npm
|
cache: npm
|
||||||
|
|
||||||
# Fix the unsafe repo error which was introduced by the CVE-2022-24765 git patches.
|
|
||||||
- name: Fix unsafe repo error
|
|
||||||
run: git config --global --add safe.directory ${{ github.workspace }}
|
|
||||||
|
|
||||||
- name: npm install, generate readme
|
- name: npm install, generate readme
|
||||||
run: |
|
run: |
|
||||||
npm ci
|
npm ci
|
||||||
|
|||||||
@@ -10,5 +10,3 @@ vercel_token
|
|||||||
# IDE
|
# IDE
|
||||||
.vscode
|
.vscode
|
||||||
*.code-workspace
|
*.code-workspace
|
||||||
|
|
||||||
.vercel
|
|
||||||
|
|||||||
@@ -46,8 +46,6 @@ export default async (req, res) => {
|
|||||||
if (locale && !isLocaleAvailable(locale)) {
|
if (locale && !isLocaleAvailable(locale)) {
|
||||||
return res.send(renderError("Something went wrong", "Language not found"));
|
return res.send(renderError("Something went wrong", "Language not found"));
|
||||||
}
|
}
|
||||||
|
|
||||||
theme = theme.replace(/-/g, "_")
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const stats = await fetchStats(
|
const stats = await fetchStats(
|
||||||
|
|||||||
@@ -35,8 +35,6 @@ export default async (req, res) => {
|
|||||||
if (locale && !isLocaleAvailable(locale)) {
|
if (locale && !isLocaleAvailable(locale)) {
|
||||||
return res.send(renderError("Something went wrong", "Language not found"));
|
return res.send(renderError("Something went wrong", "Language not found"));
|
||||||
}
|
}
|
||||||
|
|
||||||
theme = theme.replace(/-/g, "_")
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const repoData = await fetchRepo(username, repo);
|
const repoData = await fetchRepo(username, repo);
|
||||||
|
|||||||
@@ -41,8 +41,6 @@ export default async (req, res) => {
|
|||||||
if (locale && !isLocaleAvailable(locale)) {
|
if (locale && !isLocaleAvailable(locale)) {
|
||||||
return res.send(renderError("Something went wrong", "Locale not found"));
|
return res.send(renderError("Something went wrong", "Locale not found"));
|
||||||
}
|
}
|
||||||
|
|
||||||
theme = theme.replace(/-/g, "_")
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const topLangs = await fetchTopLanguages(
|
const topLangs = await fetchTopLanguages(
|
||||||
|
|||||||
@@ -38,8 +38,6 @@ export default async (req, res) => {
|
|||||||
if (locale && !isLocaleAvailable(locale)) {
|
if (locale && !isLocaleAvailable(locale)) {
|
||||||
return res.send(renderError("Something went wrong", "Language not found"));
|
return res.send(renderError("Something went wrong", "Language not found"));
|
||||||
}
|
}
|
||||||
|
|
||||||
theme = theme.replace(/-/g, "_")
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const stats = await fetchWakatimeStats({ username, api_domain, range });
|
const stats = await fetchWakatimeStats({ username, api_domain, range });
|
||||||
|
|||||||
-15
@@ -1,15 +0,0 @@
|
|||||||
import statsCard from "./api/index.js";
|
|
||||||
import repoCard from "./api/pin.js";
|
|
||||||
import langCard from "./api/top-langs.js";
|
|
||||||
import wakatimeCard from "./api/wakatime.js";
|
|
||||||
import express from "express";
|
|
||||||
import dotenv from "dotenv";
|
|
||||||
|
|
||||||
dotenv.config();
|
|
||||||
const app = express();
|
|
||||||
app.listen(process.env.port || 9000);
|
|
||||||
|
|
||||||
app.get("/", statsCard);
|
|
||||||
app.get("/pin", repoCard);
|
|
||||||
app.get("/top-langs", langCard);
|
|
||||||
app.get("/wakatime", wakatimeCard);
|
|
||||||
@@ -80,6 +80,9 @@ Visit <https://indiafightscorona.giveindia.org> and make a small donation to hel
|
|||||||
|
|
||||||
# Features
|
# Features
|
||||||
|
|
||||||
|
- [Getting Started](#getting-started)
|
||||||
|
- [GitHub Actions](#github-actions-recommended)
|
||||||
|
- [Community Deployment](#community-deployment)
|
||||||
- [GitHub Stats Card](#github-stats-card)
|
- [GitHub Stats Card](#github-stats-card)
|
||||||
- [GitHub Extra Pins](#github-extra-pins)
|
- [GitHub Extra Pins](#github-extra-pins)
|
||||||
- [Top Languages Card](#top-languages-card)
|
- [Top Languages Card](#top-languages-card)
|
||||||
@@ -92,21 +95,143 @@ Visit <https://indiafightscorona.giveindia.org> and make a small donation to hel
|
|||||||
- [Repo Card Exclusive Options](#repo-card-exclusive-options)
|
- [Repo Card Exclusive Options](#repo-card-exclusive-options)
|
||||||
- [Language Card Exclusive Options](#language-card-exclusive-options)
|
- [Language Card Exclusive Options](#language-card-exclusive-options)
|
||||||
- [Wakatime Card Exclusive Option](#wakatime-card-exclusive-options)
|
- [Wakatime Card Exclusive Option](#wakatime-card-exclusive-options)
|
||||||
- [Deploy Yourself](#deploy-on-your-own)
|
- [Deploy Yourself](#deploy-on-your-own-vercel-instance)
|
||||||
- [On Vercel](#on-vercel)
|
|
||||||
- [On other platforms](#on-other-platforms)
|
|
||||||
- [Keep your fork up to date](#keep-your-fork-up-to-date)
|
- [Keep your fork up to date](#keep-your-fork-up-to-date)
|
||||||
|
|
||||||
|
# Getting Started
|
||||||
|
|
||||||
# GitHub Stats Card
|
## GitHub Actions (Recommended)
|
||||||
|
|
||||||
Copy-paste this into your markdown content, and that is it. Simple!
|
Using GitHub Actions over the community deployment is recommended because it provides more accurate stats and 100% uptime. Simply copy-paste the following into the `/.github/workflows/grs.yml` file in your README repo (`USERNAME/USERNAME`).
|
||||||
|
|
||||||
Change the `?username=` value to your GitHub username.
|
```yml
|
||||||
|
name: GitHub Readme Stats
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
schedule:
|
||||||
|
- cron: 0 * * * *
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
grs:
|
||||||
|
permissions: write-all
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
name: Generate Stats
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
- name: Generate Stats
|
||||||
|
uses: Zo-Bro-23/grs-action@v1
|
||||||
|
id: generate
|
||||||
|
with:
|
||||||
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
options: 'username=${{ github.repository_owner }}'
|
||||||
|
- name: Push
|
||||||
|
uses: crazy-max/ghaction-github-pages@v3
|
||||||
|
with:
|
||||||
|
target_branch: grs
|
||||||
|
build_dir: grs
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
```
|
||||||
|
|
||||||
|
If you want to generate multiple stats, such as top languages, wakatime, etc, you can use the following code.
|
||||||
|
|
||||||
|
```yml
|
||||||
|
name: GitHub Readme Stats
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
schedule:
|
||||||
|
- cron: 0 * * * *
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
stats:
|
||||||
|
permissions: write-all
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
name: Stats Card
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
- name: Generate Stats
|
||||||
|
uses: Zo-Bro-23/grs-action@v1
|
||||||
|
id: generate
|
||||||
|
with:
|
||||||
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
options: 'username=${{ github.repository_owner }}'
|
||||||
|
- uses: actions/upload-artifact@master
|
||||||
|
with:
|
||||||
|
name: stats
|
||||||
|
path: grs
|
||||||
|
top-langs:
|
||||||
|
permissions: write-all
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
name: Top Languages Card
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
- name: Generate Top Languages
|
||||||
|
uses: Zo-Bro-23/grs-action@v1
|
||||||
|
id: generate
|
||||||
|
with:
|
||||||
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
options: 'username=${{ github.repository_owner }}'
|
||||||
|
card: 'top-langs'
|
||||||
|
- uses: actions/upload-artifact@master
|
||||||
|
with:
|
||||||
|
name: top-langs
|
||||||
|
path: grs
|
||||||
|
push:
|
||||||
|
permissions: write-all
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
name: Push
|
||||||
|
needs: [stats, top-langs]
|
||||||
|
steps:
|
||||||
|
- uses: actions/download-artifact@master
|
||||||
|
with:
|
||||||
|
name: stats
|
||||||
|
path: grs
|
||||||
|
- uses: actions/download-artifact@master
|
||||||
|
with:
|
||||||
|
name: top-langs
|
||||||
|
path: grs
|
||||||
|
- name: Push
|
||||||
|
uses: crazy-max/ghaction-github-pages@v3
|
||||||
|
with:
|
||||||
|
target_branch: grs
|
||||||
|
build_dir: grs
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
```
|
||||||
|
|
||||||
|
You can now include the stats in your README by using the following markdown code (replace `USERNAME` with your GitHub username).
|
||||||
|
|
||||||
|
```md
|
||||||
|
[](https://github.com/anuraghazra/github-readme-stats)
|
||||||
|
```
|
||||||
|
|
||||||
|
You can also enable GitHub Pages on the `grs` branch (root) and use that URL (replace `GH_PAGES_URL` with your GitHub Pages URL).
|
||||||
|
|
||||||
|
```md
|
||||||
|
[](https://github.com/anuraghazra/github-readme-stats)
|
||||||
|
```
|
||||||
|
|
||||||
|
The GitHub Action accepts the following inputs:
|
||||||
|
- `token` - `REQUIRED` - Your GitHub Personal Access Token (PAT), or any other token that GitHub accepts.
|
||||||
|
- `options` - `REQUIRED` - Any customization options. More below. (This is the same as the query string you would pass to the API if using the community deployment)
|
||||||
|
- `card` - The type of card to generate. `repo`, `top-langs`, or `wakatime` (leave empty for stats card).
|
||||||
|
- `path` - Output path for SVG file. Relative path; include filename with `.svg`.
|
||||||
|
- `fetch_multipage` - Experimental feature that gives more accurate stats if you have >100 repos.
|
||||||
|
|
||||||
|
## Community Deployment
|
||||||
|
Copy-paste the following markdown code. Change the `?username=` value to your GitHub username.
|
||||||
|
|
||||||
```md
|
```md
|
||||||
[](https://github.com/anuraghazra/github-readme-stats)
|
[](https://github.com/anuraghazra/github-readme-stats)
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Other cards can be included by using `/api/top-langs`, `/api/pin`, or `/api/wakatime`. More customization options can be added by using query parameters (`&option1=value1&option2=value2&...`).
|
||||||
|
|
||||||
|
# GitHub Stats Card
|
||||||
|
|
||||||
> **Note**
|
> **Note**
|
||||||
> Available ranks are S+ (top 1%), S (top 25%), A++ (top 45%), A+ (top 60%), and B+ (everyone). The values are calculated by using the [cumulative distribution function](https://en.wikipedia.org/wiki/Cumulative_distribution_function) using commits, contributions, issues, stars, pull requests, followers, and owned repositories. The implementation can be investigated at [src/calculateRank.js](./src/calculateRank.js).
|
> Available ranks are S+ (top 1%), S (top 25%), A++ (top 45%), A+ (top 60%), and B+ (everyone). The values are calculated by using the [cumulative distribution function](https://en.wikipedia.org/wiki/Cumulative_distribution_function) using commits, contributions, issues, stars, pull requests, followers, and owned repositories. The implementation can be investigated at [src/calculateRank.js](./src/calculateRank.js).
|
||||||
|
|
||||||
@@ -117,7 +242,7 @@ You can pass a query parameter `&hide=` to hide any specific stats with comma-se
|
|||||||
> Options: `&hide=stars,commits,prs,issues,contribs`
|
> Options: `&hide=stars,commits,prs,issues,contribs`
|
||||||
|
|
||||||
```md
|
```md
|
||||||

|
?username=anuraghazra&hide=contribs,prs
|
||||||
```
|
```
|
||||||
|
|
||||||
### Adding private contributions count to total commits count
|
### Adding private contributions count to total commits count
|
||||||
@@ -130,15 +255,15 @@ You can add the count of all your private contributions to the total commits cou
|
|||||||
> Options: `&count_private=true`
|
> Options: `&count_private=true`
|
||||||
|
|
||||||
```md
|
```md
|
||||||

|
?username=anuraghazra&count_private=true
|
||||||
```
|
```
|
||||||
|
|
||||||
### Showing icons
|
### Showing icons
|
||||||
|
|
||||||
To enable icons, you can pass `&show_icons=true` in the query param, like so:
|
To enable icons, you can pass `show_icons=true` in the query param, like so:
|
||||||
|
|
||||||
```md
|
```md
|
||||||

|
?username=anuraghazra&show_icons=true
|
||||||
```
|
```
|
||||||
|
|
||||||
### Themes
|
### Themes
|
||||||
@@ -148,7 +273,7 @@ With inbuilt themes, you can customize the look of the card without doing any [m
|
|||||||
Use `&theme=THEME_NAME` parameter like so :
|
Use `&theme=THEME_NAME` parameter like so :
|
||||||
|
|
||||||
```md
|
```md
|
||||||

|
?username=anuraghazra&show_icons=true&theme=radical
|
||||||
```
|
```
|
||||||
|
|
||||||
#### All inbuilt themes
|
#### All inbuilt themes
|
||||||
@@ -171,7 +296,7 @@ Since GitHub will re-upload the cards and serve them from their [CDN](https://do
|
|||||||
We have included a `transparent` theme that has a transparent background. This theme is optimized to look good on GitHub's dark and light default themes. You can enable this theme using the `&theme=transparent` parameter like so:
|
We have included a `transparent` theme that has a transparent background. This theme is optimized to look good on GitHub's dark and light default themes. You can enable this theme using the `&theme=transparent` parameter like so:
|
||||||
|
|
||||||
```md
|
```md
|
||||||

|
?username=anuraghazra&show_icons=true&theme=transparent
|
||||||
```
|
```
|
||||||
|
|
||||||
<details>
|
<details>
|
||||||
@@ -186,7 +311,7 @@ We have included a `transparent` theme that has a transparent background. This t
|
|||||||
You can use the `bg_color` parameter to make any of [the available themes](./themes/README.md) transparent. This is done by setting the `bg_color` to a colour with a transparent alpha channel (i.e. `bg_color=00000000`):
|
You can use the `bg_color` parameter to make any of [the available themes](./themes/README.md) transparent. This is done by setting the `bg_color` to a colour with a transparent alpha channel (i.e. `bg_color=00000000`):
|
||||||
|
|
||||||
```md
|
```md
|
||||||

|
?username=anuraghazra&show_icons=true&bg_color=00000000
|
||||||
```
|
```
|
||||||
|
|
||||||
<details>
|
<details>
|
||||||
@@ -201,8 +326,8 @@ You can use the `bg_color` parameter to make any of [the available themes](./the
|
|||||||
You can use [GitHub's theme context](https://github.blog/changelog/2021-11-24-specify-theme-context-for-images-in-markdown/) tags to switch the theme based on the user GitHub theme automatically. This is done by appending `#gh-dark-mode-only` or `#gh-light-mode-only` to the end of an image URL. This tag will define whether the image specified in the markdown is only shown to viewers using a light or a dark GitHub theme:
|
You can use [GitHub's theme context](https://github.blog/changelog/2021-11-24-specify-theme-context-for-images-in-markdown/) tags to switch the theme based on the user GitHub theme automatically. This is done by appending `#gh-dark-mode-only` or `#gh-light-mode-only` to the end of an image URL. This tag will define whether the image specified in the markdown is only shown to viewers using a light or a dark GitHub theme:
|
||||||
|
|
||||||
```md
|
```md
|
||||||
[](https://github.com/anuraghazra/github-readme-stats#gh-dark-mode-only)
|
[](https://github.com/anuraghazra/github-readme-stats#gh-dark-mode-only)
|
||||||
[](https://github.com/anuraghazra/github-readme-stats#gh-light-mode-only)
|
[](https://github.com/anuraghazra/github-readme-stats#gh-light-mode-only)
|
||||||
```
|
```
|
||||||
|
|
||||||
<details>
|
<details>
|
||||||
@@ -220,14 +345,14 @@ You can use [GitHub's new media feature](https://github.blog/changelog/2022-05-1
|
|||||||
```html
|
```html
|
||||||
<picture>
|
<picture>
|
||||||
<source
|
<source
|
||||||
srcset="https://github-readme-stats.vercel.app/api?username=anuraghazra&show_icons=true&theme=dark"
|
srcset="https://DARK_SVG_URL/"
|
||||||
media="(prefers-color-scheme: dark)"
|
media="(prefers-color-scheme: dark)"
|
||||||
/>
|
/>
|
||||||
<source
|
<source
|
||||||
srcset="https://github-readme-stats.vercel.app/api?username=anuraghazra&show_icons=true"
|
srcset="https://LIGHT_SVG_URL/"
|
||||||
media="(prefers-color-scheme: light), (prefers-color-scheme: no-preference)"
|
media="(prefers-color-scheme: light), (prefers-color-scheme: no-preference)"
|
||||||
/>
|
/>
|
||||||
<img src="https://github-readme-stats.vercel.app/api?username=anuraghazra&show_icons=true" />
|
<img src="https://DEFAULT_SVG_URL/" />
|
||||||
</picture>
|
</picture>
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -250,7 +375,7 @@ You can use [GitHub's new media feature](https://github.blog/changelog/2022-05-1
|
|||||||
|
|
||||||
### Customization
|
### Customization
|
||||||
|
|
||||||
You can customize the appearance of your `Stats Card` or `Repo Card` however you wish with URL parameters.
|
You can customize the appearance of your cards however you wish with these parameters.
|
||||||
|
|
||||||
#### Common Options
|
#### Common Options
|
||||||
|
|
||||||
@@ -266,7 +391,7 @@ You can customize the appearance of your `Stats Card` or `Repo Card` however you
|
|||||||
- `border_radius` - Corner rounding on the card. Default: `4.5`.
|
- `border_radius` - Corner rounding on the card. Default: `4.5`.
|
||||||
|
|
||||||
> **Warning**
|
> **Warning**
|
||||||
> We use caching to decrease the load on our servers (see <https://github.com/anuraghazra/github-readme-stats/issues/1471#issuecomment-1271551425>). Our cards have a default cache of 4 hours (14400 seconds). Also, note that the cache is clamped to a minimum of 4 hours and a maximum of 24 hours.
|
> We use caching to decrease the load on our servers (see <https://github.com/anuraghazra/github-readme-stats/issues/1471#issuecomment-1271551425>). Our cards have a default cache of 4 hours (14400 seconds). Also, note that the cache is clamped to a minimum of 4 hours and a maximum of 24 hours. This is why we recommend using our GitHub Action :)
|
||||||
|
|
||||||
##### Gradient in bg_color
|
##### Gradient in bg_color
|
||||||
|
|
||||||
@@ -336,13 +461,7 @@ Yay! You are no longer limited to 6 pinned repositories.
|
|||||||
|
|
||||||
### Usage
|
### Usage
|
||||||
|
|
||||||
Copy-paste this code into your readme and change the links.
|
Use the `api/pin` endpoint with the API or the `card: 'repo'` option with the GitHub Action.
|
||||||
|
|
||||||
Endpoint: `api/pin?username=anuraghazra&repo=github-readme-stats`
|
|
||||||
|
|
||||||
```md
|
|
||||||
[](https://github.com/anuraghazra/github-readme-stats)
|
|
||||||
```
|
|
||||||
|
|
||||||
### Demo
|
### Demo
|
||||||
|
|
||||||
@@ -357,24 +476,18 @@ Use [show_owner](#customization) variable to include the repo's owner username
|
|||||||
The top languages card shows a GitHub user's most frequently used top language.
|
The top languages card shows a GitHub user's most frequently used top language.
|
||||||
|
|
||||||
> **Note**
|
> **Note**
|
||||||
> Top Languages does not indicate my skill level or anything like that; it's a GitHub metric to determine which languages have the most code on GitHub. It is a new feature of github-readme-stats.
|
> Top Languages does not indicate skill level or anything like that; it's a GitHub metric to determine which languages have the most code on GitHub.
|
||||||
|
|
||||||
### Usage
|
### Usage
|
||||||
|
|
||||||
Copy-paste this code into your readme and change the links.
|
Use the `api/top-langs` endpoint with the API or the `card: 'top-langs'` option with the GitHub Action.
|
||||||
|
|
||||||
Endpoint: `api/top-langs?username=anuraghazra`
|
|
||||||
|
|
||||||
```md
|
|
||||||
[](https://github.com/anuraghazra/github-readme-stats)
|
|
||||||
```
|
|
||||||
|
|
||||||
### Exclude individual repositories
|
### Exclude individual repositories
|
||||||
|
|
||||||
You can use the `&exclude_repo=repo1,repo2` parameter to exclude individual repositories.
|
You can use the `&exclude_repo=repo1,repo2` parameter to exclude individual repositories.
|
||||||
|
|
||||||
```md
|
```md
|
||||||
[](https://github.com/anuraghazra/github-readme-stats)
|
?username=anuraghazra&exclude_repo=github-readme-stats,anuraghazra.github.io
|
||||||
```
|
```
|
||||||
|
|
||||||
### Hide individual languages
|
### Hide individual languages
|
||||||
@@ -382,7 +495,7 @@ You can use the `&exclude_repo=repo1,repo2` parameter to exclude individual repo
|
|||||||
You can use `&hide=language1,language2` parameter to hide individual languages.
|
You can use `&hide=language1,language2` parameter to hide individual languages.
|
||||||
|
|
||||||
```md
|
```md
|
||||||
[](https://github.com/anuraghazra/github-readme-stats)
|
?username=anuraghazra&hide=javascript,html
|
||||||
```
|
```
|
||||||
|
|
||||||
### Show more languages
|
### Show more languages
|
||||||
@@ -390,7 +503,7 @@ You can use `&hide=language1,language2` parameter to hide individual languages.
|
|||||||
You can use the `&langs_count=` option to increase or decrease the number of languages shown on the card. Valid values are integers between 1 and 10 (inclusive), and the default is 5.
|
You can use the `&langs_count=` option to increase or decrease the number of languages shown on the card. Valid values are integers between 1 and 10 (inclusive), and the default is 5.
|
||||||
|
|
||||||
```md
|
```md
|
||||||
[](https://github.com/anuraghazra/github-readme-stats)
|
?username=anuraghazra&langs_count=8
|
||||||
```
|
```
|
||||||
|
|
||||||
### Compact Language Card Layout
|
### Compact Language Card Layout
|
||||||
@@ -398,7 +511,7 @@ You can use the `&langs_count=` option to increase or decrease the number of lan
|
|||||||
You can use the `&layout=compact` option to change the card design.
|
You can use the `&layout=compact` option to change the card design.
|
||||||
|
|
||||||
```md
|
```md
|
||||||
[](https://github.com/anuraghazra/github-readme-stats)
|
?username=anuraghazra&layout=compact
|
||||||
```
|
```
|
||||||
|
|
||||||
### Hide Progress Bars
|
### Hide Progress Bars
|
||||||
@@ -406,7 +519,7 @@ You can use the `&layout=compact` option to change the card design.
|
|||||||
You can use the `&hide_progress=true` option to hide the percentages and the progress bars (layout will be automatically set to `compact`).
|
You can use the `&hide_progress=true` option to hide the percentages and the progress bars (layout will be automatically set to `compact`).
|
||||||
|
|
||||||
```md
|
```md
|
||||||
[](https://github.com/anuraghazra/github-readme-stats)
|
?username=anuraghazra&hide_progress=true
|
||||||
```
|
```
|
||||||
|
|
||||||
### Demo
|
### Demo
|
||||||
@@ -423,15 +536,27 @@ You can use the `&hide_progress=true` option to hide the percentages and the pro
|
|||||||
|
|
||||||
# Wakatime Week Stats
|
# Wakatime Week Stats
|
||||||
|
|
||||||
|
### Usage
|
||||||
|
|
||||||
|
Use the `api/wkatime` endpoint with the API or the `card: 'wakatime'` option with the GitHub Action.
|
||||||
|
|
||||||
Change the `?username=` value to your [Wakatime](https://wakatime.com) username.
|
Change the `?username=` value to your [Wakatime](https://wakatime.com) username.
|
||||||
|
|
||||||
```md
|
```md
|
||||||
[](https://github.com/anuraghazra/github-readme-stats)
|
?username=willianrod
|
||||||
```
|
```
|
||||||
|
|
||||||
> **Note**:
|
> **Note**:
|
||||||
> Please be aware that we currently only show data from Wakatime profiles that are public.
|
> Please be aware that we currently only show data from Wakatime profiles that are public.
|
||||||
|
|
||||||
|
### Compact Wakatime Card Layout
|
||||||
|
|
||||||
|
You can use the `&layout=compact` option to change the card design.
|
||||||
|
|
||||||
|
```md
|
||||||
|
?username=willianrod&layout=compact
|
||||||
|
```
|
||||||
|
|
||||||
### Demo
|
### Demo
|
||||||
|
|
||||||
[](https://github.com/anuraghazra/github-readme-stats)
|
[](https://github.com/anuraghazra/github-readme-stats)
|
||||||
@@ -504,16 +629,14 @@ By default, GitHub does not lay out the cards side by side. To do that, you can
|
|||||||
|
|
||||||
```html
|
```html
|
||||||
<a href="https://github.com/anuraghazra/github-readme-stats">
|
<a href="https://github.com/anuraghazra/github-readme-stats">
|
||||||
<img align="center" src="https://github-readme-stats.vercel.app/api/pin/?username=anuraghazra&repo=github-readme-stats" />
|
<img align="center" src="https://SVG_URL/" />
|
||||||
</a>
|
</a>
|
||||||
<a href="https://github.com/anuraghazra/convoychat">
|
<a href="https://github.com/anuraghazra/convoychat">
|
||||||
<img align="center" src="https://github-readme-stats.vercel.app/api/pin/?username=anuraghazra&repo=convoychat" />
|
<img align="center" src="https://SVG_URL/" />
|
||||||
</a>
|
</a>
|
||||||
```
|
```
|
||||||
|
|
||||||
## Deploy on your own
|
## Deploy your own Vercel instance
|
||||||
|
|
||||||
### On Vercel
|
|
||||||
|
|
||||||
#### :film_projector: [Check Out Step By Step Video Tutorial By @codeSTACKr](https://youtu.be/n6d4KHSKqGk?t=107)
|
#### :film_projector: [Check Out Step By Step Video Tutorial By @codeSTACKr](https://youtu.be/n6d4KHSKqGk?t=107)
|
||||||
|
|
||||||
@@ -550,26 +673,9 @@ Since the GitHub API only allows 5k requests per hour, my `https://github-readme
|
|||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
### On other platforms
|
|
||||||
|
|
||||||
> **Warning**
|
|
||||||
> This way of using GRS is not officially supported and was added to cater to some particular use cases where Vercel could not be used (e.g. #2341). The support for this method, therefore, is limited.
|
|
||||||
|
|
||||||
<details>
|
|
||||||
<summary><b>:hammer_and_wrench: Step-by-step guide for deploying on other platforms</b></summary>
|
|
||||||
|
|
||||||
1. Fork or clone this repo as per your needs
|
|
||||||
2. Add `express` to the dependencies section of `package.json`
|
|
||||||
https://github.com/anuraghazra/github-readme-stats/blob/ba7c2f8b55eac8452e479c8bd38b044d204d0424/package.json#L54-L61
|
|
||||||
3. Run `npm i` if needed (initial setup)
|
|
||||||
4. Run `node express.js` to start the server, or set the entry point to `express.js` in `package.json` if you're deploying on a managed service
|
|
||||||
https://github.com/anuraghazra/github-readme-stats/blob/ba7c2f8b55eac8452e479c8bd38b044d204d0424/package.json#L11
|
|
||||||
5. You're done 🎉
|
|
||||||
</details>
|
|
||||||
|
|
||||||
### Keep your fork up to date
|
### Keep your fork up to date
|
||||||
|
|
||||||
You can keep your fork, and thus your private Vercel instance up to date with the upstream using GitHubs' [Sync Fork button](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/syncing-a-fork). You can also use the [pull](https://github.com/wei/pull) package created by [@wei](https://github.com/wei) to automate this process.
|
You can keep your fork, and thus your private Vercel instance up to date with the upstream using GitHub's [Sync Fork button](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/syncing-a-fork). You can also use the [pull](https://github.com/wei/pull) package created by [@wei](https://github.com/wei) to automate this process.
|
||||||
|
|
||||||
## :sparkling_heart: Support the project
|
## :sparkling_heart: Support the project
|
||||||
|
|
||||||
|
|||||||
@@ -298,13 +298,12 @@ const themeNameAlreadyExists = (name) => {
|
|||||||
return themes[name] !== undefined;
|
return themes[name] !== undefined;
|
||||||
};
|
};
|
||||||
|
|
||||||
const DRY_RUN = process.env.DRY_RUN === "true" || false;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Main function.
|
* Main function.
|
||||||
*/
|
*/
|
||||||
export const run = async (prNumber) => {
|
export const run = async (prNumber) => {
|
||||||
try {
|
try {
|
||||||
|
const dryRun = process.env.DRY_RUN === "true" || false;
|
||||||
debug("Retrieve action information from context...");
|
debug("Retrieve action information from context...");
|
||||||
debug(`Context: ${inspect(github.context)}`);
|
debug(`Context: ${inspect(github.context)}`);
|
||||||
let commentBody = `
|
let commentBody = `
|
||||||
@@ -514,7 +513,7 @@ export const run = async (prNumber) => {
|
|||||||
// Create or update theme-preview comment.
|
// Create or update theme-preview comment.
|
||||||
debug("Create or update theme-preview comment...");
|
debug("Create or update theme-preview comment...");
|
||||||
let comment_url;
|
let comment_url;
|
||||||
if (!DRY_RUN) {
|
if (!dryRun) {
|
||||||
comment_url = await upsertComment(octokit, {
|
comment_url = await upsertComment(octokit, {
|
||||||
comment_id: comment?.id,
|
comment_id: comment?.id,
|
||||||
issue_number: pullRequestId,
|
issue_number: pullRequestId,
|
||||||
@@ -536,7 +535,7 @@ export const run = async (prNumber) => {
|
|||||||
const reviewReason = themesValid
|
const reviewReason = themesValid
|
||||||
? undefined
|
? undefined
|
||||||
: INVALID_REVIEW_COMMENT(comment_url);
|
: INVALID_REVIEW_COMMENT(comment_url);
|
||||||
if (!DRY_RUN) {
|
if (!dryRun) {
|
||||||
await addReview(
|
await addReview(
|
||||||
octokit,
|
octokit,
|
||||||
pullRequestId,
|
pullRequestId,
|
||||||
@@ -559,7 +558,7 @@ export const run = async (prNumber) => {
|
|||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
debug("Set review state to `REQUEST_CHANGES` and add `invalid` label...");
|
debug("Set review state to `REQUEST_CHANGES` and add `invalid` label...");
|
||||||
if (!DRY_RUN) {
|
if (!dryRun) {
|
||||||
await addReview(
|
await addReview(
|
||||||
octokit,
|
octokit,
|
||||||
pullRequestId,
|
pullRequestId,
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ import {
|
|||||||
import { langCardLocales } from "../translations.js";
|
import { langCardLocales } from "../translations.js";
|
||||||
|
|
||||||
const DEFAULT_CARD_WIDTH = 300;
|
const DEFAULT_CARD_WIDTH = 300;
|
||||||
const MIN_CARD_WIDTH = 280;
|
const MIN_CARD_WIDTH = 230;
|
||||||
const DEFAULT_LANGS_COUNT = 5;
|
const DEFAULT_LANGS_COUNT = 5;
|
||||||
const DEFAULT_LANG_COLOR = "#858585";
|
const DEFAULT_LANG_COLOR = "#858585";
|
||||||
const CARD_PADDING = 25;
|
const CARD_PADDING = 25;
|
||||||
@@ -317,6 +317,7 @@ const renderTopLanguages = (topLangs, options = {}) => {
|
|||||||
|
|
||||||
let finalLayout = "";
|
let finalLayout = "";
|
||||||
if (layout === "compact" || hide_progress == true) {
|
if (layout === "compact" || hide_progress == true) {
|
||||||
|
width = width + 50; // padding
|
||||||
height =
|
height =
|
||||||
calculateCompactLayoutHeight(langs.length) + (hide_progress ? -25 : 0);
|
calculateCompactLayoutHeight(langs.length) + (hide_progress ? -25 : 0);
|
||||||
|
|
||||||
|
|||||||
@@ -118,7 +118,6 @@ const createTextNode = ({
|
|||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
name: label,
|
name: label,
|
||||||
progressBarBackgroundColor,
|
progressBarBackgroundColor,
|
||||||
delay: staggerDelay + 300,
|
|
||||||
});
|
});
|
||||||
|
|
||||||
return `
|
return `
|
||||||
@@ -277,12 +276,11 @@ const renderWakatimeCard = (stats = {}, options = { hide: [] }) => {
|
|||||||
} else {
|
} else {
|
||||||
finalLayout = flexLayout({
|
finalLayout = flexLayout({
|
||||||
items: filteredLanguages.length
|
items: filteredLanguages.length
|
||||||
? filteredLanguages.map((language, index) => {
|
? filteredLanguages.map((language) => {
|
||||||
return createTextNode({
|
return createTextNode({
|
||||||
id: language.name,
|
id: language.name,
|
||||||
label: language.name,
|
label: language.name,
|
||||||
value: language.text,
|
value: language.text,
|
||||||
index: index,
|
|
||||||
percent: language.percent,
|
percent: language.percent,
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
progressBarColor: titleColor,
|
progressBarColor: titleColor,
|
||||||
@@ -323,29 +321,7 @@ const renderWakatimeCard = (stats = {}, options = { hide: [] }) => {
|
|||||||
card.setCSS(
|
card.setCSS(
|
||||||
`
|
`
|
||||||
${cssStyles}
|
${cssStyles}
|
||||||
@keyframes slideInAnimation {
|
|
||||||
from {
|
|
||||||
width: 0;
|
|
||||||
}
|
|
||||||
to {
|
|
||||||
width: calc(100%-100px);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@keyframes growWidthAnimation {
|
|
||||||
from {
|
|
||||||
width: 0;
|
|
||||||
}
|
|
||||||
to {
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.lang-name { font: 400 11px 'Segoe UI', Ubuntu, Sans-Serif; fill: ${textColor} }
|
.lang-name { font: 400 11px 'Segoe UI', Ubuntu, Sans-Serif; fill: ${textColor} }
|
||||||
#rect-mask rect{
|
|
||||||
animation: slideInAnimation 1s ease-in-out forwards;
|
|
||||||
}
|
|
||||||
.lang-progress{
|
|
||||||
animation: growWidthAnimation 0.6s ease-in-out forwards;
|
|
||||||
}
|
|
||||||
`,
|
`,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@@ -79,7 +79,6 @@
|
|||||||
"Ceylon": "#dfa535",
|
"Ceylon": "#dfa535",
|
||||||
"Chapel": "#8dc63f",
|
"Chapel": "#8dc63f",
|
||||||
"ChucK": "#3f8000",
|
"ChucK": "#3f8000",
|
||||||
"Circom": "#707575",
|
|
||||||
"Cirru": "#ccccff",
|
"Cirru": "#ccccff",
|
||||||
"Clarion": "#db901e",
|
"Clarion": "#db901e",
|
||||||
"Clarity": "#5546ff",
|
"Clarity": "#5546ff",
|
||||||
@@ -117,7 +116,6 @@
|
|||||||
"DirectX 3D File": "#aace60",
|
"DirectX 3D File": "#aace60",
|
||||||
"Dockerfile": "#384d54",
|
"Dockerfile": "#384d54",
|
||||||
"Dogescript": "#cca760",
|
"Dogescript": "#cca760",
|
||||||
"Dotenv": "#e5d559",
|
|
||||||
"Dylan": "#6c616e",
|
"Dylan": "#6c616e",
|
||||||
"E": "#ccce35",
|
"E": "#ccce35",
|
||||||
"ECL": "#8a1267",
|
"ECL": "#8a1267",
|
||||||
@@ -151,7 +149,7 @@
|
|||||||
"Forth": "#341708",
|
"Forth": "#341708",
|
||||||
"Fortran": "#4d41b1",
|
"Fortran": "#4d41b1",
|
||||||
"Fortran Free Form": "#4d41b1",
|
"Fortran Free Form": "#4d41b1",
|
||||||
"FreeBasic": "#141AC9",
|
"FreeBasic": "#867db1",
|
||||||
"FreeMarker": "#0050b2",
|
"FreeMarker": "#0050b2",
|
||||||
"Frege": "#00cafe",
|
"Frege": "#00cafe",
|
||||||
"Futhark": "#5f021f",
|
"Futhark": "#5f021f",
|
||||||
@@ -184,7 +182,6 @@
|
|||||||
"Go": "#00ADD8",
|
"Go": "#00ADD8",
|
||||||
"Go Checksums": "#00ADD8",
|
"Go Checksums": "#00ADD8",
|
||||||
"Go Module": "#00ADD8",
|
"Go Module": "#00ADD8",
|
||||||
"Godot Resource": "#355570",
|
|
||||||
"Golo": "#88562A",
|
"Golo": "#88562A",
|
||||||
"Gosu": "#82937f",
|
"Gosu": "#82937f",
|
||||||
"Grace": "#615f8b",
|
"Grace": "#615f8b",
|
||||||
@@ -195,7 +192,6 @@
|
|||||||
"Groovy": "#4298b8",
|
"Groovy": "#4298b8",
|
||||||
"Groovy Server Pages": "#4298b8",
|
"Groovy Server Pages": "#4298b8",
|
||||||
"HAProxy": "#106da9",
|
"HAProxy": "#106da9",
|
||||||
"HCL": "#844FBA",
|
|
||||||
"HLSL": "#aace60",
|
"HLSL": "#aace60",
|
||||||
"HOCON": "#9ff8ee",
|
"HOCON": "#9ff8ee",
|
||||||
"HTML": "#e34c26",
|
"HTML": "#e34c26",
|
||||||
@@ -229,7 +225,6 @@
|
|||||||
"Isabelle ROOT": "#FEFE00",
|
"Isabelle ROOT": "#FEFE00",
|
||||||
"J": "#9EEDFF",
|
"J": "#9EEDFF",
|
||||||
"JAR Manifest": "#b07219",
|
"JAR Manifest": "#b07219",
|
||||||
"JCL": "#d90e09",
|
|
||||||
"JFlex": "#DBCA00",
|
"JFlex": "#DBCA00",
|
||||||
"JSON": "#292929",
|
"JSON": "#292929",
|
||||||
"JSON with Comments": "#292929",
|
"JSON with Comments": "#292929",
|
||||||
@@ -252,11 +247,9 @@
|
|||||||
"Jsonnet": "#0064bd",
|
"Jsonnet": "#0064bd",
|
||||||
"Julia": "#a270ba",
|
"Julia": "#a270ba",
|
||||||
"Jupyter Notebook": "#DA5B0B",
|
"Jupyter Notebook": "#DA5B0B",
|
||||||
"Just": "#384d54",
|
|
||||||
"KRL": "#28430A",
|
"KRL": "#28430A",
|
||||||
"Kaitai Struct": "#773b37",
|
"Kaitai Struct": "#773b37",
|
||||||
"KakouneScript": "#6f8042",
|
"KakouneScript": "#6f8042",
|
||||||
"KerboScript": "#41adf0",
|
|
||||||
"KiCad Layout": "#2f4aab",
|
"KiCad Layout": "#2f4aab",
|
||||||
"KiCad Legacy Layout": "#2f4aab",
|
"KiCad Legacy Layout": "#2f4aab",
|
||||||
"KiCad Schematic": "#2f4aab",
|
"KiCad Schematic": "#2f4aab",
|
||||||
@@ -369,7 +362,6 @@
|
|||||||
"PicoLisp": "#6067af",
|
"PicoLisp": "#6067af",
|
||||||
"PigLatin": "#fcd7de",
|
"PigLatin": "#fcd7de",
|
||||||
"Pike": "#005390",
|
"Pike": "#005390",
|
||||||
"PlantUML": "#fbbd16",
|
|
||||||
"PogoScript": "#d80074",
|
"PogoScript": "#d80074",
|
||||||
"Polar": "#ae81ff",
|
"Polar": "#ae81ff",
|
||||||
"Portugol": "#f8bd00",
|
"Portugol": "#f8bd00",
|
||||||
@@ -387,7 +379,6 @@
|
|||||||
"Puppet": "#302B6D",
|
"Puppet": "#302B6D",
|
||||||
"PureBasic": "#5a6986",
|
"PureBasic": "#5a6986",
|
||||||
"PureScript": "#1D222D",
|
"PureScript": "#1D222D",
|
||||||
"Pyret": "#ee1e10",
|
|
||||||
"Python": "#3572A5",
|
"Python": "#3572A5",
|
||||||
"Python console": "#3572A5",
|
"Python console": "#3572A5",
|
||||||
"Python traceback": "#3572A5",
|
"Python traceback": "#3572A5",
|
||||||
@@ -540,6 +531,7 @@
|
|||||||
"fish": "#4aae47",
|
"fish": "#4aae47",
|
||||||
"hoon": "#00b171",
|
"hoon": "#00b171",
|
||||||
"jq": "#c7254e",
|
"jq": "#c7254e",
|
||||||
|
"just": "#384d54",
|
||||||
"kvlang": "#1da6e0",
|
"kvlang": "#1da6e0",
|
||||||
"mIRC Script": "#3d57c3",
|
"mIRC Script": "#3d57c3",
|
||||||
"mcfunction": "#E22837",
|
"mcfunction": "#E22837",
|
||||||
|
|||||||
@@ -69,29 +69,7 @@ exports[`Test Render Wakatime Card should render correctly with compact layout 1
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@keyframes slideInAnimation {
|
|
||||||
from {
|
|
||||||
width: 0;
|
|
||||||
}
|
|
||||||
to {
|
|
||||||
width: calc(100%-100px);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@keyframes growWidthAnimation {
|
|
||||||
from {
|
|
||||||
width: 0;
|
|
||||||
}
|
|
||||||
to {
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.lang-name { font: 400 11px 'Segoe UI', Ubuntu, Sans-Serif; fill: #434d58 }
|
.lang-name { font: 400 11px 'Segoe UI', Ubuntu, Sans-Serif; fill: #434d58 }
|
||||||
#rect-mask rect{
|
|
||||||
animation: slideInAnimation 1s ease-in-out forwards;
|
|
||||||
}
|
|
||||||
.lang-progress{
|
|
||||||
animation: growWidthAnimation 0.6s ease-in-out forwards;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -249,29 +227,7 @@ exports[`Test Render Wakatime Card should render correctly with compact layout w
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@keyframes slideInAnimation {
|
|
||||||
from {
|
|
||||||
width: 0;
|
|
||||||
}
|
|
||||||
to {
|
|
||||||
width: calc(100%-100px);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@keyframes growWidthAnimation {
|
|
||||||
from {
|
|
||||||
width: 0;
|
|
||||||
}
|
|
||||||
to {
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.lang-name { font: 400 11px 'Segoe UI', Ubuntu, Sans-Serif; fill: #434d58 }
|
.lang-name { font: 400 11px 'Segoe UI', Ubuntu, Sans-Serif; fill: #434d58 }
|
||||||
#rect-mask rect{
|
|
||||||
animation: slideInAnimation 1s ease-in-out forwards;
|
|
||||||
}
|
|
||||||
.lang-progress{
|
|
||||||
animation: growWidthAnimation 0.6s ease-in-out forwards;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -15,14 +15,14 @@ const REPO = "curly-fiesta";
|
|||||||
const USER = "catelinemnemosyne";
|
const USER = "catelinemnemosyne";
|
||||||
const STATS_DATA = {
|
const STATS_DATA = {
|
||||||
name: "Cateline Mnemosyne",
|
name: "Cateline Mnemosyne",
|
||||||
totalPRs: 2,
|
totalPRs: 1,
|
||||||
totalCommits: 8,
|
totalCommits: 7,
|
||||||
totalIssues: 1,
|
totalIssues: 1,
|
||||||
totalStars: 1,
|
totalStars: 1,
|
||||||
contributedTo: 1,
|
contributedTo: 1,
|
||||||
rank: {
|
rank: {
|
||||||
level: "A+",
|
level: "A+",
|
||||||
score: 50.88831151384285,
|
score: 50.893750297869225,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -216,7 +216,7 @@ describe("Test renderTopLanguages", () => {
|
|||||||
);
|
);
|
||||||
expect(queryAllByTestId(document.body, "lang-progress")[0]).toHaveAttribute(
|
expect(queryAllByTestId(document.body, "lang-progress")[0]).toHaveAttribute(
|
||||||
"width",
|
"width",
|
||||||
"100",
|
"120",
|
||||||
);
|
);
|
||||||
|
|
||||||
expect(queryAllByTestId(document.body, "lang-name")[1]).toHaveTextContent(
|
expect(queryAllByTestId(document.body, "lang-name")[1]).toHaveTextContent(
|
||||||
@@ -224,7 +224,7 @@ describe("Test renderTopLanguages", () => {
|
|||||||
);
|
);
|
||||||
expect(queryAllByTestId(document.body, "lang-progress")[1]).toHaveAttribute(
|
expect(queryAllByTestId(document.body, "lang-progress")[1]).toHaveAttribute(
|
||||||
"width",
|
"width",
|
||||||
"100",
|
"120",
|
||||||
);
|
);
|
||||||
|
|
||||||
expect(queryAllByTestId(document.body, "lang-name")[2]).toHaveTextContent(
|
expect(queryAllByTestId(document.body, "lang-name")[2]).toHaveTextContent(
|
||||||
@@ -232,7 +232,7 @@ describe("Test renderTopLanguages", () => {
|
|||||||
);
|
);
|
||||||
expect(queryAllByTestId(document.body, "lang-progress")[2]).toHaveAttribute(
|
expect(queryAllByTestId(document.body, "lang-progress")[2]).toHaveAttribute(
|
||||||
"width",
|
"width",
|
||||||
"50",
|
"60",
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -374,13 +374,6 @@ export const themes = {
|
|||||||
border_color: "170F0C",
|
border_color: "170F0C",
|
||||||
bg_color: "170F0C",
|
bg_color: "170F0C",
|
||||||
},
|
},
|
||||||
one_dark_pro: {
|
|
||||||
title_color: "61AFEF",
|
|
||||||
text_color: "E5C06E",
|
|
||||||
icon_color: "C678DD",
|
|
||||||
border_color: "3B4048",
|
|
||||||
bg_color: "23272E",
|
|
||||||
},
|
|
||||||
rose: {
|
rose: {
|
||||||
title_color: "8d192b",
|
title_color: "8d192b",
|
||||||
text_color: "862931",
|
text_color: "862931",
|
||||||
@@ -388,13 +381,6 @@ export const themes = {
|
|||||||
border_color: "e9d8d4",
|
border_color: "e9d8d4",
|
||||||
bg_color: "e9d8d4",
|
bg_color: "e9d8d4",
|
||||||
},
|
},
|
||||||
holi_theme: {
|
|
||||||
title_color: "5FABEE",
|
|
||||||
text_color: "D6E7FF",
|
|
||||||
icon_color: "5FABEE",
|
|
||||||
border_color: "85A4C0",
|
|
||||||
bg_color: "030314",
|
|
||||||
},
|
|
||||||
};
|
};
|
||||||
|
|
||||||
export default themes;
|
export default themes;
|
||||||
|
|||||||
Reference in New Issue
Block a user