Compare commits

...

5 commits

Author SHA1 Message Date
Kristjan ESPERANTO
347c9bd78c Use uppercase for README 2024-12-10 01:00:40 +01:00
Kristjan ESPERANTO
d6dc57fe74 Format 2024-12-10 01:00:40 +01:00
Kristjan ESPERANTO
7df1aaaa10 Move "page indicator" recomandation to description 2024-12-10 01:00:40 +01:00
Kristjan ESPERANTO
5c0ca7259a Add update section 2024-12-10 01:00:40 +01:00
Kristjan ESPERANTO
cbfdbf5d14 Minor detail improvements 2024-12-10 01:00:40 +01:00
2 changed files with 46 additions and 28 deletions

View file

@ -10,9 +10,10 @@ A clear and concise description of what the bug is.
**To Reproduce** **To Reproduce**
Steps to reproduce the behavior: Steps to reproduce the behavior:
(Please paste any information on reproducing the issue, for example:) (Please paste any information on reproducing the issue, for example:)
1. Go to '...' 1. Go to '...'
2. Click on '....' 2. Click on '...'
3. Scroll down to '....' 3. Scroll down to '...'
4. See error 4. See error
**Expected behavior** **Expected behavior**
@ -23,14 +24,20 @@ If applicable, add screenshots to help explain your problem. If you believe you
have aptly described your issue in words, feel free to ignore/delete this section. have aptly described your issue in words, feel free to ignore/delete this section.
**Please fill out the following information;** **Please fill out the following information;**
- Node version: [This can be obtained by running `node --version`]
- Have you updated to the latest MagicMirror core? [yes/no] - Node version: [This can be obtained by running `node -v` in your terminal]
- Please post the relevant part of your config file here: - Have you updated to the latest MagicMirror core? [yes/no]
- Please post the relevant part of your config file here:
```json ```json
(Paste the part of the config file here) (Paste the part of the config file here)
``` ```
- Please post any errors you see about MMM-Pages in the console (Hit F12 > Console when the Magic Mirror window is focused), or write **None** if there aren't any:
- Please post any errors you see about MMM-pages in the console (Hit F12 > Console when the MagicMirror window is focused), or write **None** if there aren't any:
``` ```
(Paste the error here)
``` ```
**Additional context** **Additional context**
Add any other context about the problem here. Add any other context about the problem here.

View file

@ -26,6 +26,8 @@ Note that this module does not provide any method of manually changing the page!
You should ask other developers to add a notification to their modules, or add You should ask other developers to add a notification to their modules, or add
one yourself! one yourself!
To display what page you're on, I highly recommend checking out my [page indicator module][page indicator].
## Installation ## Installation
In your terminal, go to your MagicMirror's module directory: In your terminal, go to your MagicMirror's module directory:
@ -40,40 +42,49 @@ Clone this repository:
git clone https://github.com/edward-shen/MMM-pages git clone https://github.com/edward-shen/MMM-pages
``` ```
Configure the module in your config.js file. ## Update
*\<self-promotion>* Go to the modules directory inside your MagicMirror's module directory and pull the latest version:
To display what page you're on, I'd highly recommend checking out my ```bash
[page indicator module][page indicator]. cd ~/MagicMirror/modules/MMM-pages
git pull
```
*\<\\self-promotion>* ## Configuration
## Using the module
To use this module, add it to the modules array in the `config/config.js` file. To use this module, add it to the modules array in the `config/config.js` file.
Note: module names used in the following example are fictitious. *Note*: Some of the module names used in the following example are fictitious.
```js ```js
modules: [
{ {
module: 'MMM-pages', module: "MMM-pages",
config: { config: {
modules: modules: [
[[ "newsfeed" ], ["newsfeed"],
[ "calendar", "compliments" ]], ["calendar", "compliments"]
fixed: [ "clock", "weather", "MMM-page-indicator" ], ],
hiddenPages: { fixed: [
"screenSaver": [ "clock", "MMM-SomeBackgroundImageModule" ], "clock",
"admin": [ "MMM-ShowMeSystemStatsModule", "MMM-AnOnScreenMenuModule" ], "weather",
}, "MMM-page-indicator"
],
hiddenPages: {
"screenSaver": [
"clock",
"MMM-SomeBackgroundImageModule"
],
"admin": [
"MMM-ShowMeSystemStatsModule",
"MMM-AnOnScreenMenuModule"
]
}
} }
} },
]
``` ```
## Configuration options ### Configuration options
| Option | Type | Default Value | Description | | Option | Type | Default Value | Description |
| --- | --- | --- | --- | | --- | --- | --- | --- |
@ -87,7 +98,7 @@ modules: [
| `rotationHomePage` | `int` | `0` | Time, in milliseconds, before automatically returning to the home page. If a home page is not set, this returns to the leftmost page instead. | | `rotationHomePage` | `int` | `0` | Time, in milliseconds, before automatically returning to the home page. If a home page is not set, this returns to the leftmost page instead. |
| `rotationFirstPage` | *NA* | *NA* | **Deprecated**. Use `rotationHomePage` instead. | | `rotationFirstPage` | *NA* | *NA* | **Deprecated**. Use `rotationHomePage` instead. |
| `homePage` | `int` | `0` | Which page index is the home page. If none is set, this returns to the leftmost page instead. | | `homePage` | `int` | `0` | Which page index is the home page. If none is set, this returns to the leftmost page instead. |
| `useLockString` | `bool` | `true` | Whether or not to use a lock string to show or hide pages. If disabled, other modules may override when modules may be shown. _Advanced users only. Only override this if you know what you're doing._ | `useLockString` | `bool` | `true` | Whether or not to use a lock string to show or hide pages. If disabled, other modules may override when modules may be shown. *Advanced users only. Only override this if you know what you're doing.* |
For the `module` configuration option, the first element of the outer array For the `module` configuration option, the first element of the outer array
should consist of elements that should be on the first page. The second element should consist of elements that should be on the first page. The second element