Compare commits

...

12 Commits

7 changed files with 51 additions and 10 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -373,7 +373,7 @@ body:not(.has-cover) .site-header-content:not(.left-aligned) {
.gh-social-link { .gh-social-link {
line-height: 0; line-height: 0;
color: #fff; color: inherit;
} }
.gh-social-link:hover { .gh-social-link:hover {
@ -413,6 +413,36 @@ body:not(.has-cover) .site-header-content:not(.left-aligned) {
} }
/* Search
/* ---------------------------------------------------------- */
.gh-search {
display: inline-flex;
align-items: center;
justify-content: center;
width: 32px;
height: 32px;
padding: 0;
cursor: pointer;
background-color: transparent;
border: 0;
outline: none;
}
.gh-search:hover {
opacity: 0.9;
}
@media (max-width: 991px) {
.gh-search {
position: fixed;
top: 16px;
left: 16px;
z-index: 10;
}
}
/* Mobile Menu Trigger /* Mobile Menu Trigger
/* ---------------------------------------------------------- */ /* ---------------------------------------------------------- */
@ -643,19 +673,19 @@ body:not(.gh-head-open) .gh-burger:hover .gh-burger-inner::after {
padding-bottom: 55%; padding-bottom: 55%;
} }
.post-card:is(.post-access-members, .post-access-paid) .post-card-image-link::after { .post-card[class*="post-access-"] .post-card-image-link::after {
background-color: rgba(0, 0, 0, 0.5); background-color: rgba(0, 0, 0, 0.5);
backdrop-filter: blur(3px); backdrop-filter: blur(3px);
} }
.post-card.keep-ratio:is(.post-access-members, .post-access-paid) .post-card-image-link::after { .post-card.keep-ratio[class*="post-access-"] .post-card-image-link::after {
position: absolute; position: absolute;
inset: 0; inset: 0;
padding-bottom: 0; padding-bottom: 0;
} }
.post-card.keep-ratio.post-access-public:not(.post-card-large):not(.post-card-full) .post-card-image-link::after { .post-card.keep-ratio:not(.post-card-large):not(.post-card-full) .post-card-image-link::after {
display: none; padding-bottom: 0;
} }
.post-card-image { .post-card-image {

View File

@ -42,6 +42,7 @@
{{navigation}} {{navigation}}
</div> </div>
<div class="gh-head-actions"> <div class="gh-head-actions">
<button class="gh-search" data-ghost-search>{{> "icons/search"}}</button>
<div class="gh-social"> <div class="gh-social">
{{#if @site.facebook}} {{#if @site.facebook}}
<a class="gh-social-link gh-social-facebook" href="{{facebook_url @site.facebook}}" title="Facebook" target="_blank" rel="noopener">{{> "icons/facebook"}}</a> <a class="gh-social-link gh-social-facebook" href="{{facebook_url @site.facebook}}" title="Facebook" target="_blank" rel="noopener">{{> "icons/facebook"}}</a>

View File

@ -2,7 +2,7 @@
"name": "casper", "name": "casper",
"description": "A clean, minimal default theme for the Ghost publishing platform", "description": "A clean, minimal default theme for the Ghost publishing platform",
"demo": "https://demo.ghost.io", "demo": "https://demo.ghost.io",
"version": "5.1.1", "version": "5.2.0",
"engines": { "engines": {
"ghost": ">=5.0.0" "ghost": ">=5.0.0"
}, },

View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2" width="20" height="20"><path stroke-linecap="round" stroke-linejoin="round" d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"></path></svg>

After

Width:  |  Height:  |  Size: 248 B

View File

@ -1,7 +1,7 @@
{{!-- This is a partial file used to generate a post "card" {{!-- This is a partial file used to generate a post "card"
which templates loop over to generate a list of posts. --}} which templates loop over to generate a list of posts. --}}
<article class="post-card {{post_class}}{{#match @custom.feed_layout "Classic"}}{{#is "home"}}{{#has index="0"}} post-card-large{{/has}}{{#has index="1,2"}} dynamic{{/has}}{{/is}}{{/match}}{{#match @custom.feed_layout "Grid"}} keep-ratio{{/match}}{{#match @custom.feed_layout "List"}}{{#is "home"}} post-card-large{{/is}}{{/match}} post-access-{{visibility}}"> <article class="post-card {{post_class}}{{#match @custom.feed_layout "Classic"}}{{#is "home"}}{{#has index="0"}} post-card-large{{/has}}{{#has index="1,2"}} dynamic{{/has}}{{/is}}{{/match}}{{#match @custom.feed_layout "Grid"}} keep-ratio{{/match}}{{#match @custom.feed_layout "List"}}{{#is "home, paged"}} post-card-large{{/is}}{{/match}}{{#unless access}} post-access-{{visibility}}{{/unless}}">
{{#if feature_image}} {{#if feature_image}}
<a class="post-card-image-link" href="{{url}}"> <a class="post-card-image-link" href="{{url}}">
@ -19,11 +19,18 @@ which templates loop over to generate a list of posts. --}}
loading="lazy" loading="lazy"
/> />
{{#unless access}}
{{^has visibility="public"}} {{^has visibility="public"}}
<div class="post-card-access"> <div class="post-card-access">
{{> "icons/lock"}} Members-only {{> "icons/lock"}}
{{#has visibility="members"}}
Members only
{{else}}
Paid-members only
{{/has}}
</div> </div>
{{/has}} {{/has}}
{{/unless}}
</a> </a>
{{/if}} {{/if}}
@ -41,11 +48,13 @@ which templates loop over to generate a list of posts. --}}
{{/if}} {{/if}}
</div> </div>
<h2 class="post-card-title"> <h2 class="post-card-title">
{{#unless access}}
{{^has visibility="public"}} {{^has visibility="public"}}
{{#unless feature_image}} {{#unless feature_image}}
{{> "icons/lock"}} {{> "icons/lock"}}
{{/unless}} {{/unless}}
{{/has}} {{/has}}
{{/unless}}
{{title}} {{title}}
</h2> </h2>
</header> </header>