File tree Expand file tree Collapse file tree 3 files changed +6
-0
lines changed
Expand file tree Collapse file tree 3 files changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ const moduleDefinition = {
1212 updateInterval : 3600 , // 60 min.
1313
1414 // Appearance
15+ maxEvents : null ,
1516 reverseOrder : false ,
1617
1718 // Style
Original file line number Diff line number Diff line change @@ -83,6 +83,7 @@ All options are optional so the module works out of the box.
8383| ---------------- | -------------------------------------------------------------------------------------------------------------------- |
8484| ` animationSpeed ` | Duration of content refresh animation in seconds.<br ><br >** Type:** ` Number ` <br >** Default:** ` 1 ` |
8585| ` updateInterval ` | Time between loading new events data in seconds.<br ><br >** Type:** ` Number ` <br >** Default:** ` 3600 ` (1 hour) |
86+ | ` maxEvents ` | Display up to the given number of events if supported.<br ><br >** Type:** ` Number ` <br >** Default:** ` null ` |
8687| ` reverseOrder ` | Display events in reversed order if supported.<br ><br >** Type:** ` Boolean ` <br >** Default:** ` false ` |
8788| ` maxWidth ` | Max width of the displayed events content.<br ><br >** Type:** ` String ` <br >** Default:** ` 400px ` |
8889| ` textSize ` | CSS class to set the text size, use MagicMirror core classes here<br ><br >** Type:** ` String ` <br >** Default:** ` xsmall ` |
Original file line number Diff line number Diff line change 1515 {% set items = items | reverse %}
1616 {% endif %}
1717
18+ {% if config .maxEvents %}
19+ {% set items = items .slice (0, config .maxEvents ) %}
20+ {% endif %}
21+
1822 <ul >
1923 {% for item in items %}
2024 <li >{{ item }} </li >
You can’t perform that action at this time.
0 commit comments