Skip to content

Commit ac1fb05

Browse files
committed
Updated readme with information about theming.
1 parent 2e35943 commit ac1fb05

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

README.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,26 @@ Now open your browser and navigate to [http://localhost:12345](http://localhost:
256256

257257
Run `grunt` to execute the tests and check the source code with [JSHint](http://jshint.com/).
258258

259+
### Theming support
260+
261+
Currently different themes are supported. You can switch the themes by the url parameter `theme`.
262+
- `default`: Default theme (will be selected, even when the parameter is not in the url))
263+
- `list`: Preview of a theme which will show the builds as a list
264+
265+
e.g.: [http://localhost:3000?theme=list](http://localhost:3000?theme=list)
266+
267+
#### Creating a new theme
268+
269+
If you want to create a new theme, you simply have to create one template file and one stylesheet in the following paths.
270+
- Stylesheet: `app/public/stylesheets/themes/[name of theme]/style.css` (you can place dependent css files in this folder)
271+
- Template: `app/public/templates/themes/[name of theme]/.html`
272+
273+
Please use a unique class prefix like `[name of theme]-theme` for your css, so that we do not run into any conflicts with other themes.
274+
275+
A list with the name `builds` with Knockout.js ViewModels [BuildViewModel](app/public/scripts/BuildViewModel.js) will be bound to the template. [Knockout.js](http://knockoutjs.com/) has a very low learning curve and provides a powerful data-binding mechanism.
276+
277+
Just check out the other themes to get sample code. It's quite easy to create new themes.
278+
259279
### Additional: Raspberry Pi Configuration
260280

261281
Here are some useful links, how to run the build monitor frontend on a Raspberry Pi.

0 commit comments

Comments
 (0)