repo card: custom card_width

This commit is contained in:
martin-mfg
2025-05-22 17:34:22 +02:00
parent 0b43c8bb76
commit f3bb62bde3
2 changed files with 5 additions and 2 deletions
+3 -2
View File
@@ -78,6 +78,7 @@ const renderRepoCard = (repo, options = {}) => {
icon_color,
text_color,
bg_color,
card_width = 400,
show_owner = false,
show = [],
show_icons = true,
@@ -175,7 +176,7 @@ const renderRepoCard = (repo, options = {}) => {
const desc = parseEmojis(description || "No description provided");
const multiLineDescription = wrapTextMultiline(
desc,
DESCRIPTION_LINE_WIDTH,
Math.round((card_width - 400) / 5.93 + DESCRIPTION_LINE_WIDTH),
descriptionMaxLines,
);
const descriptionLinesCount = description_lines_count
@@ -246,7 +247,7 @@ const renderRepoCard = (repo, options = {}) => {
const card = new Card({
defaultTitle: header.length > 35 ? `${header.slice(0, 35)}...` : header,
titlePrefixIcon: icons.contribs,
width: 400,
width: card_width,
height,
border_radius,
colors,