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:
Bas950
2020-09-24 21:38:14 +05:30
committed by GitHub
co-authored by Anurag Hazra
parent 3c6c142c75
commit 8aea1e3c35
35 changed files with 152 additions and 134 deletions
+3 -2
View File
@@ -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}
+2 -2
View File
@@ -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
+1 -1
View File
@@ -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(`