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