mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-03 23:00:14 -05:00
🐛 Fixed missing accent color for default content cta (#15611)
refs https://github.com/TryGhost/Casper/issues/901 - the site accent color property on default cta for upgrade link had a typo and was using wrong property
This commit is contained in:
parent
2c7ade78d7
commit
e05889cd53
2 changed files with 13 additions and 1 deletions
|
@ -11,7 +11,7 @@
|
||||||
<h2>This {{#is "page"}}page{{else}}post{{/is}} is for subscribers on the {{tiers}} only </h2>
|
<h2>This {{#is "page"}}page{{else}}post{{/is}} is for subscribers on the {{tiers}} only </h2>
|
||||||
{{/has}}
|
{{/has}}
|
||||||
{{#if @member}}
|
{{#if @member}}
|
||||||
<a class="gh-btn" data-portal="account/plans" style="color:{{@site.accentColor}}">Upgrade your account</a>
|
<a class="gh-btn" data-portal="account/plans" style="color:{{@site.accent_color}}">Upgrade your account</a>
|
||||||
{{else}}
|
{{else}}
|
||||||
<a class="gh-btn" data-portal="signup" style="color:{{@site.accent_color}}">Subscribe now</a>
|
<a class="gh-btn" data-portal="signup" style="color:{{@site.accent_color}}">Subscribe now</a>
|
||||||
<p><small>Already have an account? <a data-portal="signin">Sign in</a></small></p>
|
<p><small>Already have an account? <a data-portal="signin">Sign in</a></small></p>
|
||||||
|
|
|
@ -150,6 +150,18 @@ describe('{{content}} helper with no access', function () {
|
||||||
rendered.string.should.containEql('"background-color: #abcdef"');
|
rendered.string.should.containEql('"background-color: #abcdef"');
|
||||||
rendered.string.should.containEql('This page is for');
|
rendered.string.should.containEql('This page is for');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('can render default template for upgrade case', function () {
|
||||||
|
// html will be included when there is free content available
|
||||||
|
const html = 'Free content';
|
||||||
|
optionsData.data.member = {
|
||||||
|
id: '123'
|
||||||
|
};
|
||||||
|
const rendered = content.call({html: html, access: false, visibility: 'members'}, optionsData);
|
||||||
|
rendered.string.should.containEql('Free content');
|
||||||
|
rendered.string.should.containEql('Upgrade your account');
|
||||||
|
rendered.string.should.containEql('color:#abcdef');
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('{{content}} helper with custom template', function () {
|
describe('{{content}} helper with custom template', function () {
|
||||||
|
|
Loading…
Add table
Reference in a new issue