Fix Ember this-fallback deprecation: add this. prefix to theme properties

- Update Handlebars templates to use this.theme.* instead of theme.*
- Fixes deprecation warning: ember-this-fallback.this-property-fallback
- Ensures compatibility with Discourse 3.5.0 strict template requirements

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
gabeszm 2025-10-16 16:38:47 +02:00
parent e9d72d53b5
commit c4eb1c6f0a
2 changed files with 82 additions and 82 deletions

View file

@ -1,16 +1,16 @@
{{#if theme.enable_welcome_banner}}
{{#unless (eq theme.banner_position "below_header")}}
{{#if this.theme.enable_welcome_banner}}
{{#unless (eq this.theme.banner_position "below_header")}}
<section class="above-main-container-outlet welcome-card">
<div class="hero-section">
<div class="hero-deco"></div>
<div class="hero-content">
<h2 class="hero-title">
{{{theme.hero_title_html}}}
{{{this.theme.hero_title_html}}}
</h2>
<div class="hero-description">
{{{theme.hero_content_html}}}
{{{this.theme.hero_content_html}}}
</div>
{{#if theme.enable_hero_search}}
{{#if this.theme.enable_hero_search}}
<div class="search-container" aria-label="Search"></div>
{{/if}}
</div>
@ -18,104 +18,104 @@
<div class="cta-section">
<ul class="cta-list">
{{#if theme.cta_card_1_enabled}}
{{#if this.theme.cta_card_1_enabled}}
<li>
<a
href="{{theme.cta_card_1_url}}"
href="{{this.theme.cta_card_1_url}}"
class="cta-card"
aria-label="{{theme.cta_card_1_title}}"
aria-label="{{this.theme.cta_card_1_title}}"
>
<div class="cta-icon">
{{#if (eq theme.cta_card_1_icon_type "font_awesome")}}
<i class="fas fa-{{theme.cta_card_1_icon_font_awesome}}"></i>
{{#if (eq this.theme.cta_card_1_icon_type "font_awesome")}}
<i class="fas fa-{{this.theme.cta_card_1_icon_font_awesome}}"></i>
{{else}}
{{theme.cta_card_1_icon_emoji}}
{{this.theme.cta_card_1_icon_emoji}}
{{/if}}
</div>
<div class="cta-content">
<span class="cta-title">{{theme.cta_card_1_title}}</span>
<span class="cta-desc">{{theme.cta_card_1_description}}</span>
<span class="cta-title">{{this.theme.cta_card_1_title}}</span>
<span class="cta-desc">{{this.theme.cta_card_1_description}}</span>
<span class="cta-cta">
<i class="fas fa-angle-double-right"></i>
{{theme.cta_card_1_cta_text}}
{{this.theme.cta_card_1_cta_text}}
</span>
</div>
</a>
</li>
{{/if}}
{{#if theme.cta_card_2_enabled}}
{{#if this.theme.cta_card_2_enabled}}
<li>
<a
href="{{theme.cta_card_2_url}}"
href="{{this.theme.cta_card_2_url}}"
class="cta-card"
aria-label="{{theme.cta_card_2_title}}"
aria-label="{{this.theme.cta_card_2_title}}"
>
<div class="cta-icon">
{{#if (eq theme.cta_card_2_icon_type "font_awesome")}}
<i class="fas fa-{{theme.cta_card_2_icon_font_awesome}}"></i>
{{#if (eq this.theme.cta_card_2_icon_type "font_awesome")}}
<i class="fas fa-{{this.theme.cta_card_2_icon_font_awesome}}"></i>
{{else}}
{{theme.cta_card_2_icon_emoji}}
{{this.theme.cta_card_2_icon_emoji}}
{{/if}}
</div>
<div class="cta-content">
<span class="cta-title">{{theme.cta_card_2_title}}</span>
<span class="cta-desc">{{theme.cta_card_2_description}}</span>
<span class="cta-title">{{this.theme.cta_card_2_title}}</span>
<span class="cta-desc">{{this.theme.cta_card_2_description}}</span>
<span class="cta-cta">
<i class="fas fa-angle-double-right"></i>
{{theme.cta_card_2_cta_text}}
{{this.theme.cta_card_2_cta_text}}
</span>
</div>
</a>
</li>
{{/if}}
{{#if theme.cta_card_3_enabled}}
{{#if this.theme.cta_card_3_enabled}}
<li>
<a
href="{{theme.cta_card_3_url}}"
href="{{this.theme.cta_card_3_url}}"
class="cta-card"
aria-label="{{theme.cta_card_3_title}}"
aria-label="{{this.theme.cta_card_3_title}}"
>
<div class="cta-icon">
{{#if (eq theme.cta_card_3_icon_type "font_awesome")}}
<i class="fas fa-{{theme.cta_card_3_icon_font_awesome}}"></i>
{{#if (eq this.theme.cta_card_3_icon_type "font_awesome")}}
<i class="fas fa-{{this.theme.cta_card_3_icon_font_awesome}}"></i>
{{else}}
{{theme.cta_card_3_icon_emoji}}
{{this.theme.cta_card_3_icon_emoji}}
{{/if}}
</div>
<div class="cta-content">
<span class="cta-title">{{theme.cta_card_3_title}}</span>
<span class="cta-desc">{{theme.cta_card_3_description}}</span>
<span class="cta-title">{{this.theme.cta_card_3_title}}</span>
<span class="cta-desc">{{this.theme.cta_card_3_description}}</span>
<span class="cta-cta">
<i class="fas fa-angle-double-right"></i>
{{theme.cta_card_3_cta_text}}
{{this.theme.cta_card_3_cta_text}}
</span>
</div>
</a>
</li>
{{/if}}
{{#if theme.cta_card_4_enabled}}
{{#if this.theme.cta_card_4_enabled}}
<li>
<a
href="{{theme.cta_card_4_url}}"
href="{{this.theme.cta_card_4_url}}"
class="cta-card"
aria-label="{{theme.cta_card_4_title}}"
aria-label="{{this.theme.cta_card_4_title}}"
>
<div class="cta-icon">
{{#if (eq theme.cta_card_4_icon_type "font_awesome")}}
<i class="fas fa-{{theme.cta_card_4_icon_font_awesome}}"></i>
{{#if (eq this.theme.cta_card_4_icon_type "font_awesome")}}
<i class="fas fa-{{this.theme.cta_card_4_icon_font_awesome}}"></i>
{{else}}
{{theme.cta_card_4_icon_emoji}}
{{this.theme.cta_card_4_icon_emoji}}
{{/if}}
</div>
<div class="cta-content">
<span class="cta-title">{{theme.cta_card_4_title}}</span>
<span class="cta-desc">{{theme.cta_card_4_description}}</span>
<span class="cta-title">{{this.theme.cta_card_4_title}}</span>
<span class="cta-desc">{{this.theme.cta_card_4_description}}</span>
<span class="cta-cta">
<i class="fas fa-angle-double-right"></i>
{{theme.cta_card_4_cta_text}}
{{this.theme.cta_card_4_cta_text}}
</span>
</div>
</a>

View file

@ -1,16 +1,16 @@
{{#if theme.enable_welcome_banner}}
{{#if (eq theme.banner_position "below_header")}}
{{#if this.theme.enable_welcome_banner}}
{{#if (eq this.theme.banner_position "below_header")}}
<section class="below-site-header welcome-card">
<div class="hero-section">
<div class="hero-deco"></div>
<div class="hero-content">
<h2 class="hero-title">
{{{theme.hero_title_html}}}
{{{this.theme.hero_title_html}}}
</h2>
<div class="hero-description">
{{{theme.hero_content_html}}}
{{{this.theme.hero_content_html}}}
</div>
{{#if theme.enable_hero_search}}
{{#if this.theme.enable_hero_search}}
<div class="search-container" aria-label="Search"></div>
{{/if}}
</div>
@ -18,104 +18,104 @@
<div class="cta-section">
<ul class="cta-list">
{{#if theme.cta_card_1_enabled}}
{{#if this.theme.cta_card_1_enabled}}
<li>
<a
href="{{theme.cta_card_1_url}}"
href="{{this.theme.cta_card_1_url}}"
class="cta-card"
aria-label="{{theme.cta_card_1_title}}"
aria-label="{{this.theme.cta_card_1_title}}"
>
<div class="cta-icon">
{{#if (eq theme.cta_card_1_icon_type "font_awesome")}}
<i class="fas fa-{{theme.cta_card_1_icon_font_awesome}}"></i>
{{#if (eq this.theme.cta_card_1_icon_type "font_awesome")}}
<i class="fas fa-{{this.theme.cta_card_1_icon_font_awesome}}"></i>
{{else}}
{{theme.cta_card_1_icon_emoji}}
{{this.theme.cta_card_1_icon_emoji}}
{{/if}}
</div>
<div class="cta-content">
<span class="cta-title">{{theme.cta_card_1_title}}</span>
<span class="cta-desc">{{theme.cta_card_1_description}}</span>
<span class="cta-title">{{this.theme.cta_card_1_title}}</span>
<span class="cta-desc">{{this.theme.cta_card_1_description}}</span>
<span class="cta-cta">
<i class="fas fa-angle-double-right"></i>
{{theme.cta_card_1_cta_text}}
{{this.theme.cta_card_1_cta_text}}
</span>
</div>
</a>
</li>
{{/if}}
{{#if theme.cta_card_2_enabled}}
{{#if this.theme.cta_card_2_enabled}}
<li>
<a
href="{{theme.cta_card_2_url}}"
href="{{this.theme.cta_card_2_url}}"
class="cta-card"
aria-label="{{theme.cta_card_2_title}}"
aria-label="{{this.theme.cta_card_2_title}}"
>
<div class="cta-icon">
{{#if (eq theme.cta_card_2_icon_type "font_awesome")}}
<i class="fas fa-{{theme.cta_card_2_icon_font_awesome}}"></i>
{{#if (eq this.theme.cta_card_2_icon_type "font_awesome")}}
<i class="fas fa-{{this.theme.cta_card_2_icon_font_awesome}}"></i>
{{else}}
{{theme.cta_card_2_icon_emoji}}
{{this.theme.cta_card_2_icon_emoji}}
{{/if}}
</div>
<div class="cta-content">
<span class="cta-title">{{theme.cta_card_2_title}}</span>
<span class="cta-desc">{{theme.cta_card_2_description}}</span>
<span class="cta-title">{{this.theme.cta_card_2_title}}</span>
<span class="cta-desc">{{this.theme.cta_card_2_description}}</span>
<span class="cta-cta">
<i class="fas fa-angle-double-right"></i>
{{theme.cta_card_2_cta_text}}
{{this.theme.cta_card_2_cta_text}}
</span>
</div>
</a>
</li>
{{/if}}
{{#if theme.cta_card_3_enabled}}
{{#if this.theme.cta_card_3_enabled}}
<li>
<a
href="{{theme.cta_card_3_url}}"
href="{{this.theme.cta_card_3_url}}"
class="cta-card"
aria-label="{{theme.cta_card_3_title}}"
aria-label="{{this.theme.cta_card_3_title}}"
>
<div class="cta-icon">
{{#if (eq theme.cta_card_3_icon_type "font_awesome")}}
<i class="fas fa-{{theme.cta_card_3_icon_font_awesome}}"></i>
{{#if (eq this.theme.cta_card_3_icon_type "font_awesome")}}
<i class="fas fa-{{this.theme.cta_card_3_icon_font_awesome}}"></i>
{{else}}
{{theme.cta_card_3_icon_emoji}}
{{this.theme.cta_card_3_icon_emoji}}
{{/if}}
</div>
<div class="cta-content">
<span class="cta-title">{{theme.cta_card_3_title}}</span>
<span class="cta-desc">{{theme.cta_card_3_description}}</span>
<span class="cta-title">{{this.theme.cta_card_3_title}}</span>
<span class="cta-desc">{{this.theme.cta_card_3_description}}</span>
<span class="cta-cta">
<i class="fas fa-angle-double-right"></i>
{{theme.cta_card_3_cta_text}}
{{this.theme.cta_card_3_cta_text}}
</span>
</div>
</a>
</li>
{{/if}}
{{#if theme.cta_card_4_enabled}}
{{#if this.theme.cta_card_4_enabled}}
<li>
<a
href="{{theme.cta_card_4_url}}"
href="{{this.theme.cta_card_4_url}}"
class="cta-card"
aria-label="{{theme.cta_card_4_title}}"
aria-label="{{this.theme.cta_card_4_title}}"
>
<div class="cta-icon">
{{#if (eq theme.cta_card_4_icon_type "font_awesome")}}
<i class="fas fa-{{theme.cta_card_4_icon_font_awesome}}"></i>
{{#if (eq this.theme.cta_card_4_icon_type "font_awesome")}}
<i class="fas fa-{{this.theme.cta_card_4_icon_font_awesome}}"></i>
{{else}}
{{theme.cta_card_4_icon_emoji}}
{{this.theme.cta_card_4_icon_emoji}}
{{/if}}
</div>
<div class="cta-content">
<span class="cta-title">{{theme.cta_card_4_title}}</span>
<span class="cta-desc">{{theme.cta_card_4_description}}</span>
<span class="cta-title">{{this.theme.cta_card_4_title}}</span>
<span class="cta-desc">{{this.theme.cta_card_4_description}}</span>
<span class="cta-cta">
<i class="fas fa-angle-double-right"></i>
{{theme.cta_card_4_cta_text}}
{{this.theme.cta_card_4_cta_text}}
</span>
</div>
</a>