X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=docs%2Fdevelopment.md;h=5c05bcc9ac16f8d70f9158c7f89b27675a3fae66;hb=0740fb31b530e125b1a64ba33bf7428f765c541d;hp=6ea1cba1379064c17e72f025a3faf3956f5247e4;hpb=488e4bbe7f511b3c27a665336dad4b7285c77473;p=github%2Fbastienwirtz%2Fhomer.git diff --git a/docs/development.md b/docs/development.md index 6ea1cba..5c05bcc 100644 --- a/docs/development.md +++ b/docs/development.md @@ -1,19 +1,59 @@ -## Developement +# 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 -yarn serve +pnpm install +pnpm dev +``` + +## 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. -# **OR** Using npm -npm install -npm run serve +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 Themes are meant to be simple customization (written in [scss](https://sass-lang.com/documentation/syntax)). -To addd 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. +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. ```scss // `src/assets/themes/my-awesome-theme.scss`