From 84bbf72fb51fd78f6b955220fc3114372e336065 Mon Sep 17 00:00:00 2001 From: Sami Altamimi Date: Sat, 11 Jun 2022 17:58:59 -0500 Subject: [PATCH] feat: simplify changing the theme You can now create a theme in `themes.json` and set the color attribute to the theme name in `config.json`. --- config.json | 21 +-------------------- tailwind.config.js | 5 ++++- 2 files changed, 5 insertions(+), 21 deletions(-) diff --git a/config.json b/config.json index d1fa47c..0688c5e 100644 --- a/config.json +++ b/config.json @@ -16,24 +16,5 @@ "paypal": "https://paypal.me/cveinnt", "patreon": "https://patreon.com/cveinnt" }, - "colors": { - "light": { - "background": "#FBF1C9", - "foreground": "#3C3836", - "yellow": "#D79921", - "green": "#98971A", - "gray": "#7C6F64", - "blue": "#458588", - "red": "#CA2124" - }, - "dark": { - "background": "#2E3440", - "foreground": "#E5E9F0", - "yellow": "#5E81AC", - "green": "#A3BE8C", - "gray": "#88C0D0", - "blue": "#EBCB8B", - "red": "#BF616A" - } - } + "color": "default" } diff --git a/tailwind.config.js b/tailwind.config.js index 2c63b9b..03700f4 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -1,4 +1,7 @@ -const { colors } = require('./config.json'); +const { color } = require('./config.json'); +const theme = require('./themes.json'); + +let colors = theme[color]; module.exports = { content: [