mirror of
https://github.com/tiennm99/github-readme-stats.git
synced 2026-08-21 08:26:24 +00:00
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:
+3
-3
@@ -40,13 +40,13 @@ module.exports = async (req, res) => {
|
||||
stats = await fetchStats(
|
||||
username,
|
||||
parseBoolean(count_private),
|
||||
parseBoolean(include_all_commits)
|
||||
parseBoolean(include_all_commits),
|
||||
);
|
||||
|
||||
const cacheSeconds = clampValue(
|
||||
parseInt(cache_seconds || CONSTANTS.TWO_HOURS, 10),
|
||||
CONSTANTS.TWO_HOURS,
|
||||
CONSTANTS.ONE_DAY
|
||||
CONSTANTS.ONE_DAY,
|
||||
);
|
||||
|
||||
res.setHeader("Cache-Control", `public, max-age=${cacheSeconds}`);
|
||||
@@ -65,7 +65,7 @@ module.exports = async (req, res) => {
|
||||
text_color,
|
||||
bg_color,
|
||||
theme,
|
||||
})
|
||||
}),
|
||||
);
|
||||
} catch (err) {
|
||||
return res.send(renderError(err.message, err.secondaryMessage));
|
||||
|
||||
+4
-2
@@ -13,6 +13,7 @@ module.exports = async (req, res) => {
|
||||
const {
|
||||
username,
|
||||
repo,
|
||||
hide_border,
|
||||
title_color,
|
||||
icon_color,
|
||||
text_color,
|
||||
@@ -36,7 +37,7 @@ module.exports = async (req, res) => {
|
||||
let cacheSeconds = clampValue(
|
||||
parseInt(cache_seconds || CONSTANTS.TWO_HOURS, 10),
|
||||
CONSTANTS.TWO_HOURS,
|
||||
CONSTANTS.ONE_DAY
|
||||
CONSTANTS.ONE_DAY,
|
||||
);
|
||||
|
||||
/*
|
||||
@@ -56,13 +57,14 @@ module.exports = async (req, res) => {
|
||||
|
||||
return res.send(
|
||||
renderRepoCard(repoData, {
|
||||
hide_border,
|
||||
title_color,
|
||||
icon_color,
|
||||
text_color,
|
||||
bg_color,
|
||||
theme,
|
||||
show_owner: parseBoolean(show_owner),
|
||||
})
|
||||
}),
|
||||
);
|
||||
} catch (err) {
|
||||
return res.send(renderError(err.message, err.secondaryMessage));
|
||||
|
||||
+2
-2
@@ -39,7 +39,7 @@ module.exports = async (req, res) => {
|
||||
const cacheSeconds = clampValue(
|
||||
parseInt(cache_seconds || CONSTANTS.TWO_HOURS, 10),
|
||||
CONSTANTS.TWO_HOURS,
|
||||
CONSTANTS.ONE_DAY
|
||||
CONSTANTS.ONE_DAY,
|
||||
);
|
||||
|
||||
res.setHeader("Cache-Control", `public, max-age=${cacheSeconds}`);
|
||||
@@ -55,7 +55,7 @@ module.exports = async (req, res) => {
|
||||
bg_color,
|
||||
theme,
|
||||
layout,
|
||||
})
|
||||
}),
|
||||
);
|
||||
} catch (err) {
|
||||
return res.send(renderError(err.message, err.secondaryMessage));
|
||||
|
||||
+2
-2
@@ -31,7 +31,7 @@ module.exports = async (req, res) => {
|
||||
let cacheSeconds = clampValue(
|
||||
parseInt(cache_seconds || CONSTANTS.TWO_HOURS, 10),
|
||||
CONSTANTS.TWO_HOURS,
|
||||
CONSTANTS.ONE_DAY
|
||||
CONSTANTS.ONE_DAY,
|
||||
);
|
||||
|
||||
if (!cache_seconds) {
|
||||
@@ -51,7 +51,7 @@ module.exports = async (req, res) => {
|
||||
bg_color,
|
||||
theme,
|
||||
hide_progress,
|
||||
})
|
||||
}),
|
||||
);
|
||||
} catch (err) {
|
||||
return res.send(renderError(err.message, err.secondaryMessage));
|
||||
|
||||
Reference in New Issue
Block a user