Now supports subexpressions such as i18n and concat, plus automatic attaching of widgets similar to ember.
14 lines
357 B
JavaScript
14 lines
357 B
JavaScript
import { createWidget } from "discourse/widgets/widget";
|
|
import hbs from "discourse/widgets/hbs-compiler";
|
|
|
|
createWidget("header-contents", {
|
|
tagName: "div.contents.clearfix",
|
|
template: hbs`
|
|
{{home-logo attrs=attrs}}
|
|
{{#if attrs.topic}}
|
|
{{header-topic-info attrs=attrs}}
|
|
{{/if}}
|
|
<div class="panel clearfix">{{yield}}</div>
|
|
`
|
|
});
|