From b7acd4faec6a71bc650bdf5ea48ad19bb6e6df06 Mon Sep 17 00:00:00 2001 From: Devine Lu Linvega Date: Fri, 14 Sep 2018 13:50:32 +1200 Subject: Improved documentation --- README.md | 49 +++++++++++++++++++++++++++++++++---------------- 1 file changed, 33 insertions(+), 16 deletions(-) (limited to 'README.md') diff --git a/README.md b/README.md index 85c2c06..11d4356 100644 --- a/README.md +++ b/README.md @@ -8,22 +8,15 @@ This repo documents the specs of the theme format used across the Hundred Rabbit ``` { - "meta": { - "author": "aeriform", - "version": 2, - "revision": 1 - }, - "data": { - "background": "#d4d3c0", - "b_high": "#ede6d4", - "b_med": "#534e41", - "b_low": "#dfddca", - "b_inv": "#cc295c" - "f_high": "#534e41", - "f_med": "#534e41", - "f_low": "#ede6d4", - "f_inv": "#cc295c", - } + "background": "#d4d3c0", + "b_high": "#ede6d4", + "b_med": "#534e41", + "b_low": "#dfddca", + "b_inv": "#cc295c" + "f_high": "#534e41", + "f_med": "#534e41", + "f_low": "#ede6d4", + "f_inv": "#cc295c" } ``` @@ -41,6 +34,30 @@ To implement support, you need to add the [theme.js](https://github.com/hundredr - `b_low`, Background, low-contrast. - `f_inv`, Background, inverted. +## Setup + +Install Themes support, by adding [theme.js](https://github.com/hundredrabbits/Dotgrid/blob/master/desktop/sources/scripts/lib/theme.js) to your header. + +``` + +``` + +Define the overrides in a [dedicated theme.css](https://github.com/hundredrabbits/Dotgrid/blob/master/desktop/sources/links/theme.css) by adding this line to your header. + +``` + +``` + +Initiate the Theme class by adding these lines somewhere in your project. + +``` +const theme = new Theme(); +theme.install(document.body); +theme.start(); +``` + +This will add a handler that will detect files dragged onto the project, and append a `