From 2ca4faad9cb336ac8904bbc775fdcc2a12731b90 Mon Sep 17 00:00:00 2001 From: Bastien Wirtz Date: Wed, 6 Oct 2021 22:55:09 +0200 Subject: Extendable base service for easier development. --- docs/development.md | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) (limited to 'docs/development.md') diff --git a/docs/development.md b/docs/development.md index 5e432f1..a22ae0b 100644 --- a/docs/development.md +++ b/docs/development.md @@ -1,5 +1,7 @@ # 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) yarn install @@ -10,6 +12,49 @@ npm install npm run serve ``` +## 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)). -- cgit v1.2.3