Skip to content

Instantly share code, notes, and snippets.

@NekitoSP
Forked from YungSang/hello.png
Created March 27, 2014 04:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save NekitoSP/9800298 to your computer and use it in GitHub Desktop.
Save NekitoSP/9800298 to your computer and use it in GitHub Desktop.
<template id="template.widgets.hello">
{{#title}}<h2 class="header">{{title}}</h2>{{/title}}
</template>
<template id="template.widgets.hello.desc">
Hello World
</template>
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