diff --git a/controllers/modules.php b/controllers/modules.php new file mode 100644 index 00000000..8477cc48 --- /dev/null +++ b/controllers/modules.php @@ -0,0 +1,11 @@ +'."\xA"); + //Add CSS file of module + print_r(''."\xA"); + //Get and add HTML Elements + print_r(file_get_contents($module.'/elements.html')); + } +?> \ No newline at end of file diff --git a/index.php b/index.php index 042e7c2f..49303d99 100644 --- a/index.php +++ b/index.php @@ -36,5 +36,6 @@ + diff --git a/modules/README.md b/modules/README.md new file mode 100644 index 00000000..ef5c8ed9 --- /dev/null +++ b/modules/README.md @@ -0,0 +1,15 @@ +MagicMirror +=========== + +##Modules +A module has to contain three files: main.js, style.css and elements.html +Other files can be loaded from within those. + +### elements.html +Put your custom divs and other html elements in this file (don't include any body or header tags) + +### main.js +Your plugins JavaScript. + +### style.css +CSS for your HTML elements. \ No newline at end of file diff --git a/modules/test-module/elements.html b/modules/test-module/elements.html new file mode 100644 index 00000000..0934126a --- /dev/null +++ b/modules/test-module/elements.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/modules/test-module/main.js b/modules/test-module/main.js new file mode 100644 index 00000000..be3a90a0 --- /dev/null +++ b/modules/test-module/main.js @@ -0,0 +1 @@ +console.log("Hello from test-module") \ No newline at end of file diff --git a/modules/test-module/style.css b/modules/test-module/style.css new file mode 100644 index 00000000..e69de29b