plouc / mozaik

Mozaïk is a tool based on nodejs / react / redux / nivo / d3 to easily craft beautiful dashboards
http://mozaik.rocks
MIT License
3.61k stars 363 forks source link

Create a new theme #90

Closed tsyirvo closed 8 years ago

tsyirvo commented 8 years ago

Hello,

I was wondering if there was any specific files or setup to do to create a new theme. Based on the already available themes, they all have the same files defined.

Once the new theme is created, how do I register it on the Mosaik config file ?

I'll probably make a PR once I finish it so that anyone can use it ;)

Cheers,

plouc commented 8 years ago

Hi @tsyirvo,

The required files are _vars.styl and index.styl located in src/themes/my_custom_theme. The exhaustive list of customizable variable is available in src/styl/__vars.styl.

To use it, you just have to set theme: 'my_custom_theme' in the config file and run gulp styles:dev task or gulp styles depending on the environment.

If you want to submit your theme, you'll have to add it to .gitignore, !src/themes/my_custom_theme.

ps: all paths are relatives to mozaik module.