From 33586f4bdf4641d08c652bae223a9342f747ca29 Mon Sep 17 00:00:00 2001 From: Michael Teeuw Date: Fri, 1 Apr 2016 16:02:59 +0200 Subject: [PATCH] Compliments documentation. --- README.md | 2 +- modules/compliments/README.md | 87 +++++++++++++++++++++++++++++++++++ 2 files changed, 88 insertions(+), 1 deletion(-) create mode 100644 modules/compliments/README.md diff --git a/README.md b/README.md index f82eb088..397349d8 100644 --- a/README.md +++ b/README.md @@ -29,7 +29,7 @@ Things that still have to be implemented or changed. - **Current Weather** - **Weather Forecast** - **News Feed** -- **Compliments** +- [**Compliments**](modules/compliments) - **Hello World** ### 3rd Party Modules: diff --git a/modules/compliments/README.md b/modules/compliments/README.md new file mode 100644 index 00000000..210f88ed --- /dev/null +++ b/modules/compliments/README.md @@ -0,0 +1,87 @@ +# Module: Compliments +The `compliments` module is one of the default modules of the MagicMirror. +This module displays a random compliment. + +## Using the module + +To use this module, add it to the modules array in the `config/config.js` file: +````javascript +modules: [ + { + module: 'compliments', + position: 'lower_third', // This can be any of the regions. + // Best results in one of the middle regions like: lower_third + config: { + // The config property is optional. + // If no config is set, an example calendar is shown. + // See 'Configuration options' for more information. + } + } +] +```` + +## Configuration options + +The following properties can be configured: + + + + + + + + + + + + + + + + + + + + + + + + + +
OptionDescription
updateIntervalHow often does the compliment have to change? (Milliseconds)
+
Possible values: 1000 - 86400000 +
Default value: 30000 (30 seconds) +
fadeSpeedSpeed of the update animation. (Milliseconds)
+
Possible values:0 - 5000 +
Default value: 4000 (4 seconds) +
complimentsThe list of compliments.
+
Possible values: An object with three arrays: morning, afternoon andevening. See compliment configuration below. +
Default value: See compliment configuration below. +
+ +### Compliment configuration + +The `compliments` property contains an object with three arrays: morning, afternoon andevening. Based on the time of the day, the compliments will be picked out of one of these arrays. The arrays contain one or multiple compliments. + +#### Default value: +````javascript +config: { + compliments: { + morning: [ + 'Good morning, handsome!', + 'Enjoy your day!', + 'How was your sleep?' + ], + afternoon: [ + 'Hello, beauty!', + 'You look sexy!', + 'Looking good today!' + ], + evening: [ + 'Wow, you look hot!', + 'You look nice!', + 'Hi, sexy!' + ] + } +} +```` \ No newline at end of file