Compare commits

..
Author SHA1 Message Date
rickstaa dca6010ec0 build: add vercel to dev dependencies 2023-05-24 09:34:18 +02:00
3 changed files with 15330 additions and 314 deletions
+15323 -305
View File
File diff suppressed because it is too large Load Diff
+2 -1
View File
@@ -49,7 +49,8 @@
"lint-staged": "^13.0.3",
"lodash.snakecase": "^4.1.1",
"parse-diff": "^0.7.0",
"prettier": "^2.1.2"
"prettier": "^2.1.2",
"vercel": "^29.4.0"
},
"dependencies": {
"axios": "^0.24.0",
+5 -8
View File
@@ -700,16 +700,13 @@ const renderTopLanguages = (topLangs, options = {}) => {
let height = calculateNormalLayoutHeight(langs.length);
let finalLayout = "";
const layoutParsed = Array.isArray(layout)
? layout[0]?.toLocaleLowerCase()
: layout?.toLocaleLowerCase();
if (layoutParsed === "pie") {
if (layout === "pie") {
height = calculatePieLayoutHeight(langs.length);
finalLayout = renderPieLayout(langs, totalLanguageSize);
} else if (layoutParsed === "donut-vertical") {
} else if (layout === "donut-vertical") {
height = calculateDonutVerticalLayoutHeight(langs.length);
finalLayout = renderDonutVerticalLayout(langs, totalLanguageSize);
} else if (layoutParsed === "compact" || hide_progress == true) {
} else if (layout === "compact" || hide_progress == true) {
height =
calculateCompactLayoutHeight(langs.length) + (hide_progress ? -25 : 0);
@@ -719,7 +716,7 @@ const renderTopLanguages = (topLangs, options = {}) => {
totalLanguageSize,
hide_progress,
);
} else if (layoutParsed === "donut") {
} else if (layout?.toLowerCase() === "donut") {
height = calculateDonutLayoutHeight(langs.length);
width = width + 50; // padding
finalLayout = renderDonutLayout(langs, width, totalLanguageSize);
@@ -784,7 +781,7 @@ const renderTopLanguages = (topLangs, options = {}) => {
`,
);
if (layoutParsed === "pie" || layoutParsed === "donut-vertical") {
if (layout === "pie" || layout === "donut-vertical") {
return card.render(finalLayout);
}