Skip to content

Commit

Permalink
Make CTA user-editable
Browse files Browse the repository at this point in the history
  • Loading branch information
unitof committed Feb 15, 2024
1 parent 78e5b8e commit 0c65c11
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 5 deletions.
15 changes: 15 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,21 @@
"type": "text",
"default": "Don't miss out on the latest news. Sign up now to get access to the library of members-only articles."
},
"cta_paid_title": {
"type": "text",
"default": "Read this full post with a subscription to Sludge",
"description": "Shown below free preview of paid-only posts & pages"
},
"cta_free_title": {
"type": "text",
"default": "Get this full story for free",
"description": "Shown below free preview of free but members-only posts & pages"
},
"cta_lede": {
"type": "text",
"default": "Subscribers get our new stories over email the moment they’re published.",
"description": "Body of paywall, above signup/login buttons"
},
"footer_text": {
"type": "text"
},
Expand Down
10 changes: 5 additions & 5 deletions partials/content-cta.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,20 @@
<aside class="gh-post-upgrade-cta">
<div class="gh-post-upgrade-cta-content" style="background-color: {{@site.accent_color}}">
{{#has visibility="paid"}}
<h2>This {{#is "page"}}page{{else}}post{{/is}} is for paying subscribers only</h2>
<h2>{{@custom.cta_paid_title}}</h2>
{{/has}}
{{#has visibility="members"}}
<h2>Get this full story for free</h2>
<h2>{{@custom.cta_free_title}}</h2>
{{/has}}
{{#has visibility="tiers"}}
<h2>This {{#is "page"}}page{{else}}post{{/is}} is for subscribers on the {{tiers}} only </h2>
{{/has}}
{{#if @member}}
<a class="gh-btn" data-portal="account/plans" style="color:{{@site.accent_color}}">Upgrade your account</a>
<a class="gh-btn" data-portal="account/plans" style="color:{{@site.accent_color}}">Upgrade your subscription</a>
{{else}}
<p>Subscribers get our new stories over email the moment they’re published.</p>
<p>{{@custom.cta_lede}}</p>
<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 a member? <a data-portal="signin">Sign in</a></small></p>
{{/if}}
</div>
</aside>

0 comments on commit 0c65c11

Please sign in to comment.