Compare commits

..
Author SHA1 Message Date
Zohan Subhash d0cb83cfd2 Update wakatime.js 2023-03-01 13:03:51 +05:30
Zohan Subhash 7b87177734 Update top-langs.js 2023-03-01 13:03:38 +05:30
Zohan Subhash 7e30ca6cc0 Update pin.js 2023-03-01 13:03:26 +05:30
Zohan Subhash 22a201df41 Update index.js 2023-03-01 13:02:52 +05:30
7 changed files with 10 additions and 160 deletions
+1 -5
View File
@@ -47,11 +47,7 @@ All you need to do is edit the [themes/index.js](./themes/index.js) file and add
While creating the Pull request to add a new theme **don't forget to add a screenshot of how your theme looks**, you can also test how it looks using custom URL parameters like `title_color`, `icon_color`, `bg_color`, `text_color`, `border_color` While creating the Pull request to add a new theme **don't forget to add a screenshot of how your theme looks**, you can also test how it looks using custom URL parameters like `title_color`, `icon_color`, `bg_color`, `text_color`, `border_color`
> **Note** > NOTE: If you are contributing your theme just because you are using it personally, then you can [customize the looks](./readme.md#customization) of your card with URL params instead.
> If you are contributing your theme just because you are using it personally, then you can [customize the looks](./readme.md#customization) of your card with URL params instead.
> **Note**
> If your theme name contains multiple words (ie, hyphenated or underscor-ed theme names), please add two versions of theme: one with hyphens and one with underscores. This is to ensure backward-compatability with when we had hyphens for some themes and underscores for others.
## Any contributions you make will be under the MIT Software License ## Any contributions you make will be under the MIT Software License
+2
View File
@@ -46,6 +46,8 @@ export default async (req, res) => {
if (locale && !isLocaleAvailable(locale)) { if (locale && !isLocaleAvailable(locale)) {
return res.send(renderError("Something went wrong", "Language not found")); return res.send(renderError("Something went wrong", "Language not found"));
} }
theme = theme.replace(/-/g, "_")
try { try {
const stats = await fetchStats( const stats = await fetchStats(
+2
View File
@@ -35,6 +35,8 @@ export default async (req, res) => {
if (locale && !isLocaleAvailable(locale)) { if (locale && !isLocaleAvailable(locale)) {
return res.send(renderError("Something went wrong", "Language not found")); return res.send(renderError("Something went wrong", "Language not found"));
} }
theme = theme.replace(/-/g, "_")
try { try {
const repoData = await fetchRepo(username, repo); const repoData = await fetchRepo(username, repo);
+2
View File
@@ -41,6 +41,8 @@ export default async (req, res) => {
if (locale && !isLocaleAvailable(locale)) { if (locale && !isLocaleAvailable(locale)) {
return res.send(renderError("Something went wrong", "Locale not found")); return res.send(renderError("Something went wrong", "Locale not found"));
} }
theme = theme.replace(/-/g, "_")
try { try {
const topLangs = await fetchTopLanguages( const topLangs = await fetchTopLanguages(
+2
View File
@@ -38,6 +38,8 @@ export default async (req, res) => {
if (locale && !isLocaleAvailable(locale)) { if (locale && !isLocaleAvailable(locale)) {
return res.send(renderError("Something went wrong", "Language not found")); return res.send(renderError("Something went wrong", "Language not found"));
} }
theme = theme.replace(/-/g, "_")
try { try {
const stats = await fetchWakatimeStats({ username, api_domain, range }); const stats = await fetchWakatimeStats({ username, api_domain, range });
+1 -2
View File
@@ -56,7 +56,6 @@ const createStatMdLink = (theme) => {
const generateLinks = (fn) => { const generateLinks = (fn) => {
return Object.keys(themes) return Object.keys(themes)
.map((name) => fn(name)) .map((name) => fn(name))
.filter((name) => !name.includes('-'))
.join(""); .join("");
}; };
@@ -68,7 +67,7 @@ const generateTable = ({ isRepoCard }) => {
const rows = []; const rows = [];
const themesFiltered = Object.keys(themes).filter( const themesFiltered = Object.keys(themes).filter(
(name) => name !== (!isRepoCard ? "default_repocard" : "default"), (name) => name !== (!isRepoCard ? "default_repocard" : "default"),
).filter((name) => !name.includes('-')); );
for (let i = 0; i < themesFiltered.length; i += 3) { for (let i = 0; i < themesFiltered.length; i += 3) {
const one = themesFiltered[i]; const one = themesFiltered[i];
-153
View File
@@ -12,12 +12,6 @@ export const themes = {
text_color: "434d58", text_color: "434d58",
bg_color: "fffefe", bg_color: "fffefe",
}, },
"default-repocard": {
title_color: "2f80ed",
icon_color: "586069", // icon color is different
text_color: "434d58",
bg_color: "fffefe",
},
transparent: { transparent: {
title_color: "006AFF", title_color: "006AFF",
icon_color: "0579C3", icon_color: "0579C3",
@@ -54,12 +48,6 @@ export const themes = {
text_color: "427b58", text_color: "427b58",
bg_color: "fbf1c7", bg_color: "fbf1c7",
}, },
"gruvbox-light": {
title_color: "b57614",
icon_color: "af3a03",
text_color: "427b58",
bg_color: "fbf1c7",
},
tokyonight: { tokyonight: {
title_color: "70a5fd", title_color: "70a5fd",
icon_color: "bf91f3", icon_color: "bf91f3",
@@ -120,24 +108,12 @@ export const themes = {
text_color: "fffefe", text_color: "fffefe",
bg_color: "273849", bg_color: "273849",
}, },
vue_dark: {
title_color: "41b883",
icon_color: "41b883",
text_color: "fffefe",
bg_color: "273849",
},
"shades-of-purple": { "shades-of-purple": {
title_color: "fad000", title_color: "fad000",
icon_color: "b362ff", icon_color: "b362ff",
text_color: "a599e9", text_color: "a599e9",
bg_color: "2d2b55", bg_color: "2d2b55",
}, },
shades_of_purple: {
title_color: "fad000",
icon_color: "b362ff",
text_color: "a599e9",
bg_color: "2d2b55",
},
nightowl: { nightowl: {
title_color: "c792ea", title_color: "c792ea",
icon_color: "ffeb95", icon_color: "ffeb95",
@@ -156,12 +132,6 @@ export const themes = {
text_color: "0cf574", text_color: "0cf574",
bg_color: "040f0f", bg_color: "040f0f",
}, },
blue_green: {
title_color: "2f97c1",
icon_color: "f5b700",
text_color: "0cf574",
bg_color: "040f0f",
},
algolia: { algolia: {
title_color: "00AEFF", title_color: "00AEFF",
icon_color: "2DDE98", icon_color: "2DDE98",
@@ -174,12 +144,6 @@ export const themes = {
text_color: "ffd95b", text_color: "ffd95b",
bg_color: "000000", bg_color: "000000",
}, },
great_gatsby: {
title_color: "ffa726",
icon_color: "ffb74d",
text_color: "ffd95b",
bg_color: "000000",
},
darcula: { darcula: {
title_color: "BA5F17", title_color: "BA5F17",
icon_color: "84628F", icon_color: "84628F",
@@ -210,24 +174,6 @@ export const themes = {
text_color: "fff", text_color: "fff",
bg_color: "000", bg_color: "000",
}, },
solarized_dark: {
title_color: "268bd2",
icon_color: "b58900",
text_color: "859900",
bg_color: "002b36",
},
solarized_light: {
title_color: "268bd2",
icon_color: "b58900",
text_color: "859900",
bg_color: "fdf6e3",
},
chartreuse_dark: {
title_color: "7fff00",
icon_color: "00AEFF",
text_color: "fff",
bg_color: "000",
},
nord: { nord: {
title_color: "81a1c1", title_color: "81a1c1",
text_color: "d8dee9", text_color: "d8dee9",
@@ -246,12 +192,6 @@ export const themes = {
text_color: "a6accd", text_color: "a6accd",
bg_color: "292d3e", bg_color: "292d3e",
}, },
material_palenight: {
title_color: "c792ea",
icon_color: "89ddff",
text_color: "a6accd",
bg_color: "292d3e",
},
graywhite: { graywhite: {
title_color: "24292e", title_color: "24292e",
icon_color: "24292e", icon_color: "24292e",
@@ -276,24 +216,6 @@ export const themes = {
text_color: "ffffff", text_color: "ffffff",
bg_color: "000000", bg_color: "000000",
}, },
vision_friendly_dark: {
title_color: "ffb000",
icon_color: "785ef0",
text_color: "ffffff",
bg_color: "000000",
},
ayu_mirage: {
title_color: "f4cd7c",
icon_color: "73d0ff",
text_color: "c7c8c2",
bg_color: "1f2430",
},
midnight_purple: {
title_color: "9745f5",
icon_color: "9f4bff",
text_color: "ffffff",
bg_color: "000000",
},
calm: { calm: {
title_color: "e07a5f", title_color: "e07a5f",
icon_color: "edae49", icon_color: "edae49",
@@ -306,12 +228,6 @@ export const themes = {
text_color: "509E2F", text_color: "509E2F",
bg_color: "ffffff", bg_color: "ffffff",
}, },
flag_india: {
title_color: "ff8f1c",
icon_color: "250E62",
text_color: "509E2F",
bg_color: "ffffff",
},
omni: { omni: {
title_color: "FF79C6", title_color: "FF79C6",
icon_color: "e7de79", icon_color: "e7de79",
@@ -360,12 +276,6 @@ export const themes = {
text_color: "d9c8a9", text_color: "d9c8a9",
bg_color: "402b23", bg_color: "402b23",
}, },
"kacho-ga": {
title_color: "bf4a3f",
icon_color: "a64833",
text_color: "d9c8a9",
bg_color: "402b23",
},
outrun: { outrun: {
title_color: "ffcc00", title_color: "ffcc00",
icon_color: "ff1aff", icon_color: "ff1aff",
@@ -384,18 +294,6 @@ export const themes = {
text_color: "718CA1", text_color: "718CA1",
bg_color: "1D252C", bg_color: "1D252C",
}, },
"ocean-dark": {
title_color: "8957B2",
icon_color: "FFFFFF",
text_color: "92D534",
bg_color: "151A28",
},
"city-lights": {
title_color: "5D8CB3",
icon_color: "4798FF",
text_color: "718CA1",
bg_color: "1D252C",
},
github_dark: { github_dark: {
title_color: "58A6FF", title_color: "58A6FF",
icon_color: "1F6FEB", icon_color: "1F6FEB",
@@ -414,24 +312,6 @@ export const themes = {
text_color: "dbdbdb", text_color: "dbdbdb",
bg_color: "252334", bg_color: "252334",
}, },
"github-dark": {
title_color: "58A6FF",
icon_color: "1F6FEB",
text_color: "C3D1D9",
bg_color: "0D1117",
},
"discord-old-blurple": {
title_color: "7289DA",
icon_color: "7289DA",
text_color: "FFFFFF",
bg_color: "2C2F33",
},
"aura-dark": {
title_color: "ff7372",
icon_color: "6cffd0",
text_color: "dbdbdb",
bg_color: "252334",
},
panda: { panda: {
title_color: "19f9d899", title_color: "19f9d899",
icon_color: "19f9d899", icon_color: "19f9d899",
@@ -444,12 +324,6 @@ export const themes = {
text_color: "c5cdd3", text_color: "c5cdd3",
bg_color: "1b2932", bg_color: "1b2932",
}, },
"noctis-minimus": {
title_color: "d3b692",
icon_color: "72b7c0",
text_color: "c5cdd3",
bg_color: "1b2932",
},
cobalt2: { cobalt2: {
title_color: "ffc600", title_color: "ffc600",
icon_color: "ffffff", icon_color: "ffffff",
@@ -507,26 +381,6 @@ export const themes = {
border_color: "3B4048", border_color: "3B4048",
bg_color: "23272E", bg_color: "23272E",
}, },
"rose-pine": {
title_color: "9ccfd8",
icon_color: "ebbcba",
text_color: "e0def4",
bg_color: "191724",
},
"date-night": {
title_color: "DA7885",
text_color: "E1B2A2",
icon_color: "BB8470",
border_color: "170F0C",
bg_color: "170F0C",
},
"one-dark-pro": {
title_color: "61AFEF",
text_color: "E5C06E",
icon_color: "C678DD",
border_color: "3B4048",
bg_color: "23272E",
},
rose: { rose: {
title_color: "8d192b", title_color: "8d192b",
text_color: "862931", text_color: "862931",
@@ -541,13 +395,6 @@ export const themes = {
border_color: "85A4C0", border_color: "85A4C0",
bg_color: "030314", bg_color: "030314",
}, },
"holi-theme": {
title_color: "5FABEE",
text_color: "D6E7FF",
icon_color: "5FABEE",
border_color: "85A4C0",
bg_color: "030314",
},
}; };
export default themes; export default themes;