dffb1fc4ee
Widgets can now specify a template which is precompiled using Glimmer's AST and then converted into our virtual dom code. Example: ```javascript createWidget('post-link-arrow', { template: hbs` {{#if attrs.above}} <a class="post-info arrow" title={{i18n "topic.jump_reply_up"}}> {{fa-icon "arrow-up"}} </a> {{else}} <a class="post-info arrow" title={{i18n "topic.jump_reply_down"}}> {{fa-icon "arrow-down"}} </a> {{/if}} `, click() { DiscourseURL.routeTo(this.attrs.shareUrl); } }); ``` |
||
---|---|---|
.. | ||
actions-summary-test.js.es6 | ||
button-test.js.es6 | ||
hamburger-menu-test.js.es6 | ||
header-test.js.es6 | ||
home-logo-test.js.es6 | ||
post-links-test.js.es6 | ||
post-stream-test.js.es6 | ||
post-test.js.es6 | ||
poster-name-test.js.es6 | ||
topic-participant-test.js.es6 | ||
user-menu-test.js.es6 | ||
widget-test.js.es6 |