Skip to content

Commit

Permalink
UX: hide column containers if empty (#21)
Browse files Browse the repository at this point in the history
  • Loading branch information
awesomerobot committed Oct 3, 2023
1 parent 26ecbdf commit 333f922
Showing 1 changed file with 17 additions and 13 deletions.
30 changes: 17 additions & 13 deletions javascripts/discourse/components/versatile-banner-column.hbs
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
<div class="{{@columnClass}} single-box">
{{#if @icon}}
<div class="icon">
{{#if this.isHttpLink}}
<img class="responsive-img" src={{@icon}} alt="Icon" />
{{else}}
{{d-icon @icon}}
{{/if}}
</div>
{{/if}}
<div>
{{html-safe @columnContent}}
{{#if (or @icon @columnContent)}}
<div class="{{@columnClass}} single-box">
{{#if @icon}}
<div class="icon">
{{#if this.isHttpLink}}
<img class="responsive-img" src={{@icon}} alt="Icon" />
{{else}}
{{d-icon @icon}}
{{/if}}
</div>
{{/if}}
{{#if @columnContent}}
<div>
{{html-safe @columnContent}}
</div>
{{/if}}
</div>
</div>
{{/if}}

0 comments on commit 333f922

Please sign in to comment.