jamestagal / edtechdesigner

A professional blog site of Benjamin Waller
https://edtechdesigner.io
0 stars 1 forks source link

Using the Styles #3

Closed jimafisk closed 2 years ago

jimafisk commented 2 years ago

In the index.json file I have tried swapping out the default Earthliness colourScheme with one of the others (Simplicity, Technobeat) to see what they look like but changing the name in the value for the colorScheme doesn't seem to work. Is this the only place I need to change it to see a change? Please let me know if I am doing something wrong here.

jimafisk commented 2 years ago

It looks like @roobyz (the designer of Compendium) set up NPM scripts in package.json to do things like change the color scheme: https://github.com/plenti-themes/compendium/blob/864bb3e13459fb1ce7123d1e8b79e3ff281de3b2/package.json#L5

See the color-scheme script ``` "cp styles/$(grep -m 1 colorScheme content/index.json | awk '{ gsub(/[[:punct:]]/, \"\"); print $2 }').css assets/color-scheme.css" ```

So in order for this to work:

Then run the script: npm run update:scheme

See Technobeat screenshot ![technobeat](https://user-images.githubusercontent.com/5913244/147593207-ce503901-56dd-4aa7-8c14-2aa7245359ee.png)
jimafisk commented 2 years ago

This is how you would implement technobeat: https://github.com/jamestagal/edtechdesigner/pull/9

jamestagal commented 2 years ago

Thank you Jim. I followed your steps and changing the colorScheme in index.json works now. One thing I didn't know is that i have to copy over the style from the scheme into the color-scheme.css and then update the colorScheme name as well for it to take affect.

roobyz commented 2 years ago

Sorry for my delayed response, it has been a bit hectic quarter with my new job and all. I am working on refining the theming process. I have an idea for simplifying things, but have no working code yet. Will keep you posted.