Free access to limited number of articles per month for new non-subscribers

The content-cta card is not required for themes to implement. If they don’t, Ghost will use a fallback :)

@iroughol I think what you want to do is to add a shadow to the content element. So, instead of editing the post-upgrade-cta.hbs file, you can edit the post.hbs file. So:

  1. In post.hbs, update line 8 to be.
<section class='c-content {{#unless access}} fadeout {{/unless}}'>

This change will only add the fadeout class if the visitor has no post access.

  1. Then, using @Stromfeldt code in Code Injection:
<style>
  .fadeout {
    -webkit-mask-image: linear-gradient(to bottom, var(--color-dark) 1%, transparent 100%);
    mask-image: linear-gradient(to bottom, var(--color-dark) 1%, transparent 100%);
  }
</style>

I used --color-dark instead of --color-black, which is a Krabi CSS color variable.

The result will be nice as:)

PS: Krabi uses the post-upgrade-cta.hbs name instead of partials/content-cta.hbs.

3 Likes

Fantastic!

Thank you both @Stromfeldt and @ahmadajmi. I really appreciate this community.

2 Likes

So nice; I will add it in the next theme update.

2 Likes