Sha256: b111dce20af31f95802c6716dc306b9cea107b7284428e46d18d16a779c08a67
Contents?: true
Size: 937 Bytes
Versions: 15
Compression:
Stored size: 937 Bytes
Contents
var LinkPreview = createClass({ render: function () { const entry = this.props.entry; const imageStr = entry.getIn(["data", "image"]); const image = this.props.getAsset(imageStr); const title = entry.getIn(["data", "title"]); const link = entry.getIn(["data", "link"]); return h( "ul", { class: "links" }, h( "li", { class: "link" }, h( "a", { href: link }, h("img", { src: image.toString(), class: "link-logo", alt: title, }) ), h("a", { class: "link-desc", href: link }, title) ) ); }, }); CMS.registerPreviewTemplate("links", LinkPreview); CMS.registerPreviewStyle("/assets/styles.css");
Version data entries
15 entries across 15 versions & 1 rubygems