mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-08-22 05:07:05 +00:00
Change Class behavior of hello world.
This commit is contained in:
@@ -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