-
-
Save NekitoSP/9800298 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template id="template.widgets.hello"> | |
{{#title}}<h2 class="header">{{title}}</h2>{{/title}} | |
</template> | |
<template id="template.widgets.hello.desc"> | |
Hello World | |
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23: { | |
id: 23, | |
size: 1, | |
order: 0, | |
name: "Hello World", | |
nicename: "hello", | |
sizes: ["small"], | |
desc: "It's a small Hello World.", | |
settings: [ | |
{ | |
type: "text", | |
nicename: "title", | |
label: "Widget Title", | |
placeholder: "Enter a widget title or leave blank to hide" | |
} | |
], | |
config: { | |
title: "Hello World", | |
size: "small" | |
}, | |
render: function() { | |
var data = $.extend({}, this.data || {}); | |
if (this.config.title && this.config.title !== "") { | |
data.title = this.config.title; | |
} | |
this.utils.render(data); | |
} | |
}, |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment