mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-08-21 04:45:17 +00:00
Change Class behavior of hello world.
This commit is contained in:
@@ -17,9 +17,9 @@ var defaults = {
|
||||
{
|
||||
module: "helloworld",
|
||||
position: "upper_third",
|
||||
classes: "large thin",
|
||||
config: {
|
||||
text: "Magic Mirror<sup>2</sup>",
|
||||
classes: "large thin"
|
||||
text: "Magic Mirror<sup>2</sup>"
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -32,17 +32,17 @@ var defaults = {
|
||||
{
|
||||
module: "helloworld",
|
||||
position: "middle_center",
|
||||
classes: "small dimmed",
|
||||
config: {
|
||||
text: "See README for more information.",
|
||||
classes: "small dimmed"
|
||||
text: "See README for more information."
|
||||
}
|
||||
},
|
||||
{
|
||||
module: "helloworld",
|
||||
position: "bottom_bar",
|
||||
classes: "xsmall dimmed",
|
||||
config: {
|
||||
text: "www.michaelteeuw.nl",
|
||||
classes: "xsmall dimmed"
|
||||
text: "www.michaelteeuw.nl"
|
||||
}
|
||||
},
|
||||
],
|
||||
|
@@ -38,14 +38,5 @@ The following properties can be configured:
|
||||
<br><b>Default value:</b> <code>'Hello world!'</code>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>classes</code></td>
|
||||
<td>Classes to apply to the text.<br>
|
||||
<br><b>Example:</b> <code>'xsmall bold'</code>
|
||||
<br><b>Default value:</b> <code>'normal medium'</code>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
@@ -11,16 +11,13 @@ Module.register("helloworld",{
|
||||
|
||||
// Default module config.
|
||||
defaults: {
|
||||
text: "Hello World!",
|
||||
classes: "normal medium"
|
||||
text: "Hello World!"
|
||||
},
|
||||
|
||||
// Override dom generator.
|
||||
getDom: function() {
|
||||
var wrapper = document.createElement("div");
|
||||
wrapper.className = this.config.classes;
|
||||
wrapper.innerHTML = this.config.text;
|
||||
|
||||
return wrapper;
|
||||
}
|
||||
});
|
||||
|
Reference in New Issue
Block a user