Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion docs/THEMES.md
Original file line number Diff line number Diff line change
Expand Up @@ -337,4 +337,10 @@ If you have a cool new theme in mind, or want to add one for yourself and others
<img src="https://github-readme-tech-stack.vercel.app/api/cards?lineCount=1&bg=%23211f27&badge=%233b3a44&border=%23b9b9c0&titleColor=%2385bef7&line1=node.js,node.js,auto;typescript,typescript,auto;express,express.js,auto">
</td>
</tr>
</table>
<tr>
<td align="center"><code>slack</code></td>
<td>
<img src="https://github-readme-tech-stack.vercel.app/api/cards?title=slack&lineCount=1&bg=%232a072c&badge=%237d3986&border=%233e1043&titleColor=%23d8e7f8&line1=typescript%2CTYPESCRIPT%2C3178c6%3Bexpress%2CEXPRESS.JS%2C4f9cb6%3B">
</td>
</tr>
</table>
13 changes: 9 additions & 4 deletions src/const/themes.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { type Theme } from "@/types";


/**
* This `Map` stores all the themes that are currently available.
* In order to add a new theme, use the `set` method.
Expand Down Expand Up @@ -141,9 +140,9 @@ themes.set("blood_dark", {
});
themes.set("hacker", {
backgroundColor: "#101010",
borderColor: "#222222", // this one is creating a bug if we write #222 instead of #222222.
borderColor: "#222222", // this one is creating a bug if we write #222 instead of #222222.
titleColor: "#1DDB07",
badgeColor: "#222222", // this one is creating a bug if we write #222 instead of #222222.
badgeColor: "#222222", // this one is creating a bug if we write #222 instead of #222222.
});
themes.set("android", {
backgroundColor: "#101010",
Expand Down Expand Up @@ -295,11 +294,17 @@ themes.set("dark_minimalist", {
titleColor: "#85bef7",
badgeColor: "#3b3a44",
});
themes.set("slack", {
backgroundColor: "#2a072c",
borderColor: "#3e1043",
titleColor: "#d8e7f8",
badgeColor: "#7d3986",
});
/**
* Searches for the specified theme in the themes map.
* If the theme is not present in the map, then
* the default github_dark theme gets returned.
*/
export const getThemeByName = (name: string): Theme => {
return themes.get(name.toLowerCase()) ?? Array.from(themes).at(0)![1];
};
};