X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=docs%2Fdevelopment.md;h=c02406b3cd521f219e0a4ffef0511658c52e8464;hb=b19f6f228b29a320e842d52700d6930386cca199;hp=f2e90201f9c86853cb5ddd374c337271f525866b;hpb=2662b1704930eff56a61194a6796d463df687889;p=github%2Fbastienwirtz%2Fhomer.git
diff --git a/docs/development.md b/docs/development.md
index f2e9020..c02406b 100644
--- a/docs/development.md
+++ b/docs/development.md
@@ -1,4 +1,6 @@
-## Development
+# Development
+
+If you want to contribute to Homer, please read the [contributing guidelines](https://github.com/bastienwirtz/homer/blob/main/CONTRIBUTING.md) first.
```sh
# Using yarn (recommended)
@@ -10,7 +12,50 @@ npm install
npm run serve
```
-### Themes
+## Custom services
+
+Custom services are small VueJs component (see `src/components/services/`) that add little features to a classic, "static", dashboard item. It should be very simple.
+A dashboard can contain a lot of items, so performance is very important.
+
+The [`Generic`](https://github.com/bastienwirtz/homer/blob/main/src/components/services/Generic.vue) service provides a typical card layout which
+you can extend to add specific features. Unless you want a completely different design, extended the generic service is the recommended way. It gives you 3 [slots](https://vuejs.org/v2/guide/components-slots.html#Named-Slots) to extend: `icon`, `content` and `indicator`.
+Each one is **optional**, and will display the usual information if omitted.
+
+Each service must implement the `item` [property](https://vuejs.org/v2/guide/components-props.html) and bind it the Generic component if used.
+
+### Skeleton
+```Vue
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+```
+
+
+## Themes
Themes are meant to be simple customization (written in [scss](https://sass-lang.com/documentation/syntax)).
To add a new theme, just add a file in the theme directory, and put all style in the `body #app.theme-` scope. Then import it in the main style file.
@@ -27,3 +72,32 @@ body #app.theme-my-awesome-theme. { ... }
...
@import "./themes/my-awesome-theme.scss";
```
+
+
+## Documentation
+
+### Install Python dependencies
+
+Homer's documentation is built using
+[Material for MkDocs](https://squidfunk.github.io/mkdocs-material/). To get
+started, you'll need Python 3 installed on your machine and set up your local
+environment.
+
+```sh
+python -m venv venv
+source venv/bin/activate
+pip install -r requirements.txt
+```
+
+### Preview local copy
+
+MkDocs comes with a command-line utility for building and serving the static
+documentation site every time you save a file. To launch it, run the `serve`
+command.
+
+```sh
+mkdocs serve
+```
+
+Your local version of the docs site will now be available at
+http://localhost:8000/.