mirror of
https://github.com/edward-shen/MMM-pages.git
synced 2024-11-24 11:14:29 -08:00
Fix format and typos, Add Update section, Remove "Maintainer needed" section
This commit is contained in:
parent
4fe8c3558f
commit
12f2d82295
1 changed files with 66 additions and 80 deletions
110
readme.md
110
readme.md
|
@ -1,27 +1,6 @@
|
|||
# Maintainer needed
|
||||
|
||||
Hello, it's been 5 years since I've written this! While I'm happy to see it
|
||||
thriving, it's also about time I step away. I haven't had a MagicMirror up
|
||||
in years, and to be frank, I'm hoping someone else will be willing to take
|
||||
up maintainership of the project.
|
||||
|
||||
I find this project to be in a near complete form. Other than a few mishaps of
|
||||
me not having proper testing before pushing out code, more often than not any
|
||||
problems that people have usually isn't often because of this project. The few
|
||||
issues that do exist aren't very hard to fix nor are they severe that they
|
||||
impact the project in any large manner. It's just I haven't had the time nor
|
||||
motivation to fix them.
|
||||
|
||||
I don't think there are expectations for this project to have new features, so
|
||||
a maintainer should really only need to just make sure people are getting help
|
||||
when they raise issues and fix the rare bug that pops out every so often. If
|
||||
you're interested, please don't hesitate to reach out.
|
||||
|
||||
---
|
||||
|
||||
# MMM-pages
|
||||
|
||||
This [MagicMirror²][mm] Module allows you to have pages in your MagicMirror!
|
||||
This [MagicMirror²][mm] module allows you to have pages in your MagicMirror!
|
||||
Want to have more modules in your MagicMirror, but want to keep the format?
|
||||
Or, want to have grouped modules that are themed together? Look no further!
|
||||
|
||||
|
@ -31,9 +10,11 @@ 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
|
||||
one yourself!
|
||||
|
||||
To display what page you're on, check out the [page indicator module][page indicator].
|
||||
|
||||
## Installation
|
||||
|
||||
In your terminal, go to your MagicMirror's Module folder:
|
||||
In your terminal, go to your MagicMirror's module folder:
|
||||
|
||||
```bash
|
||||
cd ~/MagicMirror/modules
|
||||
|
@ -42,43 +23,46 @@ cd ~/MagicMirror/modules
|
|||
Clone this repository:
|
||||
|
||||
```bash
|
||||
git clone https://github.com/sdetweil/MMM-pages.git
|
||||
git clone https://github.com/sdetweil/MMM-pages
|
||||
```
|
||||
|
||||
Configure the module in your config.js file.
|
||||
## Update
|
||||
|
||||
*\<self-promotion>*
|
||||
Go to the module’s folder inside your MagicMirror's module folder and pull the latest version:
|
||||
|
||||
To display what page you're on, I'd highly recommend checking out my
|
||||
[page indicator module][page indicator].
|
||||
```bash
|
||||
cd ~/MagicMirror/modules/MMM-pages
|
||||
git pull
|
||||
```
|
||||
|
||||
*\<\\self-promotion>*
|
||||
|
||||
## Using the module
|
||||
## Configuration
|
||||
|
||||
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.
|
||||
|
||||
this approach uses the module names as the page organization technique, as the modulename is added as a css class in the MM page content.
|
||||
This approach uses the module names as the page organization technique, as the modulename is added as a CSS class in the MM page content.
|
||||
|
||||
Because the modulename is used, this approach does not support multiple instances of the same module with data
|
||||
on different pages. (like your calendar on page 1, and someone elses on page 2)
|
||||
on different pages (like your calendar on page 1, and someone elses on page 2).
|
||||
|
||||
```js
|
||||
modules: [
|
||||
{
|
||||
module: 'MMM-pages',
|
||||
module: "MMM-pages",
|
||||
config: {
|
||||
modules:
|
||||
[[ "newsfeed" ],
|
||||
[ "calendar", "compliments" ]],
|
||||
modules: [
|
||||
["newsfeed"],
|
||||
["calendar", "compliments"]
|
||||
],
|
||||
fixed: ["clock", "weather", "MMM-page-indicator"],
|
||||
hiddenPages: {
|
||||
"screenSaver": ["clock", "MMM-SomeBackgroundImageModule"],
|
||||
"admin": [ "MMM-ShowMeSystemStatsModule", "MMM-AnOnScreenMenuModule" ],
|
||||
"admin": ["MMM-ShowMeSystemStatsModule", "MMM-AnOnScreenMenuModule"]
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
]
|
||||
];
|
||||
```
|
||||
|
||||
and alternative approach, is to define a fixed MMM-pages config
|
||||
|
@ -86,24 +70,26 @@ and alternative approach, is to define a fixed MMM-pages config
|
|||
```js
|
||||
modules: [
|
||||
{
|
||||
module: 'MMM-pages',
|
||||
module: "MMM-pages",
|
||||
config: {
|
||||
modules:
|
||||
[[ "page1" ],
|
||||
modules: [
|
||||
["page1"],
|
||||
["page2"],
|
||||
[ "page3" ],
|
||||
["page3"]
|
||||
],
|
||||
fixed: ["fixed_page"],
|
||||
hiddenPages: {
|
||||
"screenSaver": ["screensaver_page"],
|
||||
"admin": [ "admin_page" ],
|
||||
"admin": ["admin_page"]
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
]
|
||||
];
|
||||
```
|
||||
|
||||
and then at each module, add a classes: property to indicate the page(s) this module is supposed to appear on
|
||||
```
|
||||
|
||||
```js
|
||||
{
|
||||
module:"newsfeed",
|
||||
classes:"page1",
|
||||
|
@ -117,10 +103,12 @@ and then at each module, add a classes: property to indicate the page(s) this mo
|
|||
classes:"page2",
|
||||
}
|
||||
```
|
||||
etc
|
||||
|
||||
if u want a modules content on multiple pages the classes would list those page names
|
||||
```
|
||||
etc.
|
||||
|
||||
If u want a modules content on multiple pages the classes would list those page names
|
||||
|
||||
```js
|
||||
{
|
||||
module:"newsfeed",
|
||||
classes:"page1",
|
||||
|
@ -139,7 +127,7 @@ if u want a modules content on multiple pages the classes would list those page
|
|||
}
|
||||
```
|
||||
|
||||
## Configuration options
|
||||
### Configuration options
|
||||
|
||||
| Option | Type | Default Value | Description |
|
||||
| --- | --- | --- | --- |
|
||||
|
@ -153,13 +141,11 @@ if u want a modules content on multiple pages the classes would list those page
|
|||
| `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. |
|
||||
| `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._
|
||||
| `pageTimeout ` | `[]` | `{pageNumber:x,timeout:nnnn}`| array of structures, enable different timeouts for different pages
|
||||
|||| pageNumber starts at 1 for the first page, timeout is in milliseconds
|
||||
| `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.* |
|
||||
| `pageTimeout` | `[]` | `{pageNumber:x,timeout:nnnn}`| array of structures, enable different timeouts for different pages. |
|
||||
|||| `pageNumber` starts at 1 for the first page, timeout is in milliseconds. |
|
||||
|
||||
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 second page, and so forth.
|
||||
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 second page, and so forth.
|
||||
|
||||
## Notifications
|
||||
|
||||
|
@ -209,8 +195,8 @@ MMM-pages notifications.
|
|||
|
||||
### Initialization
|
||||
|
||||
_This section provides documentation on what notifications the module sends on
|
||||
startup. This section isn't necessary to read for most users._
|
||||
*This section provides documentation on what notifications the module sends on
|
||||
startup. This section isn't necessary to read for most users.*
|
||||
|
||||
MMM-pages doesn't activate until we receive the `DOM_OBJECTS_CREATED`
|
||||
notification, as that notification ensures all modules have been loaded. On this
|
||||
|
|
Loading…
Reference in a new issue