move default card_width for wakatime card, add to readme
This commit is contained in:
@@ -623,6 +623,7 @@ You can customize the appearance and behavior of the WakaTime stats card using t
|
||||
| --- | --- | --- | --- |
|
||||
| `hide` | Hides the languages specified from the card. | string (comma-separated values) | `null` |
|
||||
| `hide_title` | Hides the title of your card. | boolean | `false` |
|
||||
| `card_width` | Sets the card's width manually. | number | `495` |
|
||||
| `line_height` | Sets the line height between text. | integer | `25` |
|
||||
| `hide_progress` | Hides the progress bar and percentage. | boolean | `false` |
|
||||
| `custom_title` | Sets a custom title for the card. | string | `WakaTime Stats` |
|
||||
|
||||
@@ -223,10 +223,10 @@ const getStyles = ({
|
||||
*/
|
||||
const renderWakatimeCard = (stats = {}, options = { hide: [] }) => {
|
||||
let { languages = [] } = stats;
|
||||
const {
|
||||
let {
|
||||
hide_title = false,
|
||||
hide_border = false,
|
||||
card_width = 495,
|
||||
card_width,
|
||||
hide,
|
||||
line_height = 25,
|
||||
title_color,
|
||||
@@ -245,6 +245,10 @@ const renderWakatimeCard = (stats = {}, options = { hide: [] }) => {
|
||||
disable_animations,
|
||||
} = options;
|
||||
|
||||
if (isNaN(card_width)) {
|
||||
card_width = 495;
|
||||
}
|
||||
|
||||
const shouldHideLangs = Array.isArray(hide) && hide.length > 0;
|
||||
if (shouldHideLangs) {
|
||||
const languagesToHide = new Set(hide.map((lang) => lowercaseTrim(lang)));
|
||||
@@ -335,7 +339,7 @@ const renderWakatimeCard = (stats = {}, options = { hide: [] }) => {
|
||||
y: 25,
|
||||
langs: filteredLanguages,
|
||||
display_format,
|
||||
card_width: card_width,
|
||||
card_width,
|
||||
}).join("")
|
||||
: noCodingActivityNode({
|
||||
// @ts-ignore
|
||||
|
||||
Reference in New Issue
Block a user