mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-08-21 12:55:22 +00:00
Merge branch 'templates' into develop
This commit is contained in:
5
modules/default/helloworld/helloworld.html
Normal file
5
modules/default/helloworld/helloworld.html
Normal file
@@ -0,0 +1,5 @@
|
||||
<!--
|
||||
Use | striptags(true) for HTML rendering
|
||||
https://mozilla.github.io/nunjucks/templating.html#striptags-value-preserve_linebreaks
|
||||
-->
|
||||
<div class="normal">{{text | striptags(true)}}</div>
|
@@ -14,10 +14,11 @@ Module.register("helloworld",{
|
||||
text: "Hello World!"
|
||||
},
|
||||
|
||||
// Override dom generator.
|
||||
getDom: function() {
|
||||
var wrapper = document.createElement("div");
|
||||
wrapper.innerHTML = this.config.text;
|
||||
return wrapper;
|
||||
getTemplate: function () {
|
||||
return "helloworld.html"
|
||||
},
|
||||
|
||||
getTemplateData: function () {
|
||||
return this.config
|
||||
}
|
||||
});
|
||||
|
Reference in New Issue
Block a user