mirror of
https://github.com/discourse/discourse.git
synced 2024-11-23 09:26:54 -06:00
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); } }); ``` |
||
---|---|---|
.. | ||
locale | ||
moment_locale | ||
messageformat-lookup.js | ||
messageformat.js | ||
moment.js | ||
widget-hbs-compiler.js.es6 |