allow custom module positions
I'm not sure if this should be merged but I tested this because of these discussions:
- https://github.com/MichMich/MagicMirror/issues/3212
- https://forum.magicmirror.builders/topic/18069/multiple-modules-in-a-region/17
With this PR you can
- define own module positions as html in
config.js, key ismodulePositions - define own css styles in a new file in the
cssdirectory, the name of this file is specified inconfig.js, key ismodulePositionsCss
So let me know whether we should offer this or not (no problem for me if not). This PR could be a basis for that.
Codecov Report
Merging #3231 (baf4528) into develop (66b29ec) will increase coverage by
0.10%. Report is 1 commits behind head on develop. The diff coverage is41.66%.
:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.
@@ Coverage Diff @@
## develop #3231 +/- ##
===========================================
+ Coverage 25.19% 25.30% +0.10%
===========================================
Files 54 54
Lines 11933 11943 +10
===========================================
+ Hits 3007 3022 +15
+ Misses 8926 8921 -5
| Files | Coverage Δ | |
|---|---|---|
| js/defaults.js | 100.00% <100.00%> (ø) |
|
| js/server_functions.js | 89.39% <100.00%> (+0.16%) |
:arrow_up: |
| modules/default/calendar/calendar.js | 0.00% <ø> (ø) |
|
| js/main.js | 0.00% <0.00%> (ø) |
@khassel
and do you think about change module position when MM² is running ? some users ask to me this feature when whey use some "pages" 3rd party modules
sample using with an pages module
- page 1: weather in
top_right// clock intop_left// ... - page 2 : weather in
top_left// clock intop_right// ...
Actually they have to use multi-instance of a module with hide // show feature
there is a module that does this now in 3rd party list
https://github.com/Toreke/MMM-Dynamic-Modules
I already forgot this PR ...
and do you think about change module position when MM² is running ?
not before your comment ...
This PR was only meant for discussing custom module positions, the implementation is a little ugly, not sure if this should go live ...
I think it would be nice if we could give the users more flexibility with this option. I might prefer a more elegant solution. But I can't think of one at the moment 😅
the problem is that I tell myself... I would have tried to code it but I'm recoding on one of my modules (and it's giving me a headache...)
When I've done it...why don't I start coding it. (this might be interesting) We still have a lot of time ahead of us :p
Note: sometimes it would be good to have a TODO file :p
Note: sometimes it would be good to have a TODO file :p
I think we should do this with issues, there is already #3212 but I can create a new one for this feature (and assign it to you if you want).
I submitted #3518 which reads index.html to get the defined regions for this run