Compare commits

...

15 Commits

Author SHA1 Message Date
c378e9a9c9 v4.7.0 2021-12-17 15:58:13 +08:00
db98015d41 Header card tweaks 2021-12-17 15:06:34 +08:00
7e9cf5c478 v4.6.1 2021-12-16 09:46:13 +01:00
0f9a3c79c1 Fix list layout style on medium screen size 2021-12-16 12:53:45 +08:00
8ff91f709e Updated callout emoji line-height 2021-12-15 15:00:52 +01:00
feb2de765c v4.6.0 2021-12-15 13:02:03 +00:00
9b45ff3418 Card css specificity update (#832)
The default CSS styles of new Koenig cards that have been released in the past couple of weeks was updated for better usability in themes in general (read commit message for reasons and more reference).

This commit contains CSS cleanup and updates in theme styles that aligns Casper to this change.
2021-12-15 13:06:42 +01:00
827f37255c Updated styles for file upload card 2021-12-14 14:38:49 +01:00
ffdf853323 v4.5.0 2021-12-13 17:47:11 +01:00
e4543555fa Fixed a rule so that it doesn't overrides the product card css
refs https://github.com/TryGhost/Team/issues/1245

- Followed the same pattern as the callout, ntf and bookmark cards.
2021-12-13 17:23:49 +01:00
67e7291c2b Footer > Adding Lazy loading in the profile image 2021-12-13 16:09:13 +08:00
c880856a32 Revert dark mode style of product card rating 2021-12-10 09:55:52 +08:00
b06bcd6534 v4.4.0 2021-12-08 15:00:14 +00:00
49f99d956f Add dark mode support to product card star rating 2021-12-08 17:17:47 +08:00
cdb03b65fb Add alternate blockquote styles 2021-12-07 19:05:00 +08:00
5 changed files with 124 additions and 52 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

@ -556,6 +556,12 @@ body:not(.gh-head-open) .gh-burger:hover .gh-burger-inner::after {
word-break: break-word; word-break: break-word;
} }
@media (max-width: 700px) {
.post-card {
min-height: auto;
}
}
.post-card-image-link { .post-card-image-link {
position: relative; position: relative;
display: block; display: block;
@ -750,6 +756,30 @@ make sure this only happens on large viewports / desktop-ish devices.
*/ */
@media (min-width: 701px) {
.post-feed.list .post-card-large {
grid-column: 1 / span 3;
display: grid;
grid-gap: 4vmin;
grid-template-columns: 3fr 5fr;
min-height: auto;
border-top: 0;
}
.post-feed.list .post-card-large.no-image {
grid-template-columns: 1fr;
}
.post-feed.list .post-card-large:not(.no-image) .post-card-header {
margin-top: 0;
}
.post-feed.list .post-card-large .post-card-content {
justify-content: flex-start;
margin-top: -6px;
}
}
@media (min-width: 1001px) { @media (min-width: 1001px) {
.post-card-large { .post-card-large {
grid-column: 1 / span 3; grid-column: 1 / span 3;
@ -760,15 +790,6 @@ make sure this only happens on large viewports / desktop-ish devices.
border-top: 0; border-top: 0;
} }
.post-feed.list .post-card-large {
grid-template-columns: 3fr 5fr;
min-height: auto;
}
.post-feed.list .post-card-large.no-image {
grid-template-columns: 1fr;
}
.post-card-large:not(.no-image) .post-card-header { .post-card-large:not(.no-image) .post-card-header {
margin-top: 0; margin-top: 0;
} }
@ -802,11 +823,6 @@ make sure this only happens on large viewports / desktop-ish devices.
justify-content: center; justify-content: center;
} }
.post-feed.list .post-card-large .post-card-content {
justify-content: flex-start;
margin-top: -6px;
}
.post-card-large .post-card-title { .post-card-large .post-card-title {
margin-top: 0; margin-top: 0;
font-size: 3.2rem; font-size: 3.2rem;
@ -995,17 +1011,13 @@ is the very first element in the post content */
} }
/* Now the content typography styles */ /* Now the content typography styles */
.gh-content a:not(.gh-post-upgrade-cta a):not(.kg-bookmark-container):not(.kg-btn):not(.kg-nft-card-container):not(.kg-callout-card-accent a) { .gh-content a {
color: var(--ghost-accent-color); color: var(--ghost-accent-color);
text-decoration: underline; text-decoration: underline;
word-break: break-word; word-break: break-word;
} }
.gh-content .kg-callout-card-accent a { .gh-content > blockquote:not([class]),
text-decoration: underline;
}
.gh-content > blockquote,
.gh-content > ol, .gh-content > ol,
.gh-content > ul, .gh-content > ul,
.gh-content > dl, .gh-content > dl,
@ -1016,23 +1028,30 @@ is the very first element in the post content */
line-height: 1.6em; line-height: 1.6em;
} }
.gh-content .kg-callout-text, .gh-content .kg-callout-card .kg-callout-text,
.gh-content .kg-toggle-content > ol, .gh-content .kg-toggle-card .kg-toggle-content > ol,
.gh-content .kg-toggle-content > ul, .gh-content .kg-toggle-card .kg-toggle-content > ul,
.gh-content .kg-toggle-content > p { .gh-content .kg-toggle-card .kg-toggle-content > p {
font-family: var(--font-serif); font-family: var(--font-serif);
font-weight: 400; font-weight: 400;
font-size: 2.0rem; font-size: 1.9rem;
line-height: 1.6em; line-height: 1.6em;
} }
.gh-content .kg-callout-emoji { .gh-content .kg-product-card .kg-product-card-description > p,
font-size: 2.2rem; .gh-content .kg-product-card .kg-product-card-description > ol,
line-height: 1.5em; .gh-content .kg-product-card .kg-product-card-description > ul {
font-size: 1.7rem;
line-height: 1.6em;
} }
.gh-content .kg-toggle-heading-text { .gh-content .kg-callout-card .kg-callout-emoji {
font-size: 2.2rem; font-size: 2.1rem;
line-height: 1.4em;
}
.gh-content .kg-toggle-card .kg-toggle-heading-text {
font-size: 2.0rem;
} }
.has-sans-body .gh-content > blockquote, .has-sans-body .gh-content > blockquote,
@ -1040,26 +1059,30 @@ is the very first element in the post content */
.has-sans-body .gh-content > ul, .has-sans-body .gh-content > ul,
.has-sans-body .gh-content > dl, .has-sans-body .gh-content > dl,
.has-sans-body .gh-content > p, .has-sans-body .gh-content > p,
.has-sans-body .kg-callout-text, .has-sans-body .gh-content .kg-callout-card .kg-callout-text,
.has-sans-body .kg-toggle-content > ol, .has-sans-body .gh-content .kg-toggle-card .kg-toggle-content > ol,
.has-sans-body .kg-toggle-content > ul, .has-sans-body .gh-content .kg-toggle-card .kg-toggle-content > ul,
.has-sans-body .kg-toggle-content > p { .has-sans-body .gh-content .kg-toggle-card .kg-toggle-content > p {
font-family: var(--font-sans); font-family: var(--font-sans);
} }
.gh-content > ul, .gh-content > ul,
.gh-content > ol, .gh-content > ol,
.gh-content > dl { .gh-content > dl,
.gh-content .kg-toggle-card .kg-toggle-content > ol,
.gh-content .kg-toggle-card .kg-toggle-content > ul,
.gh-content .kg-product-card .kg-product-card-description > ol,
.gh-content .kg-product-card .kg-product-card-description > ul {
padding-left: 1.9em; padding-left: 1.9em;
} }
.gh-content > blockquote { .gh-content > blockquote:not([class]) {
position: relative; position: relative;
font-style: italic; font-style: italic;
padding: 0; padding: 0;
} }
.gh-content > blockquote::before { .gh-content > blockquote:not([class])::before {
content: ""; content: "";
position: absolute; position: absolute;
left: -1.5em; left: -1.5em;
@ -1093,19 +1116,25 @@ is the very first element in the post content */
} }
@media (max-width: 650px) { @media (max-width: 650px) {
.gh-content > blockquote, .gh-content > blockquote:not([class]),
.gh-content > ol, .gh-content > ol,
.gh-content > ul, .gh-content > ul,
.gh-content > dl, .gh-content > dl,
.gh-content > p, .gh-content > p,
.kg-callout-text, .gh-content .kg-callout-card .kg-callout-text,
.kg-toggle-content > ol, .gh-content .kg-toggle-card .kg-toggle-content > ol,
.kg-toggle-content > ul, .gh-content .kg-toggle-card .kg-toggle-content > ul,
.kg-toggle-content > p { .gh-content .kg-toggle-card .kg-toggle-content > p {
font-size: 1.7rem; font-size: 1.7rem;
} }
.gh-content blockquote::before { .gh-content .kg-product-card .kg-product-card-description > p,
.gh-content .kg-product-card .kg-product-card-description > ol,
.gh-content .kg-product-card .kg-product-card-description > ul {
font-size: 1.5rem;
}
.gh-content blockquote:not([class])::before {
left: -4vmin; left: -4vmin;
} }
} }
@ -1143,12 +1172,29 @@ except for when immediately preceeded by a heading */
margin: auto; margin: auto;
} }
.has-serif-title .kg-toggle-heading-text { .has-serif-title .kg-toggle-card .kg-toggle-heading-text {
font-family: var(--font-serif); font-family: var(--font-serif);
} }
.kg-toggle-content > * + * { .gh-content .kg-callout-card-accent a {
margin-top: min(2.4rem, 4vmin); text-decoration: underline;
}
.kg-blockquote-alt {
font-family: var(--font-serif);
color: var(--color-midgrey);
}
.has-sans-body .kg-blockquote-alt {
font-family: var(--font-sans);
}
.kg-header-card h2.kg-header-card-header {
color: color-mod(var(--color-darkgrey) l(-5%));
}
.has-serif-title .kg-header-card h2.kg-header-card-header {
font-family: var(--font-serif);
} }
@ -1810,7 +1856,7 @@ html.dark-mode .gh-content :not(pre) > code {
color: var(--color-wash); color: var(--color-wash);
} }
html.dark-mode .gh-content a:not(.kg-btn):not(.kg-nft-card-container) { html.dark-mode .gh-content a:not(.kg-btn):not(.kg-nft-card-container):not(.kg-product-card-button):not(.kg-header-card-button) {
color: #fff; color: #fff;
} }
@ -1867,6 +1913,19 @@ html.dark-mode .site-archive-header .no-image {
background: var(--color-darkmode); background: var(--color-darkmode);
} }
html.dark-mode .kg-header-card.kg-style-dark {
background: color-mod(var(--color-darkgrey) l(-5%));
}
html.dark-mode .kg-header-card.kg-style-light {
background: color-mod(var(--color-darkgrey) l(+5%));
}
html.dark-mode .kg-header-card h2.kg-header-card-header,
html.dark-mode .kg-header-card h3.kg-header-card-subheader {
color: #fff;
}
@media (prefers-color-scheme: dark) { @media (prefers-color-scheme: dark) {
html.auto-color body { html.auto-color body {
color: rgba(255, 255, 255, 0.75); color: rgba(255, 255, 255, 0.75);
@ -1948,7 +2007,7 @@ html.dark-mode .site-archive-header .no-image {
color: var(--color-wash); color: var(--color-wash);
} }
html.auto-color .gh-content a:not(.kg-btn):not(.kg-nft-card-container) { html.auto-color .gh-content a:not(.kg-btn):not(.kg-nft-card-container):not(.kg-product-card-button):not(.kg-header-card-button) {
color: #fff; color: #fff;
} }
@ -2004,6 +2063,19 @@ html.dark-mode .site-archive-header .no-image {
color: rgba(255, 255, 255, 0.9); color: rgba(255, 255, 255, 0.9);
background: var(--color-darkmode); background: var(--color-darkmode);
} }
html.auto-color .kg-header-card.kg-style-dark {
background: color-mod(var(--color-darkgrey) l(-5%));
}
html.auto-color .kg-header-card.kg-style-light {
background: color-mod(var(--color-darkgrey) l(+5%));
}
html.auto-color .kg-header-card h2.kg-header-card-header,
html.auto-color .kg-header-card h3.kg-header-card-subheader {
color: #fff;
}
} }
/* /*

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": "4.3.1", "version": "4.7.0",
"engines": { "engines": {
"ghost": ">=4.0.0", "ghost": ">=4.0.0",
"ghost-api": "v4" "ghost-api": "v4"

View File

@ -42,7 +42,7 @@ which templates loop over to generate a list of posts. --}}
<li class="author-list-item"> <li class="author-list-item">
{{#if profile_image}} {{#if profile_image}}
<a href="{{url}}" class="static-avatar"> <a href="{{url}}" class="static-avatar">
<img class="author-profile-image" src="{{img_url profile_image size="xs"}}" alt="{{name}}" /> <img class="author-profile-image" src="{{img_url profile_image size="xs"}}" alt="{{name}}" loading="lazy" />
</a> </a>
{{else}} {{else}}
<a href="{{url}}" class="static-avatar author-profile-image">{{> "icons/avatar"}}</a> <a href="{{url}}" class="static-avatar author-profile-image">{{> "icons/avatar"}}</a>