feat: added repo card hide border option (#488)
* 🚀 Prettier config * 🚀 hide_border for Repo Card * fix: wrong total commits (#490) * chore: run prettier on all files * chore: lol lets add the trailing commas Co-authored-by: Anurag Hazra <hazru.anurag@gmail.com>
This commit is contained in:
@@ -21,6 +21,7 @@ const renderRepoCard = (repo, options = {}) => {
|
||||
forkCount,
|
||||
} = repo;
|
||||
const {
|
||||
hide_border = false,
|
||||
title_color,
|
||||
icon_color,
|
||||
text_color,
|
||||
@@ -118,7 +119,7 @@ const renderRepoCard = (repo, options = {}) => {
|
||||
});
|
||||
|
||||
card.disableAnimations();
|
||||
card.setHideBorder(false);
|
||||
card.setHideBorder(hide_border);
|
||||
card.setHideTitle(false);
|
||||
card.setCSS(`
|
||||
.description { font: 400 13px 'Segoe UI', Ubuntu, Sans-Serif; fill: ${textColor} }
|
||||
@@ -147,7 +148,7 @@ const renderRepoCard = (repo, options = {}) => {
|
||||
${svgLanguage}
|
||||
|
||||
<g
|
||||
data-testid="star-fork-group"
|
||||
data-testid="star-fork-group"
|
||||
transform="translate(${primaryLanguage ? 155 - shiftText : 25}, 0)"
|
||||
>
|
||||
${starAndForkCount}
|
||||
|
||||
@@ -124,14 +124,14 @@ const renderStatsCard = (stats = {}, options = { hide: [] }) => {
|
||||
index,
|
||||
showIcons: show_icons,
|
||||
shiftValuePos: !include_all_commits,
|
||||
})
|
||||
}),
|
||||
);
|
||||
|
||||
// Calculate the card height depending on how many items there are
|
||||
// but if rank circle is visible clamp the minimum height to `150`
|
||||
let height = Math.max(
|
||||
45 + (statItems.length + 1) * lheight,
|
||||
hide_rank ? 0 : 150
|
||||
hide_rank ? 0 : 150,
|
||||
);
|
||||
|
||||
// Conditionally rendered elements
|
||||
|
||||
@@ -116,7 +116,7 @@ const renderWakatimeCard = (stats = {}, options = { hide: [] }) => {
|
||||
`
|
||||
${cssStyles}
|
||||
.lang-name { font: 400 11px 'Segoe UI', Ubuntu, Sans-Serif; fill: ${textColor} }
|
||||
`
|
||||
`,
|
||||
);
|
||||
|
||||
return card.render(`
|
||||
|
||||
Reference in New Issue
Block a user