forked from mirrored/github-readme-stats
Compare commits
42
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
44d5c1db8b | ||
|
|
31d1ab43d0 | ||
|
|
a82a617a37 | ||
|
|
6eebfe36e8 | ||
|
|
30a45d3c13 | ||
|
|
fd64333211 | ||
|
|
f5f0a79bc1 | ||
|
|
5577bbf07f | ||
|
|
da46a5093c | ||
|
|
21a9ba4fae | ||
|
|
8aacec098b | ||
|
|
da5f82ff02 | ||
|
|
be0d96615d | ||
|
|
aec73d293e | ||
|
|
879937c11d | ||
|
|
4d1d83d5e5 | ||
|
|
d8244a7fe5 | ||
|
|
b928f51442 | ||
|
|
32998295b7 | ||
|
|
2bd9d457ac | ||
|
|
c5063b92b6 | ||
|
|
b93aee34d0 | ||
|
|
ed18914fa4 | ||
|
|
1e61f9f3fe | ||
|
|
976771080f | ||
|
|
7bc8f19a7f | ||
|
|
9ec2c8367a | ||
|
|
a1c3c6accc | ||
|
|
8849b5f5fc | ||
|
|
d60d53cdb4 | ||
|
|
252c2b419d | ||
|
|
d5fbfb4345 | ||
|
|
82224fa68a | ||
|
|
1d528da1dc | ||
|
|
2ab8b85ae3 | ||
|
|
a3c6f874af | ||
|
|
8898d013b6 | ||
|
|
91345ed55f | ||
|
|
55a303b4a6 | ||
|
|
f3f7a4837d | ||
|
|
a6ff0fa521 | ||
|
|
5f20e6c97a |
@@ -1,3 +1,4 @@
|
|||||||
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,6 +23,10 @@ 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,3 +10,5 @@ vercel_token
|
|||||||
# IDE
|
# IDE
|
||||||
.vscode
|
.vscode
|
||||||
*.code-workspace
|
*.code-workspace
|
||||||
|
|
||||||
|
.vercel
|
||||||
|
|||||||
+12
-8
@@ -2,11 +2,11 @@
|
|||||||
|
|
||||||
We love your input! We want to make contributing to this project as easy and transparent as possible, whether it's:
|
We love your input! We want to make contributing to this project as easy and transparent as possible, whether it's:
|
||||||
|
|
||||||
- Reporting an issue
|
- Reporting [an issue](https://github.com/anuraghazra/github-readme-stats/issues/new?assignees=&labels=bug&template=bug_report.yml).
|
||||||
- Discussing the current state of the code
|
- [Discussing](https://github.com/anuraghazra/github-readme-stats/discussions) the current state of the code.
|
||||||
- Submitting a fix
|
- Submitting [a fix](https://github.com/anuraghazra/github-readme-stats/compare).
|
||||||
- Proposing new features
|
- Proposing [new features](https://github.com/anuraghazra/github-readme-stats/issues/new?assignees=&labels=enhancement&template=feature_request.yml).
|
||||||
- Becoming a maintainer
|
- Becoming a maintainer.
|
||||||
|
|
||||||
## All Changes Happen Through Pull Requests
|
## All Changes Happen Through Pull Requests
|
||||||
|
|
||||||
@@ -33,11 +33,15 @@ _(make sure you already have a [Vercel](https://vercel.com/) account)_
|
|||||||
1. Install [Vercel CLI](https://vercel.com/download).
|
1. Install [Vercel CLI](https://vercel.com/download).
|
||||||
2. Fork the repository and clone the code to your local machine.
|
2. Fork the repository and clone the code to your local machine.
|
||||||
3. Run `npm install` in the repository root.
|
3. Run `npm install` in the repository root.
|
||||||
4. Run the command "vercel" in the root and follow the steps there.
|
4. Run the command `vercel` in the root and follow the steps there.
|
||||||
5. Open `vercel.json` and set the maxDuration to 10.
|
5. Open `vercel.json` and set the maxDuration to 10.
|
||||||
6. Create a `.env` file in the root of the directory.
|
6. Create a `.env` file in the root of the directory.
|
||||||
7. In the .env file add a new variable named "PAT_1" with your [GitHub Personal Access Token](https://docs.github.com/en/github/authenticating-to-github/creating-a-personal-access-token).
|
7. In the .env file add a new variable named `PAT_1` with your [GitHub Personal Access Token](https://docs.github.com/en/github/authenticating-to-github/creating-a-personal-access-token).
|
||||||
8. Run the command "vercel dev" to start a development server at <https://localhost:3000>.
|
8. Run the command `vercel dev` to start a development server at <https://localhost:3000>.
|
||||||
|
9. The cards will then be available from this local endpoint (i.e. `https://localhost:3000/api?username=anuraghazra`).
|
||||||
|
|
||||||
|
> **Note**
|
||||||
|
> You can also debug any tests using the [VSCode Jest extension](https://marketplace.visualstudio.com/items?itemName=Orta.vscode-jest). For more information see https://github.com/jest-community/vscode-jest/issues/912.
|
||||||
|
|
||||||
## Themes Contribution
|
## Themes Contribution
|
||||||
|
|
||||||
|
|||||||
@@ -35,7 +35,9 @@ export default async (req, res) => {
|
|||||||
locale,
|
locale,
|
||||||
disable_animations,
|
disable_animations,
|
||||||
border_radius,
|
border_radius,
|
||||||
|
number_format,
|
||||||
border_color,
|
border_color,
|
||||||
|
rank_icon,
|
||||||
} = req.query;
|
} = req.query;
|
||||||
res.setHeader("Content-Type", "image/svg+xml");
|
res.setHeader("Content-Type", "image/svg+xml");
|
||||||
|
|
||||||
@@ -88,8 +90,10 @@ export default async (req, res) => {
|
|||||||
custom_title,
|
custom_title,
|
||||||
border_radius,
|
border_radius,
|
||||||
border_color,
|
border_color,
|
||||||
|
number_format,
|
||||||
locale: locale ? locale.toLowerCase() : null,
|
locale: locale ? locale.toLowerCase() : null,
|
||||||
disable_animations: parseBoolean(disable_animations),
|
disable_animations: parseBoolean(disable_animations),
|
||||||
|
rank_icon,
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
|
|||||||
@@ -2,11 +2,11 @@
|
|||||||
* @file Contains a simple cloud function that can be used to check which PATs are no
|
* @file Contains a simple cloud function that can be used to check which PATs are no
|
||||||
* longer working. It returns a list of valid PATs, expired PATs and PATs with errors.
|
* longer working. It returns a list of valid PATs, expired PATs and PATs with errors.
|
||||||
*
|
*
|
||||||
* @description This function is currently rate limited to 1 request per 10 minutes.
|
* @description This function is currently rate limited to 1 request per 5 minutes.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { logger, request, dateDiff } from "../../src/common/utils.js";
|
import { logger, request, dateDiff } from "../../src/common/utils.js";
|
||||||
export const RATE_LIMIT_SECONDS = 60 * 5; // 1 request per 10 minutes
|
export const RATE_LIMIT_SECONDS = 60 * 5; // 1 request per 5 minutes
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Simple uptime check fetcher for the PATs.
|
* Simple uptime check fetcher for the PATs.
|
||||||
|
|||||||
+2
-2
@@ -2,13 +2,13 @@
|
|||||||
* @file Contains a simple cloud function that can be used to check if the PATs are still
|
* @file Contains a simple cloud function that can be used to check if the PATs are still
|
||||||
* functional.
|
* functional.
|
||||||
*
|
*
|
||||||
* @description This function is currently rate limited to 1 request per 10 minutes.
|
* @description This function is currently rate limited to 1 request per 5 minutes.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import retryer from "../../src/common/retryer.js";
|
import retryer from "../../src/common/retryer.js";
|
||||||
import { logger, request } from "../../src/common/utils.js";
|
import { logger, request } from "../../src/common/utils.js";
|
||||||
|
|
||||||
export const RATE_LIMIT_SECONDS = 60 * 10; // 1 request per 10 minutes
|
export const RATE_LIMIT_SECONDS = 60 * 5; // 1 request per 5 minutes
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Simple uptime check fetcher for the PATs.
|
* Simple uptime check fetcher for the PATs.
|
||||||
|
|||||||
@@ -25,6 +25,8 @@ export default async (req, res) => {
|
|||||||
layout,
|
layout,
|
||||||
langs_count,
|
langs_count,
|
||||||
exclude_repo,
|
exclude_repo,
|
||||||
|
size_weight,
|
||||||
|
count_weight,
|
||||||
custom_title,
|
custom_title,
|
||||||
locale,
|
locale,
|
||||||
border_radius,
|
border_radius,
|
||||||
@@ -46,6 +48,8 @@ export default async (req, res) => {
|
|||||||
const topLangs = await fetchTopLanguages(
|
const topLangs = await fetchTopLanguages(
|
||||||
username,
|
username,
|
||||||
parseArray(exclude_repo),
|
parseArray(exclude_repo),
|
||||||
|
size_weight,
|
||||||
|
count_weight,
|
||||||
);
|
);
|
||||||
|
|
||||||
const cacheSeconds = clampValue(
|
const cacheSeconds = clampValue(
|
||||||
|
|||||||
+3
-1
@@ -53,6 +53,8 @@
|
|||||||
<a href="/docs/readme_nl.md">Nederlands</a>
|
<a href="/docs/readme_nl.md">Nederlands</a>
|
||||||
.
|
.
|
||||||
<a href="/docs/readme_np.md">नेपाली</a>
|
<a href="/docs/readme_np.md">नेपाली</a>
|
||||||
|
.
|
||||||
|
<a href="/docs/readme_tr.md">Türkçe</a>
|
||||||
</p>
|
</p>
|
||||||
</p>
|
</p>
|
||||||
<p align="center">喜欢这个项目?请考虑<a href="https://www.paypal.me/anuraghazra">捐赠</a>来帮助它完善!
|
<p align="center">喜欢这个项目?请考虑<a href="https://www.paypal.me/anuraghazra">捐赠</a>来帮助它完善!
|
||||||
@@ -138,7 +140,7 @@ dark, radical, merko, gruvbox, tokyonight, onedark, cobalt, synthwave, highcontr
|
|||||||
- `bg_color` - 卡片背景颜色 _(十六进制色码)_ **或者** 以 _angle,start,end_ 的形式渐变
|
- `bg_color` - 卡片背景颜色 _(十六进制色码)_ **或者** 以 _angle,start,end_ 的形式渐变
|
||||||
- `hide_border` - 隐藏卡的边框 _(布尔值)_
|
- `hide_border` - 隐藏卡的边框 _(布尔值)_
|
||||||
- `theme` - 主题名称,从[所有可用主题](../themes/README.md)中选择
|
- `theme` - 主题名称,从[所有可用主题](../themes/README.md)中选择
|
||||||
- `cache_seconds` - 手动设置缓存头 _(最小值: 1800,最大值: 86400)_
|
- `cache_seconds` - 手动设置缓存头 _(最小值: 14400,最大值: 86400)_
|
||||||
- `locale` - 在卡片中设置语言 _(例如 cn, de, es, 等等)_
|
- `locale` - 在卡片中设置语言 _(例如 cn, de, es, 等等)_
|
||||||
|
|
||||||
##### bg_color 渐变
|
##### bg_color 渐变
|
||||||
|
|||||||
+3
-1
@@ -54,6 +54,8 @@
|
|||||||
<a href="/docs/readme_nl.md">Nederlands</a>
|
<a href="/docs/readme_nl.md">Nederlands</a>
|
||||||
.
|
.
|
||||||
<a href="/docs/readme_np.md">नेपाली</a>
|
<a href="/docs/readme_np.md">नेपाली</a>
|
||||||
|
.
|
||||||
|
<a href="/docs/readme_tr.md">Türkçe</a>
|
||||||
</p>
|
</p>
|
||||||
</p>
|
</p>
|
||||||
<p align="center">Du magst das Projekt? Wie wäre es mit einer kleinen <a href="https://www.paypal.me/anuraghazra">Spende</a> um es weiterhin am Leben zu erhalten?
|
<p align="center">Du magst das Projekt? Wie wäre es mit einer kleinen <a href="https://www.paypal.me/anuraghazra">Spende</a> um es weiterhin am Leben zu erhalten?
|
||||||
@@ -128,7 +130,7 @@ Du kannst das Erscheinungsbild deiner `Stats Card` oder `Repo Card`, mithilfe vo
|
|||||||
- `bg_color` - Hintergrundfarbe _(hex color)_ **oder** ein Farbverlauf in der Form von _winkel,start,ende_
|
- `bg_color` - Hintergrundfarbe _(hex color)_ **oder** ein Farbverlauf in der Form von _winkel,start,ende_
|
||||||
- `hide_border` - Blendet den Rand der Karte aus _(Boolean)_
|
- `hide_border` - Blendet den Rand der Karte aus _(Boolean)_
|
||||||
- `theme` - Name des Erscheinungsbildes/Themes [alle verfügbaren Themes](../themes/README.md)
|
- `theme` - Name des Erscheinungsbildes/Themes [alle verfügbaren Themes](../themes/README.md)
|
||||||
- `cache_seconds` - manuelles festlegen der Cachezeiten _(min: 1800, max: 86400)_
|
- `cache_seconds` - manuelles festlegen der Cachezeiten _(min: 14400, max: 86400)_
|
||||||
- `locale` - Stellen Sie die Sprache auf der Karte ein _(z.B. cn, de, es, etc.)_
|
- `locale` - Stellen Sie die Sprache auf der Karte ein _(z.B. cn, de, es, etc.)_
|
||||||
|
|
||||||
##### Farbverlauf in bg_color
|
##### Farbverlauf in bg_color
|
||||||
|
|||||||
+1
-1
@@ -142,7 +142,7 @@ Puedes personalizar el aspecto de tu `Tarjeta de Estadísticas` o `Tarjeta de Re
|
|||||||
- `bg_color` - Color de fondo _(hex color)_
|
- `bg_color` - Color de fondo _(hex color)_
|
||||||
- `hide_border` - Oculta el borde de la tarjeta _(booleano)_
|
- `hide_border` - Oculta el borde de la tarjeta _(booleano)_
|
||||||
- `theme` - Nombre del tema, elige uno de [todos los temas disponible ](../themes/README.md)
|
- `theme` - Nombre del tema, elige uno de [todos los temas disponible ](../themes/README.md)
|
||||||
- `cache_seconds` - Cache _(min: 1800, max: 86400)_
|
- `cache_seconds` - Cache _(min: 14400, max: 86400)_
|
||||||
- `locale` - configurar el idioma en la tarjeta _(p.ej. cn, de, es, etc.)_
|
- `locale` - configurar el idioma en la tarjeta _(p.ej. cn, de, es, etc.)_
|
||||||
|
|
||||||
##### Gradiente en `bg_color`
|
##### Gradiente en `bg_color`
|
||||||
|
|||||||
+3
-1
@@ -53,6 +53,8 @@
|
|||||||
<a href="/docs/readme_nl.md">Nederlands</a>
|
<a href="/docs/readme_nl.md">Nederlands</a>
|
||||||
.
|
.
|
||||||
<a href="/docs/readme_np.md">नेपाली</a>
|
<a href="/docs/readme_np.md">नेपाली</a>
|
||||||
|
.
|
||||||
|
<a href="/docs/readme_tr.md">Türkçe</a>
|
||||||
</p>
|
</p>
|
||||||
</p>
|
</p>
|
||||||
<p align="center">Vous aimez ce projet? Pensez <a href="https://www.paypal.me/anuraghazra">à faire un don</a> pour l'améliorer!
|
<p align="center">Vous aimez ce projet? Pensez <a href="https://www.paypal.me/anuraghazra">à faire un don</a> pour l'améliorer!
|
||||||
@@ -138,7 +140,7 @@ Vous pouvez personnaliser l'apparence de votre `Carte des stats` ou `Carte de d
|
|||||||
- `bg_color` - Couleur du fond de la carte _(hex color)_ **ou** un gradiant de la forme _angle,start,end_
|
- `bg_color` - Couleur du fond de la carte _(hex color)_ **ou** un gradiant de la forme _angle,start,end_
|
||||||
- `hide_border` - Cache la bordure de la carte _(booléen)_
|
- `hide_border` - Cache la bordure de la carte _(booléen)_
|
||||||
- `theme` - Nom du thème, parmis [tous les thèmes disponibles](../themes/README.md)
|
- `theme` - Nom du thème, parmis [tous les thèmes disponibles](../themes/README.md)
|
||||||
- `cache_seconds` - Paramétrer le cache manuellement _(min: 1800, max: 86400)_
|
- `cache_seconds` - Paramétrer le cache manuellement _(min: 14400, max: 86400)_
|
||||||
- `locale` - définir la langue de la carte _(par exemple. cn, de, es, etc.)_
|
- `locale` - définir la langue de la carte _(par exemple. cn, de, es, etc.)_
|
||||||
|
|
||||||
##### Gradient in bg_color
|
##### Gradient in bg_color
|
||||||
|
|||||||
+3
-1
@@ -53,6 +53,8 @@
|
|||||||
<a href="/docs/readme_nl.md">Nederlands</a>
|
<a href="/docs/readme_nl.md">Nederlands</a>
|
||||||
.
|
.
|
||||||
<a href="/docs/readme_np.md">नेपाली</a>
|
<a href="/docs/readme_np.md">नेपाली</a>
|
||||||
|
.
|
||||||
|
<a href="/docs/readme_tr.md">Türkçe</a>
|
||||||
</p>
|
</p>
|
||||||
</p>
|
</p>
|
||||||
<p align="center">Se ti piace questo progetto, considera la possibilità di <a href="https://www.paypal.me/anuraghazra">donare</a> per aiutare a renderlo migliore!
|
<p align="center">Se ti piace questo progetto, considera la possibilità di <a href="https://www.paypal.me/anuraghazra">donare</a> per aiutare a renderlo migliore!
|
||||||
@@ -138,7 +140,7 @@ Puoi personalizzare l'aspetto delle tue `Stats Card` o delle `Repo Card` in qual
|
|||||||
- `bg_color` - Colore dello sfondo _(in esadecimale)_ **oppure** un gradiente nella forma _angolo,inizio,fine_
|
- `bg_color` - Colore dello sfondo _(in esadecimale)_ **oppure** un gradiente nella forma _angolo,inizio,fine_
|
||||||
- `hide_border` - Nasconde il bordo della carta _(booleano)_
|
- `hide_border` - Nasconde il bordo della carta _(booleano)_
|
||||||
- `theme` - Nome del tema, dai un'occhiata a [tutti i temi disponibili](../themes/README.md)
|
- `theme` - Nome del tema, dai un'occhiata a [tutti i temi disponibili](../themes/README.md)
|
||||||
- `cache_seconds` - Specifica manualmente il valore di cache, in secondi _(min: 1800, max: 86400)_
|
- `cache_seconds` - Specifica manualmente il valore di cache, in secondi _(min: 14400, max: 86400)_
|
||||||
- `locale` - Impostare la lingua nella scheda _(per esempio. cn, de, es, eccetera.)_
|
- `locale` - Impostare la lingua nella scheda _(per esempio. cn, de, es, eccetera.)_
|
||||||
|
|
||||||
##### Gradiente nello sfondo
|
##### Gradiente nello sfondo
|
||||||
|
|||||||
+3
-1
@@ -53,6 +53,8 @@
|
|||||||
<a href="/docs/readme_nl.md">Nederlands</a>
|
<a href="/docs/readme_nl.md">Nederlands</a>
|
||||||
.
|
.
|
||||||
<a href="/docs/readme_np.md">नेपाली</a>
|
<a href="/docs/readme_np.md">नेपाली</a>
|
||||||
|
.
|
||||||
|
<a href="/docs/readme_tr.md">Türkçe</a>
|
||||||
</p>
|
</p>
|
||||||
</p>
|
</p>
|
||||||
<p align="center">このプロジェクトを気に入っていただけましたか?<br>もしよろしければ、プロジェクトのさらなる改善のために<a href="https://www.paypal.me/anuraghazra">寄付</a>を検討して頂けると嬉しいです!</p>
|
<p align="center">このプロジェクトを気に入っていただけましたか?<br>もしよろしければ、プロジェクトのさらなる改善のために<a href="https://www.paypal.me/anuraghazra">寄付</a>を検討して頂けると嬉しいです!</p>
|
||||||
@@ -139,7 +141,7 @@ dark, radical, merko, gruvbox, tokyonight, onedark, cobalt, synthwave, highcontr
|
|||||||
- `bg_color` - 背景の色 _(16 進数カラーコード)_ **または** _angle,start,end_ の形式でグラデーションを指定することも可
|
- `bg_color` - 背景の色 _(16 進数カラーコード)_ **または** _angle,start,end_ の形式でグラデーションを指定することも可
|
||||||
- `hide_border` - カードの境界線を非表示にします _(ブール値)_
|
- `hide_border` - カードの境界線を非表示にします _(ブール値)_
|
||||||
- `theme` - [使用可能なテーマ一覧](../themes/README.md) から選んだテーマ名
|
- `theme` - [使用可能なテーマ一覧](../themes/README.md) から選んだテーマ名
|
||||||
- `cache_seconds` - キャッシュ時間の秒数 _(最小値: 1800, 最大値: 86400)_
|
- `cache_seconds` - キャッシュ時間の秒数 _(最小値: 14400, 最大値: 86400)_
|
||||||
- `locale` - カードに言語を設定する _(例えば cn, de, es, 等)_
|
- `locale` - カードに言語を設定する _(例えば cn, de, es, 等)_
|
||||||
|
|
||||||
##### bg_color の グラデーション指定
|
##### bg_color の グラデーション指定
|
||||||
|
|||||||
+3
-1
@@ -53,6 +53,8 @@
|
|||||||
<a href="/docs/readme_nl.md">Nederlands</a>
|
<a href="/docs/readme_nl.md">Nederlands</a>
|
||||||
.
|
.
|
||||||
<a href="/docs/readme_np.md">नेपाली</a>
|
<a href="/docs/readme_np.md">नेपाली</a>
|
||||||
|
.
|
||||||
|
<a href="/docs/readme_tr.md">Türkçe</a>
|
||||||
</p>
|
</p>
|
||||||
</p>
|
</p>
|
||||||
<p align="center">기능들이 마음에 드시나요? 괜찮으시다면, 서비스 개선을 위해 <a href="https://www.paypal.me/anuraghazra">기부</a>를 고려해주세요!
|
<p align="center">기능들이 마음에 드시나요? 괜찮으시다면, 서비스 개선을 위해 <a href="https://www.paypal.me/anuraghazra">기부</a>를 고려해주세요!
|
||||||
@@ -149,7 +151,7 @@ dark, radical, merko, gruvbox, tokyonight, onedark, cobalt, synthwave, highcontr
|
|||||||
- `bg_color` - 카드의 배경 색상 _(hex color)_ **혹은** 다음 양식으로 그라데이션 주기 _angle,start,end_
|
- `bg_color` - 카드의 배경 색상 _(hex color)_ **혹은** 다음 양식으로 그라데이션 주기 _angle,start,end_
|
||||||
- `hide_border` - 카드의 테두리 표시 여부 _(boolean)_
|
- `hide_border` - 카드의 테두리 표시 여부 _(boolean)_
|
||||||
- `theme` - 테마의 이름, [사용 가능한 모든 테마](../themes/README.md) 에서 선택
|
- `theme` - 테마의 이름, [사용 가능한 모든 테마](../themes/README.md) 에서 선택
|
||||||
- `cache_seconds` - 수동으로 캐시 헤더 설정 _(min: 1800, max: 86400)_
|
- `cache_seconds` - 수동으로 캐시 헤더 설정 _(min: 14400, max: 86400)_
|
||||||
- `locale` - 카드에 표시할 언어 _(e.g. kr, cn, de, es, etc.)_
|
- `locale` - 카드에 표시할 언어 _(e.g. kr, cn, de, es, etc.)_
|
||||||
|
|
||||||
##### 배경에 그라데이션 주기
|
##### 배경에 그라데이션 주기
|
||||||
|
|||||||
+3
-1
@@ -53,6 +53,8 @@
|
|||||||
<a href="/docs/readme_nl.md">Nederlands</a>
|
<a href="/docs/readme_nl.md">Nederlands</a>
|
||||||
.
|
.
|
||||||
<a href="/docs/readme_np.md">नेपाली</a>
|
<a href="/docs/readme_np.md">नेपाली</a>
|
||||||
|
.
|
||||||
|
<a href="/docs/readme_tr.md">Türkçe</a>
|
||||||
</p>
|
</p>
|
||||||
</p>
|
</p>
|
||||||
<p align="center">Bevalt het project? <a href="https://www.paypal.me/anuraghazra">Doneer</a> om het te verbeteren!
|
<p align="center">Bevalt het project? <a href="https://www.paypal.me/anuraghazra">Doneer</a> om het te verbeteren!
|
||||||
@@ -142,7 +144,7 @@ Je kan het uiterlijk van je `Statistieken kaart` of `Repo kaart` aanpassen hoe j
|
|||||||
- `bg_color` - Achtergrond kleur van de kaart _(hex kleur)_ **of** een verloop van kleuren in het formaat van _graden,start,einde_
|
- `bg_color` - Achtergrond kleur van de kaart _(hex kleur)_ **of** een verloop van kleuren in het formaat van _graden,start,einde_
|
||||||
- `hide_border` - Verbergt de rand van de kaart _(boolean)_
|
- `hide_border` - Verbergt de rand van de kaart _(boolean)_
|
||||||
- `theme` - Naam van het thema, kies uit [alle beschikbare thema\'s](../themes/README.md)
|
- `theme` - Naam van het thema, kies uit [alle beschikbare thema\'s](../themes/README.md)
|
||||||
- `cache_seconds` - Stel de cache header handmatig in _(min: 1800, max: 86400)_
|
- `cache_seconds` - Stel de cache header handmatig in _(min: 14400, max: 86400)_
|
||||||
- `locale` - Stel taal van de kaart in _(e.g. cn, de, es, etc.)_
|
- `locale` - Stel taal van de kaart in _(e.g. cn, de, es, etc.)_
|
||||||
|
|
||||||
##### Kleurenverloop in bg_color (achtergrond kleur):
|
##### Kleurenverloop in bg_color (achtergrond kleur):
|
||||||
|
|||||||
+5
-1
@@ -49,8 +49,12 @@
|
|||||||
<a href="/docs/readme_it.md">Italiano</a>
|
<a href="/docs/readme_it.md">Italiano</a>
|
||||||
·
|
·
|
||||||
<a href="/docs/readme_kr.md">한국어</a>
|
<a href="/docs/readme_kr.md">한국어</a>
|
||||||
|
.
|
||||||
|
<a href="/docs/readme_nl.md">Nederlands</a>
|
||||||
·
|
·
|
||||||
<a href="/docs/readme_np.md">नेपाली</a>
|
<a href="/docs/readme_np.md">नेपाली</a>
|
||||||
|
.
|
||||||
|
<a href="/docs/readme_tr.md">Türkçe</a>
|
||||||
</p>
|
</p>
|
||||||
</p>
|
</p>
|
||||||
<p align="center">परियोजना मनपर्यो? तपाईं मद्दत गर्न सक्नुहुन्छ <a href="https://www.paypal.me/anuraghazra">यो परियोजना</a> बढ्न
|
<p align="center">परियोजना मनपर्यो? तपाईं मद्दत गर्न सक्नुहुन्छ <a href="https://www.paypal.me/anuraghazra">यो परियोजना</a> बढ्न
|
||||||
@@ -138,7 +142,7 @@ dark, radical, merko, gruvbox, tokyonight, onedark, cobalt, synthwave, highcontr
|
|||||||
- `bg_color` - Card's background color _(hex color)_ **or** a gradient in the form of _angle,start,end_
|
- `bg_color` - Card's background color _(hex color)_ **or** a gradient in the form of _angle,start,end_
|
||||||
- `hide_border` - Hides the card's border _(boolean)_
|
- `hide_border` - Hides the card's border _(boolean)_
|
||||||
- `theme` - name of the theme, choose from [all available themes](./themes/README.md)
|
- `theme` - name of the theme, choose from [all available themes](./themes/README.md)
|
||||||
- `cache_seconds` - set the cache header manually _(min: 1800, max: 86400)_
|
- `cache_seconds` - set the cache header manually _(min: 14400, max: 86400)_
|
||||||
- `locale` - set the language in the card _(e.g. cn, de, es, etc.)_
|
- `locale` - set the language in the card _(e.g. cn, de, es, etc.)_
|
||||||
|
|
||||||
##### Gradient in bg_color
|
##### Gradient in bg_color
|
||||||
|
|||||||
@@ -141,7 +141,7 @@ Personalize a aparência do seu `Stats Card` ou `Repo Card` da maneira que desej
|
|||||||
- `bg_color` - Cor de fundo do cartão _(hex color)_
|
- `bg_color` - Cor de fundo do cartão _(hex color)_
|
||||||
- `hide_border` - Esconde a borda do cartão _(boleano)_
|
- `hide_border` - Esconde a borda do cartão _(boleano)_
|
||||||
- `theme` - Nome do tema, escolha em [todos os temas disponíveis](../themes/README.md)
|
- `theme` - Nome do tema, escolha em [todos os temas disponíveis](../themes/README.md)
|
||||||
- `cache_seconds` - Defina o cabeçalho do cache manualmente _(min: 1800, max: 86400)_
|
- `cache_seconds` - Defina o cabeçalho do cache manualmente _(min: 14400, max: 86400)_
|
||||||
- `locale` - defina o idioma no cartão _(por exemplo. cn, de, es, etc.)_
|
- `locale` - defina o idioma no cartão _(por exemplo. cn, de, es, etc.)_
|
||||||
|
|
||||||
> Nota sobre o cache: Cartões de repositório tem um cache padrão de 30 minutos (1800 segundos), se o número a contagem de forks e contagem de estrelas é menor que 1 mil o padrão é 2 horas (7200 segundos). Note também que o cache é limitado a um mínimo de 30 minutos e um máximo de 24 horas.
|
> Nota sobre o cache: Cartões de repositório tem um cache padrão de 30 minutos (1800 segundos), se o número a contagem de forks e contagem de estrelas é menor que 1 mil o padrão é 2 horas (7200 segundos). Note também que o cache é limitado a um mínimo de 30 minutos e um máximo de 24 horas.
|
||||||
|
|||||||
+2
-2
@@ -143,7 +143,7 @@ dark, radical, merko, gruvbox, tokyonight, onedark, cobalt, synthwave, highcontr
|
|||||||
- `bg_color` - Kartın arkaplan rengi _(hex color / hex rengi)_ **ya da** gradient şeklinde _açı,başlangıç,bitiş_
|
- `bg_color` - Kartın arkaplan rengi _(hex color / hex rengi)_ **ya da** gradient şeklinde _açı,başlangıç,bitiş_
|
||||||
- `hide_border` - Kartın çerçevelerini gizler _(boolean)_
|
- `hide_border` - Kartın çerçevelerini gizler _(boolean)_
|
||||||
- `theme` - Temanın rengi [tüm temalar](./themes/README.md)
|
- `theme` - Temanın rengi [tüm temalar](./themes/README.md)
|
||||||
- `cache_seconds` - Manuel olarak cache'i belirleyebilirsiniz _(en az: 1800, en fazla: 86400)_
|
- `cache_seconds` - Manuel olarak cache'i belirleyebilirsiniz _(en az: 14400, en fazla: 86400)_
|
||||||
- `locale` - Karttaki dili seçebilirsiniz _(örneğin; tr, cn, de, es, vb.)_
|
- `locale` - Karttaki dili seçebilirsiniz _(örneğin; tr, cn, de, es, vb.)_
|
||||||
|
|
||||||
##### bg_color'da Gradient
|
##### bg_color'da Gradient
|
||||||
@@ -409,7 +409,7 @@ Teşekkürler! :heart:
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
[](https://vercel.com?utm_source=github_readme_stats_team&utm_campaign=oss)
|
[](https://vercel.com?utm_source=github_readme_stats_team&utm_campaign=oss)
|
||||||
|
|
||||||
|
|
||||||
Katkılara açığız! <3
|
Katkılara açığız! <3
|
||||||
|
|||||||
+15
@@ -0,0 +1,15 @@
|
|||||||
|
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);
|
||||||
@@ -66,7 +66,7 @@
|
|||||||
<p align="center">Love the project? Please consider <a href="https://www.paypal.me/anuraghazra">donating</a> to help it improve!</p>
|
<p align="center">Love the project? Please consider <a href="https://www.paypal.me/anuraghazra">donating</a> to help it improve!</p>
|
||||||
|
|
||||||
<a href="https://indiafightscorona.giveindia.org">
|
<a href="https://indiafightscorona.giveindia.org">
|
||||||
<img src="https://indiaspora.org/wp-content/uploads/2021/04/give-India-logo.png" alt="Give india logo" width="200" />
|
<img src="https://cfstatic.give.do/logo.png" alt="Give india logo" width="200" />
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
Are you considering supporting the project by donating? Please DO NOT!!
|
Are you considering supporting the project by donating? Please DO NOT!!
|
||||||
@@ -92,7 +92,9 @@ 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-vercel-instance)
|
- [Deploy Yourself](#deploy-on-your-own)
|
||||||
|
- [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)
|
||||||
|
|
||||||
# GitHub Stats Card
|
# GitHub Stats Card
|
||||||
@@ -133,7 +135,7 @@ You can add the count of all your private contributions to the total commits cou
|
|||||||
|
|
||||||
### 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
|
||||||

|

|
||||||
@@ -181,7 +183,7 @@ We have included a `transparent` theme that has a transparent background. This t
|
|||||||
|
|
||||||
##### Add transparent alpha channel to a themes bg_color
|
##### Add transparent alpha channel to a themes bg_color
|
||||||
|
|
||||||
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 color with a transparent alpha channel (i.e. `bg_color=00000000`):
|
||||||
|
|
||||||
```md
|
```md
|
||||||

|

|
||||||
@@ -278,6 +280,7 @@ You can provide multiple comma-separated values in the bg_color option to render
|
|||||||
- `hide_title` - _(boolean)_. Default: `false`.
|
- `hide_title` - _(boolean)_. Default: `false`.
|
||||||
- `card_width` - Set the card's width manually _(number)_. Default: `500px (approx.)`.
|
- `card_width` - Set the card's width manually _(number)_. Default: `500px (approx.)`.
|
||||||
- `hide_rank` - _(boolean)_ hides the rank and automatically resizes the card width. Default: `false`.
|
- `hide_rank` - _(boolean)_ hides the rank and automatically resizes the card width. Default: `false`.
|
||||||
|
- `rank_icon` - Shows alternative rank icon (i.e. `github` or `default`). Default: `default`.
|
||||||
- `show_icons` - _(boolean)_. Default: `false`.
|
- `show_icons` - _(boolean)_. Default: `false`.
|
||||||
- `include_all_commits` - Count total commits instead of just the current year commits _(boolean)_. Default: `false`.
|
- `include_all_commits` - Count total commits instead of just the current year commits _(boolean)_. Default: `false`.
|
||||||
- `count_private` - Count private commits _(boolean)_. Default: `false`.
|
- `count_private` - Count private commits _(boolean)_. Default: `false`.
|
||||||
@@ -287,6 +290,7 @@ You can provide multiple comma-separated values in the bg_color option to render
|
|||||||
- `text_bold` - Use bold text _(boolean)_. Default: `true`.
|
- `text_bold` - Use bold text _(boolean)_. Default: `true`.
|
||||||
- `disable_animations` - Disables all animations in the card _(boolean)_. Default: `false`.
|
- `disable_animations` - Disables all animations in the card _(boolean)_. Default: `false`.
|
||||||
- `ring_color` - Color of the rank circle _(hex color)_. Defaults to the theme ring color if it exists and otherwise the title color.
|
- `ring_color` - Color of the rank circle _(hex color)_. Defaults to the theme ring color if it exists and otherwise the title color.
|
||||||
|
- `number_format` - Switch between two available formats for displaying the card values `short` (i.e. `6.6k`) and `long` (i.e. `6626`). Default: `short`.
|
||||||
|
|
||||||
> **Note**
|
> **Note**
|
||||||
> When hide_rank=`true`, the minimum card width is 270 px + the title length and padding.
|
> When hide_rank=`true`, the minimum card width is 270 px + the title length and padding.
|
||||||
@@ -306,6 +310,8 @@ You can provide multiple comma-separated values in the bg_color option to render
|
|||||||
- `custom_title` - Sets a custom title for the card _(string)_. Default `Most Used Languages`.
|
- `custom_title` - Sets a custom title for the card _(string)_. Default `Most Used Languages`.
|
||||||
- `disable_animations` - Disables all animations in the card _(boolean)_. Default: `false`.
|
- `disable_animations` - Disables all animations in the card _(boolean)_. Default: `false`.
|
||||||
- `hide_progress` - It uses the compact layout option, hides percentages, and removes the bars. Default: `false`.
|
- `hide_progress` - It uses the compact layout option, hides percentages, and removes the bars. Default: `false`.
|
||||||
|
- `size_weight` - Configures language stats algorithm _(number)_ (see [Language stats algorithm](#Language-stats-algorithm)), defaults to 1.
|
||||||
|
- `count_weight` - Configures language stats algorithm _(number)_ (see [Language stats algorithm](#Language-stats-algorithm)), defaults to 0.
|
||||||
|
|
||||||
> **Warning**
|
> **Warning**
|
||||||
> Language names should be URI-escaped, as specified in [Percent Encoding](https://en.wikipedia.org/wiki/Percent-encoding)
|
> Language names should be URI-escaped, as specified in [Percent Encoding](https://en.wikipedia.org/wiki/Percent-encoding)
|
||||||
@@ -355,7 +361,7 @@ 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 the user's 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.
|
||||||
|
|
||||||
### Usage
|
### Usage
|
||||||
|
|
||||||
@@ -367,6 +373,24 @@ Endpoint: `api/top-langs?username=anuraghazra`
|
|||||||
[](https://github.com/anuraghazra/github-readme-stats)
|
[](https://github.com/anuraghazra/github-readme-stats)
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Language stats algorithm
|
||||||
|
|
||||||
|
We use the following algorithm to calculate the languages percentages on the language card:
|
||||||
|
|
||||||
|
```js
|
||||||
|
ranking_index = (byte_count ^ size_weight) * (repo_count ^ count_weight)
|
||||||
|
```
|
||||||
|
|
||||||
|
By default, only the byte count is used for determining the languages percentages shown on the language card (i.e. `size_weight=1` and `count_weight=0`). You can, however, use the `&size_weight=` and `&count_weight=` options to weight the language usage calculation. The values must be positive real numbers. [More details about the algorithm can be found here](https://github.com/anuraghazra/github-readme-stats/issues/1600#issuecomment-1046056305).
|
||||||
|
|
||||||
|
- `&size_weight=1&count_weight=0` - _(default)_ Orders by byte count.
|
||||||
|
- `&size_weight=0.5&count_weight=0.5` - _(recommended)_ Uses both byte and repo count for ranking
|
||||||
|
- `&size_weight=0&count_weight=1` - Orders by repo count
|
||||||
|
|
||||||
|
```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.
|
||||||
@@ -456,6 +480,10 @@ Change the `?username=` value to your [Wakatime](https://wakatime.com) username.
|
|||||||
|
|
||||||

|

|
||||||
|
|
||||||
|
- Shows Github logo instead rank level
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
- Customize Border Color
|
- Customize Border Color
|
||||||
|
|
||||||

|

|
||||||
@@ -509,7 +537,9 @@ By default, GitHub does not lay out the cards side by side. To do that, you can
|
|||||||
</a>
|
</a>
|
||||||
```
|
```
|
||||||
|
|
||||||
## Deploy on your own Vercel instance
|
## Deploy on your own
|
||||||
|
|
||||||
|
### 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)
|
||||||
|
|
||||||
@@ -546,6 +576,23 @@ 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 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.
|
||||||
|
|||||||
+130
-62
@@ -26,9 +26,9 @@ const FAIL_TEXT = `
|
|||||||
\rUnfortunately, your theme PR contains an error or does not adhere to our [theme guidelines](https://github.com/anuraghazra/github-readme-stats/blob/master/CONTRIBUTING.md#themes-contribution). Please fix the issues below, and we will review your\
|
\rUnfortunately, your theme PR contains an error or does not adhere to our [theme guidelines](https://github.com/anuraghazra/github-readme-stats/blob/master/CONTRIBUTING.md#themes-contribution). Please fix the issues below, and we will review your\
|
||||||
\r PR again. This pull request will **automatically close in 20 days** if no changes are made. After this time, you must re-open the PR for it to be reviewed.
|
\r PR again. This pull request will **automatically close in 20 days** if no changes are made. After this time, you must re-open the PR for it to be reviewed.
|
||||||
`;
|
`;
|
||||||
const THEME_CONTRIB_GUIDELINESS = `
|
const THEME_CONTRIB_GUIDELINES = `
|
||||||
\rHi, thanks for the theme contribution. Please read our theme [contribution guidelines](https://github.com/anuraghazra/github-readme-stats/blob/master/CONTRIBUTING.md#themes-contribution).
|
\rHi, thanks for the theme contribution. Please read our theme [contribution guidelines](https://github.com/anuraghazra/github-readme-stats/blob/master/CONTRIBUTING.md#themes-contribution).
|
||||||
\rWe are currently only accepting color combinations from any VSCode theme or themes with good colour combinations to minimize bloating the themes collection.
|
\rWe are currently only accepting color combinations from any VSCode theme or themes with good color combinations to minimize bloating the themes collection.
|
||||||
|
|
||||||
\r> Also, note that if this theme is exclusively for your personal use, then instead of adding it to our theme collection, you can use card [customization options](https://github.com/anuraghazra/github-readme-stats#customization).
|
\r> Also, note that if this theme is exclusively for your personal use, then instead of adding it to our theme collection, you can use card [customization options](https://github.com/anuraghazra/github-readme-stats#customization).
|
||||||
`;
|
`;
|
||||||
@@ -43,6 +43,23 @@ const ACCEPTED_COLOR_PROPS = Object.keys(COLOR_PROPS);
|
|||||||
const REQUIRED_COLOR_PROPS = ACCEPTED_COLOR_PROPS.slice(0, 4);
|
const REQUIRED_COLOR_PROPS = ACCEPTED_COLOR_PROPS.slice(0, 4);
|
||||||
const INVALID_REVIEW_COMMENT = (commentUrl) =>
|
const INVALID_REVIEW_COMMENT = (commentUrl) =>
|
||||||
`Some themes are invalid. See the [Automated Theme Preview](${commentUrl}) comment above for more information.`;
|
`Some themes are invalid. See the [Automated Theme Preview](${commentUrl}) comment above for more information.`;
|
||||||
|
var OCTOKIT;
|
||||||
|
var OWNER;
|
||||||
|
var REPO;
|
||||||
|
var PULL_REQUEST_ID;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Incorrect JSON format error.
|
||||||
|
* @extends Error
|
||||||
|
* @param {string} message Error message.
|
||||||
|
* @returns {Error} IncorrectJsonFormatError.
|
||||||
|
*/
|
||||||
|
class IncorrectJsonFormatError extends Error {
|
||||||
|
constructor(message) {
|
||||||
|
super(message);
|
||||||
|
this.name = "IncorrectJsonFormatError";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieve PR number from the event payload.
|
* Retrieve PR number from the event payload.
|
||||||
@@ -126,15 +143,36 @@ const findComment = async (octokit, issueNumber, owner, repo, commenter) => {
|
|||||||
* Create or update the preview comment.
|
* Create or update the preview comment.
|
||||||
*
|
*
|
||||||
* @param {Object} octokit Octokit instance.
|
* @param {Object} octokit Octokit instance.
|
||||||
* @param {Object} props Comment properties.
|
* @param {number} issueNumber Issue number.
|
||||||
|
* @param {Object} repo Repository name.
|
||||||
|
* @param {Object} owner Owner of the repository.
|
||||||
|
* @param {number} commentId Comment ID.
|
||||||
|
* @param {string} body Comment body.
|
||||||
* @return {string} The comment URL.
|
* @return {string} The comment URL.
|
||||||
*/
|
*/
|
||||||
const upsertComment = async (octokit, props) => {
|
const upsertComment = async (
|
||||||
|
octokit,
|
||||||
|
issueNumber,
|
||||||
|
repo,
|
||||||
|
owner,
|
||||||
|
commentId,
|
||||||
|
body,
|
||||||
|
) => {
|
||||||
let resp;
|
let resp;
|
||||||
if (props.comment_id !== undefined) {
|
if (commentId !== undefined) {
|
||||||
resp = await octokit.issues.updateComment(props);
|
resp = await octokit.issues.updateComment({
|
||||||
|
owner,
|
||||||
|
repo,
|
||||||
|
comment_id: commentId,
|
||||||
|
body,
|
||||||
|
});
|
||||||
} else {
|
} else {
|
||||||
resp = await octokit.issues.createComment(props);
|
resp = await octokit.issues.createComment({
|
||||||
|
owner,
|
||||||
|
repo,
|
||||||
|
issue_number: issueNumber,
|
||||||
|
body,
|
||||||
|
});
|
||||||
}
|
}
|
||||||
return resp.data.html_url;
|
return resp.data.html_url;
|
||||||
};
|
};
|
||||||
@@ -269,22 +307,38 @@ const parseJSON = (json) => {
|
|||||||
if (typeof parsedJson === "object") {
|
if (typeof parsedJson === "object") {
|
||||||
return parsedJson;
|
return parsedJson;
|
||||||
} else {
|
} else {
|
||||||
throw new Error("PR diff is not a valid theme JSON object.");
|
throw new IncorrectJsonFormatError(
|
||||||
|
"PR diff is not a valid theme JSON object.",
|
||||||
|
);
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
let parsedJson = json
|
// Remove trailing commas (if any).
|
||||||
|
let parsedJson = json.replace(/(,\s*})/g, "}");
|
||||||
|
|
||||||
|
// Remove JS comments (if any).
|
||||||
|
parsedJson = parsedJson.replace(/\/\/[A-z\s]*\s/g, "");
|
||||||
|
|
||||||
|
// Fix incorrect open bracket (if any).
|
||||||
|
const splitJson = parsedJson
|
||||||
.split(/([\s\r\s]*}[\s\r\s]*,[\s\r\s]*)(?=[\w"-]+:)/)
|
.split(/([\s\r\s]*}[\s\r\s]*,[\s\r\s]*)(?=[\w"-]+:)/)
|
||||||
.filter((x) => typeof x !== "string" || !!x.trim());
|
.filter((x) => typeof x !== "string" || !!x.trim()); // Split json into array of strings and objects.
|
||||||
if (parsedJson[0].replace(/\s+/g, "") === "},") {
|
if (splitJson[0].replace(/\s+/g, "") === "},") {
|
||||||
parsedJson[0] = "},";
|
splitJson[0] = "},";
|
||||||
if (!/\s*}\s*,?\s*$/.test(parsedJson[1])) {
|
if (!/\s*}\s*,?\s*$/.test(splitJson[1])) {
|
||||||
parsedJson.push(parsedJson.shift());
|
splitJson.push(splitJson.shift());
|
||||||
} else {
|
} else {
|
||||||
parsedJson.shift();
|
splitJson.shift();
|
||||||
}
|
}
|
||||||
return Hjson.parse(parsedJson.join(""));
|
parsedJson = splitJson.join("");
|
||||||
} else {
|
}
|
||||||
throw error;
|
|
||||||
|
// Try to parse the fixed json.
|
||||||
|
try {
|
||||||
|
return Hjson.parse(parsedJson);
|
||||||
|
} catch (error) {
|
||||||
|
throw new IncorrectJsonFormatError(
|
||||||
|
`Theme JSON file could not be parsed: ${error.message}`,
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@@ -298,53 +352,64 @@ 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 () => {
|
||||||
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 = `
|
||||||
\r# ${COMMENT_TITLE}
|
\r# ${COMMENT_TITLE}
|
||||||
\r${THEME_CONTRIB_GUIDELINESS}
|
\r${THEME_CONTRIB_GUIDELINES}
|
||||||
`;
|
`;
|
||||||
const ccc = new ColorContrastChecker();
|
const ccc = new ColorContrastChecker();
|
||||||
const octokit = github.getOctokit(getGithubToken());
|
OCTOKIT = github.getOctokit(getGithubToken());
|
||||||
const pullRequestId = prNumber ? prNumber : getPrNumber();
|
PULL_REQUEST_ID = getPrNumber();
|
||||||
const commenter = getCommenter();
|
|
||||||
const { owner, repo } = getRepoInfo(github.context);
|
const { owner, repo } = getRepoInfo(github.context);
|
||||||
debug(`Owner: ${owner}`);
|
OWNER = owner;
|
||||||
debug(`Repo: ${repo}`);
|
REPO = repo;
|
||||||
|
const commenter = getCommenter();
|
||||||
|
PULL_REQUEST_ID = getPrNumber();
|
||||||
|
debug(`Owner: ${OWNER}`);
|
||||||
|
debug(`Repo: ${REPO}`);
|
||||||
debug(`Commenter: ${commenter}`);
|
debug(`Commenter: ${commenter}`);
|
||||||
|
|
||||||
// Retrieve the PR diff and preview-theme comment.
|
// Retrieve the PR diff and preview-theme comment.
|
||||||
debug("Retrieve PR diff...");
|
debug("Retrieve PR diff...");
|
||||||
const res = await octokit.pulls.get({
|
const res = await OCTOKIT.pulls.get({
|
||||||
owner,
|
owner: OWNER,
|
||||||
repo,
|
repo: REPO,
|
||||||
pull_number: pullRequestId,
|
pull_number: PULL_REQUEST_ID,
|
||||||
mediaType: {
|
mediaType: {
|
||||||
format: "diff",
|
format: "diff",
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
debug("Retrieve preview-theme comment...");
|
debug("Retrieve preview-theme comment...");
|
||||||
const comment = await findComment(
|
const comment = await findComment(
|
||||||
octokit,
|
OCTOKIT,
|
||||||
pullRequestId,
|
PULL_REQUEST_ID,
|
||||||
owner,
|
OWNER,
|
||||||
repo,
|
REPO,
|
||||||
commenter,
|
commenter,
|
||||||
);
|
);
|
||||||
|
|
||||||
// Retrieve theme changes from the PR diff.
|
// Retrieve theme changes from the PR diff.
|
||||||
debug("Retrieve themes...");
|
debug("Retrieve themes...");
|
||||||
const diff = parse(res.data);
|
const diff = parse(res.data);
|
||||||
|
|
||||||
|
// Retrieve all theme changes from the PR diff and convert to JSON.
|
||||||
|
debug("Retrieve theme changes...");
|
||||||
const content = diff
|
const content = diff
|
||||||
.find((file) => file.to === "themes/index.js")
|
.find((file) => file.to === "themes/index.js")
|
||||||
.chunks[0].changes.filter((c) => c.type === "add")
|
.chunks.map((chunk) =>
|
||||||
|
chunk.changes
|
||||||
|
.filter((c) => c.type === "add")
|
||||||
.map((c) => c.content.replace("+", ""))
|
.map((c) => c.content.replace("+", ""))
|
||||||
|
.join(""),
|
||||||
|
)
|
||||||
.join("");
|
.join("");
|
||||||
const themeObject = parseJSON(content);
|
const themeObject = parseJSON(content);
|
||||||
if (
|
if (
|
||||||
@@ -513,14 +578,15 @@ 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 (!dryRun) {
|
if (!DRY_RUN) {
|
||||||
comment_url = await upsertComment(octokit, {
|
comment_url = await upsertComment(
|
||||||
comment_id: comment?.id,
|
OCTOKIT,
|
||||||
issue_number: pullRequestId,
|
PULL_REQUEST_ID,
|
||||||
owner,
|
REPO,
|
||||||
repo,
|
OWNER,
|
||||||
body: commentBody,
|
comment?.id,
|
||||||
});
|
commentBody,
|
||||||
|
);
|
||||||
} else {
|
} else {
|
||||||
info(`DRY_RUN: Comment body: ${commentBody}`);
|
info(`DRY_RUN: Comment body: ${commentBody}`);
|
||||||
comment_url = "";
|
comment_url = "";
|
||||||
@@ -535,20 +601,20 @@ export const run = async (prNumber) => {
|
|||||||
const reviewReason = themesValid
|
const reviewReason = themesValid
|
||||||
? undefined
|
? undefined
|
||||||
: INVALID_REVIEW_COMMENT(comment_url);
|
: INVALID_REVIEW_COMMENT(comment_url);
|
||||||
if (!dryRun) {
|
if (!DRY_RUN) {
|
||||||
await addReview(
|
await addReview(
|
||||||
octokit,
|
OCTOKIT,
|
||||||
pullRequestId,
|
PULL_REQUEST_ID,
|
||||||
owner,
|
OWNER,
|
||||||
repo,
|
REPO,
|
||||||
reviewState,
|
reviewState,
|
||||||
reviewReason,
|
reviewReason,
|
||||||
);
|
);
|
||||||
await addRemoveLabel(
|
await addRemoveLabel(
|
||||||
octokit,
|
OCTOKIT,
|
||||||
pullRequestId,
|
PULL_REQUEST_ID,
|
||||||
owner,
|
OWNER,
|
||||||
repo,
|
REPO,
|
||||||
"invalid",
|
"invalid",
|
||||||
!themesValid,
|
!themesValid,
|
||||||
);
|
);
|
||||||
@@ -558,20 +624,22 @@ 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 (!dryRun) {
|
if (!DRY_RUN) {
|
||||||
await addReview(
|
await addReview(
|
||||||
octokit,
|
OCTOKIT,
|
||||||
pullRequestId,
|
PULL_REQUEST_ID,
|
||||||
owner,
|
OWNER,
|
||||||
repo,
|
REPO,
|
||||||
"REQUEST_CHANGES",
|
"REQUEST_CHANGES",
|
||||||
error.message,
|
"**Something went wrong in the theme preview action:** `" +
|
||||||
|
error.message +
|
||||||
|
"`",
|
||||||
);
|
);
|
||||||
await addRemoveLabel(
|
await addRemoveLabel(
|
||||||
octokit,
|
OCTOKIT,
|
||||||
pullRequestId,
|
PULL_REQUEST_ID,
|
||||||
owner,
|
OWNER,
|
||||||
repo,
|
REPO,
|
||||||
"invalid",
|
"invalid",
|
||||||
true,
|
true,
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ export BRANCH_NAME=updated-theme-readme
|
|||||||
git --version
|
git --version
|
||||||
git config --global user.email "no-reply@githubreadmestats.com"
|
git config --global user.email "no-reply@githubreadmestats.com"
|
||||||
git config --global user.name "GitHub Readme Stats Bot"
|
git config --global user.name "GitHub Readme Stats Bot"
|
||||||
|
git config --global --add safe.directory ${GITHUB_WORKSPACE}
|
||||||
git branch -d $BRANCH_NAME || true
|
git branch -d $BRANCH_NAME || true
|
||||||
git checkout -b $BRANCH_NAME
|
git checkout -b $BRANCH_NAME
|
||||||
git add --all
|
git add --all
|
||||||
|
|||||||
@@ -29,13 +29,14 @@ const normalcdf = (mean, sigma, to) => {
|
|||||||
/**
|
/**
|
||||||
* Calculates the users rank.
|
* Calculates the users rank.
|
||||||
*
|
*
|
||||||
* @param {number} totalRepos Total number of repos.
|
* @param {object} params Parameters on which the user's rank depends.
|
||||||
* @param {number} totalCommits Total number of commits.
|
* @param {number} params.totalRepos Total number of repos.
|
||||||
* @param {number} contributions The number of contributions.
|
* @param {number} params.totalCommits Total number of commits.
|
||||||
* @param {number} followers The number of followers.
|
* @param {number} params.contributions The number of contributions.
|
||||||
* @param {number} prs The number of pull requests.
|
* @param {number} params.followers The number of followers.
|
||||||
* @param {number} issues The number of issues.
|
* @param {number} params.prs The number of pull requests.
|
||||||
* @param {number} stargazers The number of stars.
|
* @param {number} params.issues The number of issues.
|
||||||
|
* @param {number} params.stargazers The number of stars.
|
||||||
* @returns {{level: string, score: number}}} The users rank.
|
* @returns {{level: string, score: number}}} The users rank.
|
||||||
*/
|
*/
|
||||||
const calculateRank = ({
|
const calculateRank = ({
|
||||||
|
|||||||
+9
-12
@@ -1,7 +1,7 @@
|
|||||||
// @ts-check
|
// @ts-check
|
||||||
import { Card } from "../common/Card.js";
|
import { Card } from "../common/Card.js";
|
||||||
import { I18n } from "../common/I18n.js";
|
import { I18n } from "../common/I18n.js";
|
||||||
import { icons } from "../common/icons.js";
|
import { icons, rankIcon } from "../common/icons.js";
|
||||||
import {
|
import {
|
||||||
clampValue,
|
clampValue,
|
||||||
flexLayout,
|
flexLayout,
|
||||||
@@ -39,8 +39,10 @@ const createTextNode = ({
|
|||||||
showIcons,
|
showIcons,
|
||||||
shiftValuePos,
|
shiftValuePos,
|
||||||
bold,
|
bold,
|
||||||
|
number_format,
|
||||||
}) => {
|
}) => {
|
||||||
const kValue = kFormatter(value);
|
const kValue =
|
||||||
|
number_format.toLowerCase() === "long" ? value : kFormatter(value);
|
||||||
const staggerDelay = (index + 3) * 150;
|
const staggerDelay = (index + 3) * 150;
|
||||||
|
|
||||||
const labelOffset = showIcons ? `x="25"` : "";
|
const labelOffset = showIcons ? `x="25"` : "";
|
||||||
@@ -103,8 +105,10 @@ const renderStatsCard = (stats = {}, options = { hide: [] }) => {
|
|||||||
custom_title,
|
custom_title,
|
||||||
border_radius,
|
border_radius,
|
||||||
border_color,
|
border_color,
|
||||||
|
number_format = "short",
|
||||||
locale,
|
locale,
|
||||||
disable_animations = false,
|
disable_animations = false,
|
||||||
|
rank_icon = "default",
|
||||||
} = options;
|
} = options;
|
||||||
|
|
||||||
const lheight = parseInt(String(line_height), 10);
|
const lheight = parseInt(String(line_height), 10);
|
||||||
@@ -179,7 +183,7 @@ const renderStatsCard = (stats = {}, options = { hide: [] }) => {
|
|||||||
"nl",
|
"nl",
|
||||||
"zh-tw",
|
"zh-tw",
|
||||||
];
|
];
|
||||||
const isLongLocale = longLocales.includes(locale) === true;
|
const isLongLocale = longLocales.includes(locale);
|
||||||
|
|
||||||
// filter out hidden stats defined by user & create the text nodes
|
// filter out hidden stats defined by user & create the text nodes
|
||||||
const statItems = Object.keys(STATS)
|
const statItems = Object.keys(STATS)
|
||||||
@@ -192,6 +196,7 @@ const renderStatsCard = (stats = {}, options = { hide: [] }) => {
|
|||||||
showIcons: show_icons,
|
showIcons: show_icons,
|
||||||
shiftValuePos: 79.01 + (isLongLocale ? 50 : 0),
|
shiftValuePos: 79.01 + (isLongLocale ? 50 : 0),
|
||||||
bold: text_bold,
|
bold: text_bold,
|
||||||
|
number_format,
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -290,15 +295,7 @@ const renderStatsCard = (stats = {}, options = { hide: [] }) => {
|
|||||||
<circle class="rank-circle-rim" cx="-10" cy="8" r="40" />
|
<circle class="rank-circle-rim" cx="-10" cy="8" r="40" />
|
||||||
<circle class="rank-circle" cx="-10" cy="8" r="40" />
|
<circle class="rank-circle" cx="-10" cy="8" r="40" />
|
||||||
<g class="rank-text">
|
<g class="rank-text">
|
||||||
<text
|
${rankIcon(rank_icon, rank?.level)}
|
||||||
x="-5"
|
|
||||||
y="3"
|
|
||||||
alignment-baseline="central"
|
|
||||||
dominant-baseline="central"
|
|
||||||
text-anchor="middle"
|
|
||||||
>
|
|
||||||
${rank.level}
|
|
||||||
</text>
|
|
||||||
</g>
|
</g>
|
||||||
</g>`;
|
</g>`;
|
||||||
|
|
||||||
|
|||||||
@@ -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 = 230;
|
const MIN_CARD_WIDTH = 280;
|
||||||
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,7 +317,6 @@ 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);
|
||||||
|
|
||||||
|
|||||||
Vendored
+5
@@ -1,4 +1,5 @@
|
|||||||
type ThemeNames = keyof typeof import("../../themes/index.js");
|
type ThemeNames = keyof typeof import("../../themes/index.js");
|
||||||
|
type RankIcon = "default" | "github";
|
||||||
|
|
||||||
export type CommonOptions = {
|
export type CommonOptions = {
|
||||||
title_color: string;
|
title_color: string;
|
||||||
@@ -22,6 +23,10 @@ export type StatCardOptions = CommonOptions & {
|
|||||||
line_height: number | string;
|
line_height: number | string;
|
||||||
custom_title: string;
|
custom_title: string;
|
||||||
disable_animations: boolean;
|
disable_animations: boolean;
|
||||||
|
number_format: string;
|
||||||
|
ring_color: string;
|
||||||
|
text_bold: boolean;
|
||||||
|
rank_icon: RankIcon;
|
||||||
};
|
};
|
||||||
|
|
||||||
export type RepoCardOptions = CommonOptions & {
|
export type RepoCardOptions = CommonOptions & {
|
||||||
|
|||||||
@@ -118,6 +118,7 @@ const createTextNode = ({
|
|||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
name: label,
|
name: label,
|
||||||
progressBarBackgroundColor,
|
progressBarBackgroundColor,
|
||||||
|
delay: staggerDelay + 300,
|
||||||
});
|
});
|
||||||
|
|
||||||
return `
|
return `
|
||||||
@@ -276,11 +277,12 @@ const renderWakatimeCard = (stats = {}, options = { hide: [] }) => {
|
|||||||
} else {
|
} else {
|
||||||
finalLayout = flexLayout({
|
finalLayout = flexLayout({
|
||||||
items: filteredLanguages.length
|
items: filteredLanguages.length
|
||||||
? filteredLanguages.map((language) => {
|
? filteredLanguages.map((language, index) => {
|
||||||
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,
|
||||||
@@ -321,7 +323,29 @@ 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;
|
||||||
|
}
|
||||||
`,
|
`,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
+24
-1
@@ -8,5 +8,28 @@ const icons = {
|
|||||||
fork: `<path fill-rule="evenodd" d="M5 3.25a.75.75 0 11-1.5 0 .75.75 0 011.5 0zm0 2.122a2.25 2.25 0 10-1.5 0v.878A2.25 2.25 0 005.75 8.5h1.5v2.128a2.251 2.251 0 101.5 0V8.5h1.5a2.25 2.25 0 002.25-2.25v-.878a2.25 2.25 0 10-1.5 0v.878a.75.75 0 01-.75.75h-4.5A.75.75 0 015 6.25v-.878zm3.75 7.378a.75.75 0 11-1.5 0 .75.75 0 011.5 0zm3-8.75a.75.75 0 100-1.5.75.75 0 000 1.5z"></path>`,
|
fork: `<path fill-rule="evenodd" d="M5 3.25a.75.75 0 11-1.5 0 .75.75 0 011.5 0zm0 2.122a2.25 2.25 0 10-1.5 0v.878A2.25 2.25 0 005.75 8.5h1.5v2.128a2.251 2.251 0 101.5 0V8.5h1.5a2.25 2.25 0 002.25-2.25v-.878a2.25 2.25 0 10-1.5 0v.878a.75.75 0 01-.75.75h-4.5A.75.75 0 015 6.25v-.878zm3.75 7.378a.75.75 0 11-1.5 0 .75.75 0 011.5 0zm3-8.75a.75.75 0 100-1.5.75.75 0 000 1.5z"></path>`,
|
||||||
};
|
};
|
||||||
|
|
||||||
export { icons };
|
/**
|
||||||
|
* Get rank icon
|
||||||
|
*
|
||||||
|
* @returns {string} - The SVG code of the rank icon
|
||||||
|
*/
|
||||||
|
const rankIcon = (rankIcon, rankLevel) => {
|
||||||
|
switch (rankIcon) {
|
||||||
|
case "github":
|
||||||
|
return `
|
||||||
|
<svg x="-38" y="-30" height="66" width="66" aria-hidden="true" viewBox="0 0 16 16" version="1.1" data-view-component="true" data-testid="github-rank-icon">
|
||||||
|
<path d="M8 0c4.42 0 8 3.58 8 8a8.013 8.013 0 0 1-5.45 7.59c-.4.08-.55-.17-.55-.38 0-.27.01-1.13.01-2.2 0-.75-.25-1.23-.54-1.48 1.78-.2 3.65-.88 3.65-3.95 0-.88-.31-1.59-.82-2.15.08-.2.36-1.02-.08-2.12 0 0-.67-.22-2.2.82-.64-.18-1.32-.27-2-.27-.68 0-1.36.09-2 .27-1.53-1.03-2.2-.82-2.2-.82-.44 1.1-.16 1.92-.08 2.12-.51.56-.82 1.28-.82 2.15 0 3.06 1.86 3.75 3.64 3.95-.23.2-.44.55-.51 1.07-.46.21-1.61.55-2.33-.66-.15-.24-.6-.83-1.23-.82-.67.01-.27.38.01.53.34.19.73.9.82 1.13.16.45.68 1.31 2.69.94 0 .67.01 1.3.01 1.49 0 .21-.15.45-.55.38A7.995 7.995 0 0 1 0 8c0-4.42 3.58-8 8-8Z"></path>
|
||||||
|
</svg>
|
||||||
|
`;
|
||||||
|
case "default":
|
||||||
|
default:
|
||||||
|
return `
|
||||||
|
<text x="-5" y="3" alignment-baseline="central" dominant-baseline="central" text-anchor="middle" data-testid="level-rank-icon">
|
||||||
|
${rankLevel}
|
||||||
|
</text>
|
||||||
|
`;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
export { icons, rankIcon };
|
||||||
export default icons;
|
export default icons;
|
||||||
|
|||||||
@@ -79,6 +79,7 @@
|
|||||||
"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",
|
||||||
@@ -116,6 +117,7 @@
|
|||||||
"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",
|
||||||
@@ -131,6 +133,7 @@
|
|||||||
"Elixir": "#6e4a7e",
|
"Elixir": "#6e4a7e",
|
||||||
"Elm": "#60B5CC",
|
"Elm": "#60B5CC",
|
||||||
"Elvish": "#55BB55",
|
"Elvish": "#55BB55",
|
||||||
|
"Elvish Transcript": "#55BB55",
|
||||||
"Emacs Lisp": "#c065db",
|
"Emacs Lisp": "#c065db",
|
||||||
"EmberScript": "#FFF4F3",
|
"EmberScript": "#FFF4F3",
|
||||||
"Erlang": "#B83998",
|
"Erlang": "#B83998",
|
||||||
@@ -149,7 +152,7 @@
|
|||||||
"Forth": "#341708",
|
"Forth": "#341708",
|
||||||
"Fortran": "#4d41b1",
|
"Fortran": "#4d41b1",
|
||||||
"Fortran Free Form": "#4d41b1",
|
"Fortran Free Form": "#4d41b1",
|
||||||
"FreeBasic": "#867db1",
|
"FreeBasic": "#141AC9",
|
||||||
"FreeMarker": "#0050b2",
|
"FreeMarker": "#0050b2",
|
||||||
"Frege": "#00cafe",
|
"Frege": "#00cafe",
|
||||||
"Futhark": "#5f021f",
|
"Futhark": "#5f021f",
|
||||||
@@ -182,6 +185,7 @@
|
|||||||
"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",
|
||||||
@@ -192,6 +196,7 @@
|
|||||||
"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",
|
||||||
@@ -225,6 +230,7 @@
|
|||||||
"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",
|
||||||
@@ -247,9 +253,11 @@
|
|||||||
"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",
|
||||||
@@ -362,6 +370,7 @@
|
|||||||
"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",
|
||||||
@@ -379,6 +388,7 @@
|
|||||||
"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",
|
||||||
@@ -444,6 +454,7 @@
|
|||||||
"Smalltalk": "#596706",
|
"Smalltalk": "#596706",
|
||||||
"Smarty": "#f0c040",
|
"Smarty": "#f0c040",
|
||||||
"Smithy": "#c44536",
|
"Smithy": "#c44536",
|
||||||
|
"Snakemake": "#419179",
|
||||||
"Solidity": "#AA6746",
|
"Solidity": "#AA6746",
|
||||||
"SourcePawn": "#f69e1d",
|
"SourcePawn": "#f69e1d",
|
||||||
"Squirrel": "#800000",
|
"Squirrel": "#800000",
|
||||||
@@ -457,6 +468,7 @@
|
|||||||
"SugarSS": "#2fcc9f",
|
"SugarSS": "#2fcc9f",
|
||||||
"SuperCollider": "#46390b",
|
"SuperCollider": "#46390b",
|
||||||
"Svelte": "#ff3e00",
|
"Svelte": "#ff3e00",
|
||||||
|
"Sway": "#dea584",
|
||||||
"Swift": "#F05138",
|
"Swift": "#F05138",
|
||||||
"SystemVerilog": "#DAE1C2",
|
"SystemVerilog": "#DAE1C2",
|
||||||
"TI Program": "#A0AA87",
|
"TI Program": "#A0AA87",
|
||||||
@@ -531,7 +543,6 @@
|
|||||||
"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",
|
||||||
|
|||||||
+1
-1
@@ -392,7 +392,7 @@ const lowercaseTrim = (name) => name.toLowerCase().trim();
|
|||||||
/**
|
/**
|
||||||
* Split array of languages in two columns.
|
* Split array of languages in two columns.
|
||||||
*
|
*
|
||||||
* @template T Langauge object.
|
* @template T Language object.
|
||||||
* @param {Array<T>} arr Array of languages.
|
* @param {Array<T>} arr Array of languages.
|
||||||
* @param {number} perChunk Number of languages per column.
|
* @param {number} perChunk Number of languages per column.
|
||||||
* @returns {Array<T>} Array of languages split in two columns.
|
* @returns {Array<T>} Array of languages split in two columns.
|
||||||
|
|||||||
@@ -213,7 +213,7 @@ const fetchStats = async (
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
throw new CustomError(
|
throw new CustomError(
|
||||||
"Something went while trying to retrieve the stats data using the GraphQL API.",
|
"Something went wrong while trying to retrieve the stats data using the GraphQL API.",
|
||||||
CustomError.GRAPHQL_ERROR,
|
CustomError.GRAPHQL_ERROR,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -259,7 +259,6 @@ const fetchStats = async (
|
|||||||
return prev + curr.stargazers.totalCount;
|
return prev + curr.stargazers.totalCount;
|
||||||
}, 0);
|
}, 0);
|
||||||
|
|
||||||
// @ts-ignore // TODO: Fix this.
|
|
||||||
stats.rank = calculateRank({
|
stats.rank = calculateRank({
|
||||||
totalCommits: stats.totalCommits,
|
totalCommits: stats.totalCommits,
|
||||||
totalRepos: user.repositories.totalCount,
|
totalRepos: user.repositories.totalCount,
|
||||||
|
|||||||
@@ -54,7 +54,12 @@ const fetcher = (variables, token) => {
|
|||||||
* @param {string[]} exclude_repo List of repositories to exclude.
|
* @param {string[]} exclude_repo List of repositories to exclude.
|
||||||
* @returns {Promise<import("./types").TopLangData>} Top languages data.
|
* @returns {Promise<import("./types").TopLangData>} Top languages data.
|
||||||
*/
|
*/
|
||||||
const fetchTopLanguages = async (username, exclude_repo = []) => {
|
const fetchTopLanguages = async (
|
||||||
|
username,
|
||||||
|
exclude_repo = [],
|
||||||
|
size_weight = 1,
|
||||||
|
count_weight = 0,
|
||||||
|
) => {
|
||||||
if (!username) throw new MissingParamError(["username"]);
|
if (!username) throw new MissingParamError(["username"]);
|
||||||
|
|
||||||
const res = await retryer(fetcher, { login: username });
|
const res = await retryer(fetcher, { login: username });
|
||||||
@@ -101,6 +106,8 @@ const fetchTopLanguages = async (username, exclude_repo = []) => {
|
|||||||
.sort((a, b) => b.size - a.size)
|
.sort((a, b) => b.size - a.size)
|
||||||
.filter((name) => !repoToHide[name.name]);
|
.filter((name) => !repoToHide[name.name]);
|
||||||
|
|
||||||
|
let repoCount = 0;
|
||||||
|
|
||||||
repoNodes = repoNodes
|
repoNodes = repoNodes
|
||||||
.filter((node) => node.languages.edges.length > 0)
|
.filter((node) => node.languages.edges.length > 0)
|
||||||
// flatten the list of language nodes
|
// flatten the list of language nodes
|
||||||
@@ -111,9 +118,14 @@ const fetchTopLanguages = async (username, exclude_repo = []) => {
|
|||||||
|
|
||||||
// if we already have the language in the accumulator
|
// if we already have the language in the accumulator
|
||||||
// & the current language name is same as previous name
|
// & the current language name is same as previous name
|
||||||
// add the size to the language size.
|
// add the size to the language size and increase repoCount.
|
||||||
if (acc[prev.node.name] && prev.node.name === acc[prev.node.name].name) {
|
if (acc[prev.node.name] && prev.node.name === acc[prev.node.name].name) {
|
||||||
langSize = prev.size + acc[prev.node.name].size;
|
langSize = prev.size + acc[prev.node.name].size;
|
||||||
|
repoCount += 1;
|
||||||
|
} else {
|
||||||
|
// reset repoCount to 1
|
||||||
|
// language must exist in at least one repo to be detected
|
||||||
|
repoCount = 1;
|
||||||
}
|
}
|
||||||
return {
|
return {
|
||||||
...acc,
|
...acc,
|
||||||
@@ -121,10 +133,18 @@ const fetchTopLanguages = async (username, exclude_repo = []) => {
|
|||||||
name: prev.node.name,
|
name: prev.node.name,
|
||||||
color: prev.node.color,
|
color: prev.node.color,
|
||||||
size: langSize,
|
size: langSize,
|
||||||
|
count: repoCount,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
}, {});
|
}, {});
|
||||||
|
|
||||||
|
Object.keys(repoNodes).forEach((name) => {
|
||||||
|
// comparison index calculation
|
||||||
|
repoNodes[name].size =
|
||||||
|
Math.pow(repoNodes[name].size, size_weight) *
|
||||||
|
Math.pow(repoNodes[name].count, count_weight);
|
||||||
|
});
|
||||||
|
|
||||||
const topLangs = Object.keys(repoNodes)
|
const topLangs = Object.keys(repoNodes)
|
||||||
.sort((a, b) => repoNodes[b].size - repoNodes[a].size)
|
.sort((a, b) => repoNodes[b].size - repoNodes[a].size)
|
||||||
.reduce((result, key) => {
|
.reduce((result, key) => {
|
||||||
|
|||||||
@@ -69,7 +69,29 @@ 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;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -227,7 +249,29 @@ 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: 1,
|
totalPRs: 2,
|
||||||
totalCommits: 7,
|
totalCommits: 8,
|
||||||
totalIssues: 1,
|
totalIssues: 1,
|
||||||
totalStars: 1,
|
totalStars: 1,
|
||||||
contributedTo: 1,
|
contributedTo: 1,
|
||||||
rank: {
|
rank: {
|
||||||
level: "A+",
|
level: "A+",
|
||||||
score: 50.893750297869225,
|
score: 50.88831151384285,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -60,20 +60,22 @@ const error = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
describe("FetchTopLanguages", () => {
|
describe("FetchTopLanguages", () => {
|
||||||
it("should fetch correct language data", async () => {
|
it("should fetch correct language data while using the new calculation", async () => {
|
||||||
mock.onPost("https://api.github.com/graphql").reply(200, data_langs);
|
mock.onPost("https://api.github.com/graphql").reply(200, data_langs);
|
||||||
|
|
||||||
let repo = await fetchTopLanguages("anuraghazra");
|
let repo = await fetchTopLanguages("anuraghazra", [], 0.5, 0.5);
|
||||||
expect(repo).toStrictEqual({
|
expect(repo).toStrictEqual({
|
||||||
HTML: {
|
HTML: {
|
||||||
color: "#0f0",
|
color: "#0f0",
|
||||||
|
count: 2,
|
||||||
name: "HTML",
|
name: "HTML",
|
||||||
size: 200,
|
size: 20.000000000000004,
|
||||||
},
|
},
|
||||||
javascript: {
|
javascript: {
|
||||||
color: "#0ff",
|
color: "#0ff",
|
||||||
|
count: 2,
|
||||||
name: "javascript",
|
name: "javascript",
|
||||||
size: 200,
|
size: 20.000000000000004,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@@ -85,17 +87,59 @@ describe("FetchTopLanguages", () => {
|
|||||||
expect(repo).toStrictEqual({
|
expect(repo).toStrictEqual({
|
||||||
HTML: {
|
HTML: {
|
||||||
color: "#0f0",
|
color: "#0f0",
|
||||||
|
count: 1,
|
||||||
name: "HTML",
|
name: "HTML",
|
||||||
size: 100,
|
size: 100,
|
||||||
},
|
},
|
||||||
javascript: {
|
javascript: {
|
||||||
color: "#0ff",
|
color: "#0ff",
|
||||||
|
count: 2,
|
||||||
name: "javascript",
|
name: "javascript",
|
||||||
size: 200,
|
size: 200,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it("should fetch correct language data while using the old calculation", async () => {
|
||||||
|
mock.onPost("https://api.github.com/graphql").reply(200, data_langs);
|
||||||
|
|
||||||
|
let repo = await fetchTopLanguages("anuraghazra", [], 1, 0);
|
||||||
|
expect(repo).toStrictEqual({
|
||||||
|
HTML: {
|
||||||
|
color: "#0f0",
|
||||||
|
count: 2,
|
||||||
|
name: "HTML",
|
||||||
|
size: 200,
|
||||||
|
},
|
||||||
|
javascript: {
|
||||||
|
color: "#0ff",
|
||||||
|
count: 2,
|
||||||
|
name: "javascript",
|
||||||
|
size: 200,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
it("should rank languages by the number of repositories they appear in", async () => {
|
||||||
|
mock.onPost("https://api.github.com/graphql").reply(200, data_langs);
|
||||||
|
|
||||||
|
let repo = await fetchTopLanguages("anuraghazra", [], 0, 1);
|
||||||
|
expect(repo).toStrictEqual({
|
||||||
|
HTML: {
|
||||||
|
color: "#0f0",
|
||||||
|
count: 2,
|
||||||
|
name: "HTML",
|
||||||
|
size: 2,
|
||||||
|
},
|
||||||
|
javascript: {
|
||||||
|
color: "#0ff",
|
||||||
|
count: 2,
|
||||||
|
name: "javascript",
|
||||||
|
size: 2,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
it("should throw error", async () => {
|
it("should throw error", async () => {
|
||||||
mock.onPost("https://api.github.com/graphql").reply(200, error);
|
mock.onPost("https://api.github.com/graphql").reply(200, error);
|
||||||
|
|
||||||
|
|||||||
@@ -357,4 +357,30 @@ describe("Test renderStatsCard", () => {
|
|||||||
document.body.innerHTML = renderStatsCard(stats, {});
|
document.body.innerHTML = renderStatsCard(stats, {});
|
||||||
expect(document.querySelector("rect")).toHaveAttribute("rx", "4.5");
|
expect(document.querySelector("rect")).toHaveAttribute("rx", "4.5");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it("should shorten values", () => {
|
||||||
|
stats["totalCommits"] = 1999;
|
||||||
|
|
||||||
|
document.body.innerHTML = renderStatsCard(stats);
|
||||||
|
expect(getByTestId(document.body, "commits").textContent).toBe("2k");
|
||||||
|
document.body.innerHTML = renderStatsCard(stats, { number_format: "long" });
|
||||||
|
expect(getByTestId(document.body, "commits").textContent).toBe("1999");
|
||||||
|
});
|
||||||
|
|
||||||
|
it("should render default rank icon with level A+", () => {
|
||||||
|
document.body.innerHTML = renderStatsCard(stats, {
|
||||||
|
rank_icon: "default",
|
||||||
|
});
|
||||||
|
expect(queryByTestId(document.body, "level-rank-icon")).toBeDefined();
|
||||||
|
expect(
|
||||||
|
queryByTestId(document.body, "level-rank-icon").textContent.trim(),
|
||||||
|
).toBe("A+");
|
||||||
|
});
|
||||||
|
|
||||||
|
it("should render github rank icon", () => {
|
||||||
|
document.body.innerHTML = renderStatsCard(stats, {
|
||||||
|
rank_icon: "github",
|
||||||
|
});
|
||||||
|
expect(queryByTestId(document.body, "github-rank-icon")).toBeDefined();
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -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",
|
||||||
"120",
|
"100",
|
||||||
);
|
);
|
||||||
|
|
||||||
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",
|
||||||
"120",
|
"100",
|
||||||
);
|
);
|
||||||
|
|
||||||
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",
|
||||||
"60",
|
"50",
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ describe("Test Render Wakatime Card", () => {
|
|||||||
expect(document.querySelector("rect")).toHaveAttribute("rx", "4.5");
|
expect(document.querySelector("rect")).toHaveAttribute("rx", "4.5");
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should show "no coding activitiy this week" message when there hasn not been activity', () => {
|
it('should show "no coding activity this week" message when there has not been activity', () => {
|
||||||
document.body.innerHTML = renderWakatimeCard(
|
document.body.innerHTML = renderWakatimeCard(
|
||||||
{
|
{
|
||||||
...wakaTimeData.data,
|
...wakaTimeData.data,
|
||||||
|
|||||||
+8
-6
@@ -32,10 +32,11 @@ Use `?theme=THEME_NAME` parameter like so :-
|
|||||||
| `jolly` ![jolly][jolly] | `maroongold` ![maroongold][maroongold] | `yeblu` ![yeblu][yeblu] |
|
| `jolly` ![jolly][jolly] | `maroongold` ![maroongold][maroongold] | `yeblu` ![yeblu][yeblu] |
|
||||||
| `blueberry` ![blueberry][blueberry] | `slateorange` ![slateorange][slateorange] | `kacho_ga` ![kacho_ga][kacho_ga] |
|
| `blueberry` ![blueberry][blueberry] | `slateorange` ![slateorange][slateorange] | `kacho_ga` ![kacho_ga][kacho_ga] |
|
||||||
| `outrun` ![outrun][outrun] | `ocean_dark` ![ocean_dark][ocean_dark] | `city_lights` ![city_lights][city_lights] |
|
| `outrun` ![outrun][outrun] | `ocean_dark` ![ocean_dark][ocean_dark] | `city_lights` ![city_lights][city_lights] |
|
||||||
| `github_dark` ![github_dark][github_dark] | `discord_old_blurple` ![discord_old_blurple][discord_old_blurple] | `aura_dark` ![aura_dark][aura_dark] |
|
| `github_dark` ![github_dark][github_dark] | `github_dark_dimmed` ![github_dark_dimmed][github_dark_dimmed] | `discord_old_blurple` ![discord_old_blurple][discord_old_blurple] |
|
||||||
| `panda` ![panda][panda] | `noctis_minimus` ![noctis_minimus][noctis_minimus] | `cobalt2` ![cobalt2][cobalt2] |
|
| `panda` ![panda][panda] | `noctis_minimus` ![noctis_minimus][noctis_minimus] | `cobalt2` ![cobalt2][cobalt2] |
|
||||||
| `swift` ![swift][swift] | `aura` ![aura][aura] | `apprentice` ![apprentice][apprentice] |
|
| `swift` ![swift][swift] | `aura` ![aura][aura] | `apprentice` ![apprentice][apprentice] |
|
||||||
| `moltack` ![moltack][moltack] | `codeSTACKr` ![codeSTACKr][codeSTACKr] | `rose_pine` ![rose_pine][rose_pine] |
|
| `moltack` ![moltack][moltack] | `codeSTACKr` ![codeSTACKr][codeSTACKr] | `rose_pine` ![rose_pine][rose_pine] |
|
||||||
|
| `aura_dark` ![aura_dark][aura_dark] | | |
|
||||||
| [Add your theme][add-theme] | | |
|
| [Add your theme][add-theme] | | |
|
||||||
|
|
||||||
## Repo Card
|
## Repo Card
|
||||||
@@ -60,10 +61,11 @@ Use `?theme=THEME_NAME` parameter like so :-
|
|||||||
| `jolly` ![jolly][jolly_repo] | `maroongold` ![maroongold][maroongold_repo] | `yeblu` ![yeblu][yeblu_repo] |
|
| `jolly` ![jolly][jolly_repo] | `maroongold` ![maroongold][maroongold_repo] | `yeblu` ![yeblu][yeblu_repo] |
|
||||||
| `blueberry` ![blueberry][blueberry_repo] | `slateorange` ![slateorange][slateorange_repo] | `kacho_ga` ![kacho_ga][kacho_ga_repo] |
|
| `blueberry` ![blueberry][blueberry_repo] | `slateorange` ![slateorange][slateorange_repo] | `kacho_ga` ![kacho_ga][kacho_ga_repo] |
|
||||||
| `outrun` ![outrun][outrun_repo] | `ocean_dark` ![ocean_dark][ocean_dark_repo] | `city_lights` ![city_lights][city_lights_repo] |
|
| `outrun` ![outrun][outrun_repo] | `ocean_dark` ![ocean_dark][ocean_dark_repo] | `city_lights` ![city_lights][city_lights_repo] |
|
||||||
| `github_dark` ![github_dark][github_dark_repo] | `discord_old_blurple` ![discord_old_blurple][discord_old_blurple_repo] | `aura_dark` ![aura_dark][aura_dark_repo] |
|
| `github_dark` ![github_dark][github_dark_repo] | `github_dark_dimmed` ![github_dark_dimmed][github_dark_dimmed_repo] | `discord_old_blurple` ![discord_old_blurple][discord_old_blurple_repo] |
|
||||||
| `panda` ![panda][panda_repo] | `noctis_minimus` ![noctis_minimus][noctis_minimus_repo] | `cobalt2` ![cobalt2][cobalt2_repo] |
|
| `panda` ![panda][panda_repo] | `noctis_minimus` ![noctis_minimus][noctis_minimus_repo] | `cobalt2` ![cobalt2][cobalt2_repo] |
|
||||||
| `swift` ![swift][swift_repo] | `aura` ![aura][aura_repo] | `apprentice` ![apprentice][apprentice_repo] |
|
| `swift` ![swift][swift_repo] | `aura` ![aura][aura_repo] | `apprentice` ![apprentice][apprentice_repo] |
|
||||||
| `moltack` ![moltack][moltack_repo] | `codeSTACKr` ![codeSTACKr][codeSTACKr_repo] | `rose_pine` ![rose_pine][rose_pine_repo] |
|
| `moltack` ![moltack][moltack_repo] | `codeSTACKr` ![codeSTACKr][codeSTACKr_repo] | `rose_pine` ![rose_pine][rose_pine_repo] |
|
||||||
|
| `aura_dark` ![aura_dark][aura_dark_repo] | | |
|
||||||
| [Add your theme][add-theme] | | |
|
| [Add your theme][add-theme] | | |
|
||||||
|
|
||||||
|
|
||||||
@@ -117,8 +119,8 @@ Use `?theme=THEME_NAME` parameter like so :-
|
|||||||
[ocean_dark]: https://github-readme-stats.vercel.app/api?username=anuraghazra&show_icons=true&hide=contribs,prs&cache_seconds=86400&theme=ocean_dark
|
[ocean_dark]: https://github-readme-stats.vercel.app/api?username=anuraghazra&show_icons=true&hide=contribs,prs&cache_seconds=86400&theme=ocean_dark
|
||||||
[city_lights]: https://github-readme-stats.vercel.app/api?username=anuraghazra&show_icons=true&hide=contribs,prs&cache_seconds=86400&theme=city_lights
|
[city_lights]: https://github-readme-stats.vercel.app/api?username=anuraghazra&show_icons=true&hide=contribs,prs&cache_seconds=86400&theme=city_lights
|
||||||
[github_dark]: https://github-readme-stats.vercel.app/api?username=anuraghazra&show_icons=true&hide=contribs,prs&cache_seconds=86400&theme=github_dark
|
[github_dark]: https://github-readme-stats.vercel.app/api?username=anuraghazra&show_icons=true&hide=contribs,prs&cache_seconds=86400&theme=github_dark
|
||||||
|
[github_dark_dimmed]: https://github-readme-stats.vercel.app/api?username=anuraghazra&show_icons=true&hide=contribs,prs&cache_seconds=86400&theme=github_dark_dimmed
|
||||||
[discord_old_blurple]: https://github-readme-stats.vercel.app/api?username=anuraghazra&show_icons=true&hide=contribs,prs&cache_seconds=86400&theme=discord_old_blurple
|
[discord_old_blurple]: https://github-readme-stats.vercel.app/api?username=anuraghazra&show_icons=true&hide=contribs,prs&cache_seconds=86400&theme=discord_old_blurple
|
||||||
[aura_dark]: https://github-readme-stats.vercel.app/api?username=anuraghazra&show_icons=true&hide=contribs,prs&cache_seconds=86400&theme=aura_dark
|
|
||||||
[panda]: https://github-readme-stats.vercel.app/api?username=anuraghazra&show_icons=true&hide=contribs,prs&cache_seconds=86400&theme=panda
|
[panda]: https://github-readme-stats.vercel.app/api?username=anuraghazra&show_icons=true&hide=contribs,prs&cache_seconds=86400&theme=panda
|
||||||
[noctis_minimus]: https://github-readme-stats.vercel.app/api?username=anuraghazra&show_icons=true&hide=contribs,prs&cache_seconds=86400&theme=noctis_minimus
|
[noctis_minimus]: https://github-readme-stats.vercel.app/api?username=anuraghazra&show_icons=true&hide=contribs,prs&cache_seconds=86400&theme=noctis_minimus
|
||||||
[cobalt2]: https://github-readme-stats.vercel.app/api?username=anuraghazra&show_icons=true&hide=contribs,prs&cache_seconds=86400&theme=cobalt2
|
[cobalt2]: https://github-readme-stats.vercel.app/api?username=anuraghazra&show_icons=true&hide=contribs,prs&cache_seconds=86400&theme=cobalt2
|
||||||
@@ -128,7 +130,7 @@ Use `?theme=THEME_NAME` parameter like so :-
|
|||||||
[moltack]: https://github-readme-stats.vercel.app/api?username=anuraghazra&show_icons=true&hide=contribs,prs&cache_seconds=86400&theme=moltack
|
[moltack]: https://github-readme-stats.vercel.app/api?username=anuraghazra&show_icons=true&hide=contribs,prs&cache_seconds=86400&theme=moltack
|
||||||
[codeSTACKr]: https://github-readme-stats.vercel.app/api?username=anuraghazra&show_icons=true&hide=contribs,prs&cache_seconds=86400&theme=codeSTACKr
|
[codeSTACKr]: https://github-readme-stats.vercel.app/api?username=anuraghazra&show_icons=true&hide=contribs,prs&cache_seconds=86400&theme=codeSTACKr
|
||||||
[rose_pine]: https://github-readme-stats.vercel.app/api?username=anuraghazra&show_icons=true&hide=contribs,prs&cache_seconds=86400&theme=rose_pine
|
[rose_pine]: https://github-readme-stats.vercel.app/api?username=anuraghazra&show_icons=true&hide=contribs,prs&cache_seconds=86400&theme=rose_pine
|
||||||
|
[aura_dark]: https://github-readme-stats.vercel.app/api?username=anuraghazra&show_icons=true&hide=contribs,prs&cache_seconds=86400&theme=aura_dark
|
||||||
|
|
||||||
[default_repo]: https://github-readme-stats.vercel.app/api/pin/?username=anuraghazra&repo=github-readme-stats&cache_seconds=86400&theme=default
|
[default_repo]: https://github-readme-stats.vercel.app/api/pin/?username=anuraghazra&repo=github-readme-stats&cache_seconds=86400&theme=default
|
||||||
[default_repocard_repo]: https://github-readme-stats.vercel.app/api/pin/?username=anuraghazra&repo=github-readme-stats&cache_seconds=86400&theme=default_repocard
|
[default_repocard_repo]: https://github-readme-stats.vercel.app/api/pin/?username=anuraghazra&repo=github-readme-stats&cache_seconds=86400&theme=default_repocard
|
||||||
@@ -180,8 +182,8 @@ Use `?theme=THEME_NAME` parameter like so :-
|
|||||||
[ocean_dark_repo]: https://github-readme-stats.vercel.app/api/pin/?username=anuraghazra&repo=github-readme-stats&cache_seconds=86400&theme=ocean_dark
|
[ocean_dark_repo]: https://github-readme-stats.vercel.app/api/pin/?username=anuraghazra&repo=github-readme-stats&cache_seconds=86400&theme=ocean_dark
|
||||||
[city_lights_repo]: https://github-readme-stats.vercel.app/api/pin/?username=anuraghazra&repo=github-readme-stats&cache_seconds=86400&theme=city_lights
|
[city_lights_repo]: https://github-readme-stats.vercel.app/api/pin/?username=anuraghazra&repo=github-readme-stats&cache_seconds=86400&theme=city_lights
|
||||||
[github_dark_repo]: https://github-readme-stats.vercel.app/api/pin/?username=anuraghazra&repo=github-readme-stats&cache_seconds=86400&theme=github_dark
|
[github_dark_repo]: https://github-readme-stats.vercel.app/api/pin/?username=anuraghazra&repo=github-readme-stats&cache_seconds=86400&theme=github_dark
|
||||||
|
[github_dark_dimmed_repo]: https://github-readme-stats.vercel.app/api/pin/?username=anuraghazra&repo=github-readme-stats&cache_seconds=86400&theme=github_dark_dimmed
|
||||||
[discord_old_blurple_repo]: https://github-readme-stats.vercel.app/api/pin/?username=anuraghazra&repo=github-readme-stats&cache_seconds=86400&theme=discord_old_blurple
|
[discord_old_blurple_repo]: https://github-readme-stats.vercel.app/api/pin/?username=anuraghazra&repo=github-readme-stats&cache_seconds=86400&theme=discord_old_blurple
|
||||||
[aura_dark_repo]: https://github-readme-stats.vercel.app/api/pin/?username=anuraghazra&repo=github-readme-stats&cache_seconds=86400&theme=aura_dark
|
|
||||||
[panda_repo]: https://github-readme-stats.vercel.app/api/pin/?username=anuraghazra&repo=github-readme-stats&cache_seconds=86400&theme=panda
|
[panda_repo]: https://github-readme-stats.vercel.app/api/pin/?username=anuraghazra&repo=github-readme-stats&cache_seconds=86400&theme=panda
|
||||||
[noctis_minimus_repo]: https://github-readme-stats.vercel.app/api/pin/?username=anuraghazra&repo=github-readme-stats&cache_seconds=86400&theme=noctis_minimus
|
[noctis_minimus_repo]: https://github-readme-stats.vercel.app/api/pin/?username=anuraghazra&repo=github-readme-stats&cache_seconds=86400&theme=noctis_minimus
|
||||||
[cobalt2_repo]: https://github-readme-stats.vercel.app/api/pin/?username=anuraghazra&repo=github-readme-stats&cache_seconds=86400&theme=cobalt2
|
[cobalt2_repo]: https://github-readme-stats.vercel.app/api/pin/?username=anuraghazra&repo=github-readme-stats&cache_seconds=86400&theme=cobalt2
|
||||||
@@ -191,7 +193,7 @@ Use `?theme=THEME_NAME` parameter like so :-
|
|||||||
[moltack_repo]: https://github-readme-stats.vercel.app/api/pin/?username=anuraghazra&repo=github-readme-stats&cache_seconds=86400&theme=moltack
|
[moltack_repo]: https://github-readme-stats.vercel.app/api/pin/?username=anuraghazra&repo=github-readme-stats&cache_seconds=86400&theme=moltack
|
||||||
[codeSTACKr_repo]: https://github-readme-stats.vercel.app/api/pin/?username=anuraghazra&repo=github-readme-stats&cache_seconds=86400&theme=codeSTACKr
|
[codeSTACKr_repo]: https://github-readme-stats.vercel.app/api/pin/?username=anuraghazra&repo=github-readme-stats&cache_seconds=86400&theme=codeSTACKr
|
||||||
[rose_pine_repo]: https://github-readme-stats.vercel.app/api/pin/?username=anuraghazra&repo=github-readme-stats&cache_seconds=86400&theme=rose_pine
|
[rose_pine_repo]: https://github-readme-stats.vercel.app/api/pin/?username=anuraghazra&repo=github-readme-stats&cache_seconds=86400&theme=rose_pine
|
||||||
|
[aura_dark_repo]: https://github-readme-stats.vercel.app/api/pin/?username=anuraghazra&repo=github-readme-stats&cache_seconds=86400&theme=aura_dark
|
||||||
|
|
||||||
[add-theme]: https://github.com/anuraghazra/github-readme-stats/edit/master/themes/index.js
|
[add-theme]: https://github.com/anuraghazra/github-readme-stats/edit/master/themes/index.js
|
||||||
|
|
||||||
|
|||||||
@@ -18,6 +18,27 @@ export const themes = {
|
|||||||
text_color: "417E87",
|
text_color: "417E87",
|
||||||
bg_color: "ffffff00",
|
bg_color: "ffffff00",
|
||||||
},
|
},
|
||||||
|
shadow_red: {
|
||||||
|
title_color: "9A0000",
|
||||||
|
text_color: "444",
|
||||||
|
icon_color: "4F0000",
|
||||||
|
border_color: "4F0000",
|
||||||
|
bg_color: "ffffff00",
|
||||||
|
},
|
||||||
|
shadow_green: {
|
||||||
|
title_color: "007A00",
|
||||||
|
text_color: "444",
|
||||||
|
icon_color: "003D00",
|
||||||
|
border_color: "003D00",
|
||||||
|
bg_color: "ffffff00",
|
||||||
|
},
|
||||||
|
shadow_blue: {
|
||||||
|
title_color: "00779A",
|
||||||
|
text_color: "444",
|
||||||
|
icon_color: "004450",
|
||||||
|
border_color: "004490",
|
||||||
|
bg_color: "ffffff00",
|
||||||
|
},
|
||||||
dark: {
|
dark: {
|
||||||
title_color: "fff",
|
title_color: "fff",
|
||||||
icon_color: "79ff97",
|
icon_color: "79ff97",
|
||||||
@@ -300,6 +321,13 @@ export const themes = {
|
|||||||
text_color: "C3D1D9",
|
text_color: "C3D1D9",
|
||||||
bg_color: "0D1117",
|
bg_color: "0D1117",
|
||||||
},
|
},
|
||||||
|
github_dark_dimmed: {
|
||||||
|
title_color: "539bf5",
|
||||||
|
icon_color: "539bf5",
|
||||||
|
text_color: "ADBAC7",
|
||||||
|
bg_color: "24292F",
|
||||||
|
border_color: "373E47",
|
||||||
|
},
|
||||||
discord_old_blurple: {
|
discord_old_blurple: {
|
||||||
title_color: "7289DA",
|
title_color: "7289DA",
|
||||||
icon_color: "7289DA",
|
icon_color: "7289DA",
|
||||||
@@ -374,6 +402,13 @@ 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",
|
||||||
@@ -381,6 +416,13 @@ export const themes = {
|
|||||||
border_color: "e9d8d4",
|
border_color: "e9d8d4",
|
||||||
bg_color: "e9d8d4",
|
bg_color: "e9d8d4",
|
||||||
},
|
},
|
||||||
|
holi: {
|
||||||
|
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