e3a0bb535f
no issue ATM users have to add logic to their themes in order to automatically hide restricted content. The {{content}} helper is updated to return a default CTA box instead of the post content for restricted posts with default static text using site's accent color and opening Portal for relevant action. This is currently behind the dev experiment flag. - Adds new default content helper template in case of restricted content - Updates content helper to trigger new CTA template in case of restricted content
69 lines
1.4 KiB
JavaScript
69 lines
1.4 KiB
JavaScript
/* Default CSS Styles for helpers which are appended in theme via ghost_head */
|
|
const contentHelper = `.gh-post-upgrade-cta-content,
|
|
.gh-post-upgrade-cta {
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
|
|
text-align: center;
|
|
width: 100%;
|
|
color: #ffffff;
|
|
font-size: 16px;
|
|
}
|
|
|
|
.gh-post-upgrade-cta-content {
|
|
border-radius: 8px;
|
|
padding: 40px 4vw;
|
|
}
|
|
|
|
.gh-post-upgrade-cta h2 {
|
|
color: #ffffff;
|
|
font-size: 28px;
|
|
letter-spacing: -0.2px;
|
|
margin: 0;
|
|
padding: 0;
|
|
}
|
|
|
|
.gh-post-upgrade-cta p {
|
|
margin: 20px 0 0;
|
|
padding: 0;
|
|
}
|
|
|
|
.gh-post-upgrade-cta small {
|
|
font-size: 16px;
|
|
letter-spacing: -0.2px;
|
|
}
|
|
|
|
.gh-post-upgrade-cta a {
|
|
color: #ffffff;
|
|
cursor: pointer;
|
|
font-weight: 500;
|
|
box-shadow: none;
|
|
text-decoration: underline;
|
|
}
|
|
|
|
.gh-post-upgrade-cta a:hover {
|
|
color: #ffffff;
|
|
opacity: 0.8;
|
|
box-shadow: none;
|
|
text-decoration: underline;
|
|
}
|
|
|
|
.gh-post-upgrade-cta a.gh-btn {
|
|
display: block;
|
|
background: #ffffff;
|
|
text-decoration: none;
|
|
margin: 28px 0 0;
|
|
padding: 8px 18px;
|
|
border-radius: 4px;
|
|
font-size: 16px;
|
|
font-weight: 600;
|
|
}
|
|
|
|
.gh-post-upgrade-cta a.gh-btn:hover {
|
|
opacity: 0.92;
|
|
}`;
|
|
|
|
const styles = contentHelper;
|
|
|
|
module.exports = styles; |