Added conditionals for displaying mention info

refs https://github.com/TryGhost/Team/issues/2434
This commit is contained in:
Djordje Vlaisavljevic 2023-01-23 11:57:01 +00:00
parent 24bdcf5e9d
commit bbbdd26f3f

View File

@ -12,10 +12,14 @@
<p class="gh-mention-your-post">Your post <a href={{mention.target}} class="gh-mention-your-post-link">{{mention.target}}</a> was mentioned in:</p>
<a href="{{mention.source}}" class="gh-mention-container" rel="noreferrer noopener" target="_blank">
<div class="gh-mention-content">
<h3 class="gh-mention-title">{{mention.sourceTitle}}</h3>
<p class="gh-mention-description">{{mention.sourceExcerpt}}</p>
<h3 class="gh-mention-title">{{if mention.sourceTitle mention.sourceTitle mention.target}}</h3>
{{#if mention.sourceExcerpt}}
<p class="gh-mention-description">{{mention.sourceExcerpt}}</p>
{{/if}}
<div class="gh-mention-metadata">
<img src="{{mention.sourceFavicon}}" alt="{{mention.sourceSiteTitle}}" class="gh-mention-icon">
{{#if mention.sourceFavicon}}
<img src="{{mention.sourceFavicon}}" alt="{{mention.sourceSiteTitle}}" class="gh-mention-icon">
{{/if}}
{{#if mention.sourceSiteTitle}}
<span class="gh-mention-publisher">{{mention.sourceSiteTitle}}</span>
{{/if}}
@ -25,9 +29,11 @@
<span class="gh-mention-timestamp">{{gh-format-post-time mention.timestamp}}</span>
</div>
</div>
<div class="gh-mention-thumbnail">
<img src="{{mention.sourceFeaturedImage}}" alt="Mozilla">
</div>
{{#if mention.sourceFeaturedImage}}
<div class="gh-mention-thumbnail">
<img src="{{mention.sourceFeaturedImage}}" alt="{{mention.sourceTitle}}">
</div>
{{/if}}
</a>
</div>
{{/each}}