aboutsummaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorDevine Lu Linvega <aliceffekt@gmail.com>2018-09-14 13:50:32 +1200
committerDevine Lu Linvega <aliceffekt@gmail.com>2018-09-14 13:50:32 +1200
commitb7acd4faec6a71bc650bdf5ea48ad19bb6e6df06 (patch)
tree56ac43ec6da87f3550aa11e817e285c3e232fc6f /README.md
parent39ec5d4a0f16e488fd46c4e18418fd08af594734 (diff)
Improved documentation
Diffstat (limited to 'README.md')
-rw-r--r--README.md49
1 files changed, 33 insertions, 16 deletions
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.
+
+```
+<script type="text/javascript" src="scripts/lib/theme.js"></script>
+```
+
+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.
+
+```
+<link rel="stylesheet" type="text/css" href="links/theme.css"/>
+```
+
+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 `<style>` element to your document's body element with the theme overrides.
+
## Supported Applications
- [Marabu](https://github.com/hundredrabbits/Marabu), music tool.