48 lines
1.6 KiB
Handlebars
48 lines
1.6 KiB
Handlebars
{{#if this.shouldRender}}
|
|
<div
|
|
{{did-insert this.getCategory}}
|
|
{{did-update this.getCategory this.isVisible}}
|
|
{{will-destroy this.teardownComponent}}
|
|
class="category-title-header
|
|
{{if this.category (concat 'category-banner-' this.category.slug)}}"
|
|
style={{if this.category this.safeStyle}}
|
|
>
|
|
{{#if this.category}}
|
|
<div class="category-title-contents">
|
|
{{#if (theme-setting "show_category_logo")}}
|
|
<CategoryLogo @category={{this.category}} />
|
|
{{/if}}
|
|
<h1 class="category-title">
|
|
{{#if (and (theme-setting "show_category_icon") this.category)}}
|
|
{{#if this.hasIconComponent}}
|
|
{{! For compatibility with https://meta.discourse.org/t/category-icons/104683}}
|
|
<CategoryIcon @category={{this.category}} />
|
|
{{else}}
|
|
{{this.consoleWarn}}
|
|
{{/if}}
|
|
{{/if}}
|
|
{{#if this.category.read_restricted}}
|
|
{{d-icon "lock"}}
|
|
{{/if}}
|
|
{{this.category.name}}
|
|
<PluginOutlet
|
|
@name="category-banners-after-title"
|
|
@outletArgs={{hash category=this.category}}
|
|
/>
|
|
</h1>
|
|
|
|
{{#if this.displayCategoryDescription}}
|
|
<div class="category-title-description">
|
|
<div class="cooked">
|
|
{{html-safe this.category.description}}
|
|
<PluginOutlet
|
|
@name="category-banners-after-description"
|
|
@outletArgs={{hash category=this.category}}
|
|
/>
|
|
</div>
|
|
</div>
|
|
{{/if}}
|
|
</div>
|
|
{{/if}}
|
|
</div>
|
|
{{/if}} |