Remove colors.css and new default theme

This commit is contained in:
Astra 2025-05-15 18:13:36 +09:00
parent 8e7f5fc0ab
commit 04735a538d
Signed by: astra
SSH key fingerprint: SHA256:jQDNS75/33T59Ey4yAzrUPP/5YQaXEetsW8hwUae+ag
5 changed files with 440 additions and 25 deletions

View file

@ -12,7 +12,6 @@ export const themePlugin = (): Plugin => {
enforce: 'pre', // Ensure this plugin runs first
transform(code, id) {
if (id.endsWith('app.css')) {
const colorsCode = Deno.readTextFileSync(Deno.cwd() + '/themes/colors.css');
// Read the theme file and replace the contents of app.css with it
// Needs full path to the file
const themeCode = Deno.readTextFileSync(Deno.cwd() + '/themes/' + themeFolder + '/theme.css');
@ -20,7 +19,7 @@ export const themePlugin = (): Plugin => {
// and add a comment at the top
const themeComment = `/* Generated from ${themeFolder} */\n`;
const themeCodeWithComment = themeComment + colorsCode + themeCode;
const themeCodeWithComment = themeComment + themeCode;
// Return the theme code as the new contents of app.css
return {
code: themeCodeWithComment,