Skip to content

Public preview fade out effect #71

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions assets/css/screen.css
Original file line number Diff line number Diff line change
Expand Up @@ -2262,6 +2262,20 @@ unless a heading is the very first element in the post content */
font-family: var(--font-mono);
}

/* Public Preview Fading Effect for Last Paragraph */
.fadeout-content p:last-child {
-webkit-mask-image: linear-gradient(to bottom, var(--color-black) 1%, transparent 100%);
mask-image: linear-gradient(to bottom, var(--color-black) 1%, transparent 100%);
margin-bottom: 1.5em; /* Ensure consistent spacing */
}

/* Reset other paragraphs to prevent unintended effects */
.fadeout-content p:not(:last-child) {
-webkit-mask-image: none;
mask-image: none;
margin-bottom: 1.5em; /* Ensure normal paragraph spacing */
}

/* 16. Cards
/* ---------------------------------------------------------- */

Expand Down
24 changes: 24 additions & 0 deletions partials/content-cta
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{{{html}}}
<div class="fadeout">
<div class="fadeout-content">
{{{html}}}
</div>
</div>
<div class="gh-post-upgrade-cta-content" style="background-color: {{@site.accent_color}}">
{{#has visibility="paid"}}
<h2>This content is for paying subscribers only</h2>
{{/has}}
{{#has visibility="members"}}
<h2>This content is for subscribers only</h2>
{{/has}}
{{#has visibility="tiers"}}
<h2>This content is for subscribers on the following tiers only: {{tiers}}</h2>
{{/has}}
{{#if @member}}
<a class="gh-btn" data-portal="account/plans" href="#/portal/account/plans" style="color:{{@site.accent_color}}">Upgrade your account</a>
{{else}}
<a class="gh-btn" data-portal="signup" href="#/portal/signup" style="color:{{@site.accent_color}}">Subscribe</a>
<p><small>Already member? <a data-portal="signin" href="#/portal/signin">Sign in</a></small></p>
{{/if}}
</div>
</aside>