mirror of
https://github.com/Aviortheking/codestats-readme.git
synced 2025-04-22 10:42:08 +00:00
remove unused code
This commit is contained in:
parent
b0362c4e12
commit
65cdb1877f
@ -45,6 +45,7 @@ const renderRepoCard = (repo, options = {}) => {
|
|||||||
const multiLineDescription = wrapTextMultiline(desc);
|
const multiLineDescription = wrapTextMultiline(desc);
|
||||||
const descriptionLines = multiLineDescription.length;
|
const descriptionLines = multiLineDescription.length;
|
||||||
const lineHeight = 10;
|
const lineHeight = 10;
|
||||||
|
|
||||||
const height =
|
const height =
|
||||||
(descriptionLines > 1 ? 120 : 110) + descriptionLines * lineHeight;
|
(descriptionLines > 1 ? 120 : 110) + descriptionLines * lineHeight;
|
||||||
|
|
||||||
@ -56,7 +57,7 @@ const renderRepoCard = (repo, options = {}) => {
|
|||||||
bg_color,
|
bg_color,
|
||||||
theme,
|
theme,
|
||||||
});
|
});
|
||||||
const isGradient = typeof bgColor == 'object';
|
|
||||||
const totalStars = kFormatter(stargazers.totalCount);
|
const totalStars = kFormatter(stargazers.totalCount);
|
||||||
const totalForks = kFormatter(forkCount);
|
const totalForks = kFormatter(forkCount);
|
||||||
|
|
||||||
@ -74,14 +75,7 @@ const renderRepoCard = (repo, options = {}) => {
|
|||||||
</text>
|
</text>
|
||||||
</g>
|
</g>
|
||||||
`;
|
`;
|
||||||
const gradient = isGradient ? `
|
|
||||||
<defs>
|
|
||||||
<linearGradient id="gradient" gradientTransform="rotate(${bgColor[0]})">
|
|
||||||
<stop offset="0%" stop-color="#${bgColor[1]}" />
|
|
||||||
<stop offset="100%" stop-color="#${bgColor[2]}" />
|
|
||||||
</linearGradient>
|
|
||||||
</defs>`
|
|
||||||
: undefined
|
|
||||||
const svgLanguage = primaryLanguage
|
const svgLanguage = primaryLanguage
|
||||||
? `
|
? `
|
||||||
<g data-testid="primary-lang" transform="translate(30, 0)">
|
<g data-testid="primary-lang" transform="translate(30, 0)">
|
||||||
|
@ -55,7 +55,6 @@ const renderStatsCard = (stats = {}, options = { hide: [] }) => {
|
|||||||
|
|
||||||
const lheight = parseInt(line_height, 10);
|
const lheight = parseInt(line_height, 10);
|
||||||
|
|
||||||
|
|
||||||
// returns theme based colors with proper overrides and defaults
|
// returns theme based colors with proper overrides and defaults
|
||||||
const { titleColor, textColor, iconColor, bgColor } = getCardColors({
|
const { titleColor, textColor, iconColor, bgColor } = getCardColors({
|
||||||
title_color,
|
title_color,
|
||||||
@ -65,7 +64,6 @@ const renderStatsCard = (stats = {}, options = { hide: [] }) => {
|
|||||||
theme,
|
theme,
|
||||||
});
|
});
|
||||||
|
|
||||||
const isGradient = typeof bgColor == 'object';
|
|
||||||
// Meta data for creating text nodes with createTextNode function
|
// Meta data for creating text nodes with createTextNode function
|
||||||
const STATS = {
|
const STATS = {
|
||||||
stars: {
|
stars: {
|
||||||
|
@ -95,6 +95,7 @@ const renderTopLanguages = (topLangs, options = {}) => {
|
|||||||
const totalLanguageSize = langs.reduce((acc, curr) => {
|
const totalLanguageSize = langs.reduce((acc, curr) => {
|
||||||
return acc + curr.size;
|
return acc + curr.size;
|
||||||
}, 0);
|
}, 0);
|
||||||
|
|
||||||
// returns theme based colors with proper overrides and defaults
|
// returns theme based colors with proper overrides and defaults
|
||||||
const { titleColor, textColor, bgColor } = getCardColors({
|
const { titleColor, textColor, bgColor } = getCardColors({
|
||||||
title_color,
|
title_color,
|
||||||
@ -102,7 +103,7 @@ const renderTopLanguages = (topLangs, options = {}) => {
|
|||||||
bg_color,
|
bg_color,
|
||||||
theme,
|
theme,
|
||||||
});
|
});
|
||||||
const isGradient = typeof bgColor == 'object';
|
|
||||||
let width = isNaN(card_width) ? 300 : card_width;
|
let width = isNaN(card_width) ? 300 : card_width;
|
||||||
let height = 45 + (langs.length + 1) * 40;
|
let height = 45 + (langs.length + 1) * 40;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user