this repo has no description

Added a separate file for color variables

ari.express ec73af56 cebae8c7

verified
+14 -13
+1
src/app.css
··· 1 + @import url('./themes/colors.css'); 1 2 body { 2 3 background-color: red; 3 4 }
+11
src/themes/colors.css
··· 1 + :root { 2 + --link-color: #646cff; 3 + --link-hover-color: #535bf2; 4 + --background-color: #12082b; 5 + --header-background-color: #1f1145; 6 + --content-background-color: #0d0620; 7 + --text-color: white; 8 + --border-color: #8054f0; 9 + --indicator-inactive-color: #4a4a4a; 10 + --indicator-active-color: #8054f0; 11 + }
-12
src/themes/theme.css
··· 3 3 src: url(https://witchcraft.systems/ProggyCleanNerdFont-Regular.ttf); 4 4 } 5 5 6 - :root { 7 - --link-color: #646cff; 8 - --link-hover-color: #535bf2; 9 - --background-color: #12082b; 10 - --header-background-color: #1f1145; 11 - --content-background-color: #0d0620; 12 - --text-color: white; 13 - --border-color: #8054f0; 14 - --indicator-inactive-color: #4a4a4a; 15 - --indicator-active-color: #8054f0; 16 - } 17 - 18 6 ::-webkit-scrollbar { 19 7 width: 0px; 20 8 background: transparent;
+2 -1
theming.ts
··· 11 11 name: 'theme-generator', 12 12 transform(code, id) { 13 13 if (id.endsWith('app.css')) { 14 + const colorsCode = Deno.readTextFileSync(Deno.cwd() + '/src/themes/colors.css'); 14 15 // Read the theme file and replace the contents of app.css with it 15 16 // Needs full path to the file 16 17 const themeCode = Deno.readTextFileSync(Deno.cwd() + '/src/themes/' + themeFile); ··· 18 19 19 20 // and add a comment at the top 20 21 const themeComment = `/* Generated from ${themeFile} */\n`; 21 - const themeCodeWithComment = themeComment + themeCode; 22 + const themeCodeWithComment = themeComment + colorsCode + themeCode; 22 23 // Return the theme code as the new contents of app.css 23 24 return { 24 25 code: themeCodeWithComment,