Merge branch 'TryGhost:main' into main

This commit is contained in:
Evan Wondrasek 2024-12-18 22:10:15 -08:00 committed by GitHub
commit c1e058b09b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
10 changed files with 140 additions and 105 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -58,7 +58,8 @@ hr {
grid-template-columns: repeat(12, minmax(0, 1fr));
}
.gh-canvas > * {
.gh-canvas > *,
.page-template .no-image :is(.gh-article-title, .gh-article-excerpt) {
grid-column: 4 / span 6;
}
@ -75,7 +76,8 @@ hr {
}
@media (max-width: 991px) {
.gh-canvas > * {
.gh-canvas > *,
.page-template .no-image :is(.gh-article-title, .gh-article-excerpt) {
grid-column: 3 / span 8;
}
@ -85,7 +87,8 @@ hr {
}
@media (max-width: 767px) {
.gh-canvas > * {
.gh-canvas > *,
.page-template .no-image :is(.gh-article-title, .gh-article-excerpt) {
grid-column: 2 / span 10;
}
@ -95,7 +98,8 @@ hr {
}
@media (max-width: 480px) {
.gh-canvas > * {
.gh-canvas > *,
.page-template .no-image :is(.gh-article-title, .gh-article-excerpt) {
grid-column: 1 / span 12;
}
}
@ -154,12 +158,12 @@ hr {
line-height: 1.2;
}
.has-serif-font .gh-about-primary {
font-family: var(--font-serif);
.has-serif-font:not([class*=" gh-font-heading"]):not([class^="gh-font-heading"]):not([class*=" gh-font-body"]):not([class^="gh-font-body"]) .gh-about-primary {
font-family: var(--gh-font-heading, var(--font-serif));
}
.has-mono-font .gh-about-primary {
font-family: var(--font-mono);
.has-mono-font:not([class*=" gh-font-heading"]):not([class^="gh-font-heading"]):not([class*=" gh-font-body"]):not([class^="gh-font-body"]) .gh-about-primary {
font-family: var(--gh-font-heading, var(--font-mono));
}
.gh-about-primary a {
@ -173,12 +177,12 @@ hr {
letter-spacing: -0.008em;
}
.has-serif-font .gh-about-secondary {
font-family: var(--font-serif);
.has-serif-font:not([class*=" gh-font-heading"]):not([class^="gh-font-heading"]):not([class*=" gh-font-body"]):not([class^="gh-font-body"]) .gh-about-secondary {
font-family: var(--gh-font-body, var(--font-serif));
}
.has-mono-font .gh-about-secondary {
font-family: var(--font-mono);
.has-mono-font:not([class*=" gh-font-heading"]):not([class^="gh-font-heading"]):not([class*=" gh-font-body"]):not([class^="gh-font-body"]) .gh-about-secondary {
font-family: var(--gh-font-body, var(--font-mono));
}
.gh-about-primary + .gh-about-secondary {
@ -343,12 +347,12 @@ hr {
word-break: break-word;
}
.has-serif-font .gh-card-title {
font-family: var(--font-serif);
.has-serif-font:not([class*=" gh-font-heading"]):not([class^="gh-font-heading"]):not([class*=" gh-font-body"]):not([class^="gh-font-body"]) .gh-card-title {
font-family: var(--gh-font-heading, var(--font-serif));
}
.has-mono-font .gh-card-title {
font-family: var(--font-mono);
.has-mono-font:not([class*=" gh-font-heading"]):not([class^="gh-font-heading"]):not([class*=" gh-font-body"]):not([class^="gh-font-body"]) .gh-card-title {
font-family: var(--gh-font-heading, var(--font-mono));
}
.gh-card-link:hover .gh-card-title {
@ -488,12 +492,12 @@ hr {
letter-spacing: -0.005em;
}
.has-serif-font.has-typographic-feed .gh-card-excerpt {
font-family: var(--font-serif);
.has-serif-font.has-typographic-feed:not([class*=" gh-font-heading"]):not([class^="gh-font-heading"]):not([class*=" gh-font-body"]):not([class^="gh-font-body"]) .gh-card-excerpt {
font-family: var(--gh-font-body, var(--font-serif));
}
.has-mono-font.has-typographic-feed .gh-card-excerpt {
font-family: var(--font-mono);
.has-mono-font.has-typographic-feed:not([class*=" gh-font-heading"]):not([class^="gh-font-heading"]):not([class*=" gh-font-body"]):not([class^="gh-font-body"]) .gh-card-excerpt {
font-family: var(--gh-font-body, var(--font-mono));
}
.has-typographic-feed .gh-card-meta {
@ -597,30 +601,65 @@ hr {
flex-direction: column;
}
.gh-article-meta .gh-author-image-list {
display: flex;
margin-bottom: 12px;
margin-left: -2px;
}
.gh-article-meta .gh-author-image {
display: block;
width: 72px;
height: 72px;
margin-bottom: 16px;
margin-bottom: 0;
border: 2px solid var(--color-white);
}
.gh-article-meta .gh-author-name {
.gh-article-meta .gh-author-icon {
background-color: var(--color-light-gray);
}
.gh-article-meta .gh-author-image:hover {
opacity: 1;
}
.gh-article-meta .gh-author-image-list .gh-author-image + .gh-author-image {
margin-left: -20px;
}
.gh-article-meta .gh-author-image-list .gh-author-image:nth-child(1) {
z-index: 30;
}
.gh-article-meta .gh-author-image-list .gh-author-image:nth-child(2) {
z-index: 20;
}
.gh-article-meta .gh-author-image-list .gh-author-image:nth-child(3) {
z-index: 10;
}
.gh-article-meta .gh-author-name-list {
margin-bottom: -2px;
line-height: 1.35;
}
.gh-article-meta .gh-author-name-list a {
font-size: 1.9rem;
font-weight: 700;
letter-spacing: -0.01em;
}
.gh-article-meta .gh-author-name a {
color: var(--color-darker-gray);
text-decoration: none;
color: var(--color-darker-gray);
}
.gh-article-date {
margin-top: 4px;
font-size: 1.4rem;
font-weight: 480;
color: var(--color-secondary-text);
}
.gh-article-tag {
display: inline-block;
width: fit-content;
padding: 2px 12px;
margin-top: 20px;
@ -648,16 +687,12 @@ hr {
letter-spacing: -0.03em;
}
.page-template .no-image .gh-article-title {
grid-column: 4 / span 6;
.has-serif-font:not([class*=" gh-font-heading"]):not([class^="gh-font-heading"]):not([class*=" gh-font-body"]):not([class^="gh-font-body"]) .gh-article-title {
font-family: var(--gh-font-heading, var(--font-serif));
}
.has-serif-font .gh-article-title {
font-family: var(--font-serif);
}
.has-mono-font .gh-article-title {
font-family: var(--font-mono);
.has-mono-font:not([class*=" gh-font-heading"]):not([class^="gh-font-heading"]):not([class*=" gh-font-body"]):not([class^="gh-font-body"]) .gh-article-title {
font-family: var(--gh-font-heading, var(--font-mono));
}
.gh-article-excerpt {
@ -668,16 +703,12 @@ hr {
line-height: 1.45;
}
.page-template .no-image .gh-article-excerpt {
grid-column: 4 / span 6;
.has-serif-font:not([class*=" gh-font-heading"]):not([class^="gh-font-heading"]):not([class*=" gh-font-body"]):not([class^="gh-font-body"]) .gh-article-excerpt {
font-family: var(--gh-font-body, var(--font-serif));
}
.has-serif-font .gh-article-excerpt {
font-family: var(--font-serif);
}
.has-mono-font .gh-article-excerpt {
font-family: var(--font-mono);
.has-mono-font:not([class*=" gh-font-heading"]):not([class^="gh-font-heading"]):not([class*=" gh-font-body"]):not([class^="gh-font-body"]) .gh-article-excerpt {
font-family: var(--gh-font-body, var(--font-mono));
}
.gh-article-excerpt .emoji {
@ -705,16 +736,12 @@ hr {
font-weight: 800;
}
.gh-content > :is(p, ul, ol) {
font-weight: 480;
.has-serif-font:not([class*=" gh-font-heading"]):not([class^="gh-font-heading"]):not([class*=" gh-font-body"]):not([class^="gh-font-body"]) .gh-content > :is([id], p, ul, ol) {
font-family: var(--gh-font-body, var(--font-serif));
}
.has-serif-font .gh-content > :is([id], p, ul, ol) {
font-family: var(--font-serif);
}
.has-mono-font .gh-content > :is([id], p, ul, ol) {
font-family: var(--font-mono);
.has-mono-font:not([class*=" gh-font-heading"]):not([class^="gh-font-heading"]):not([class*=" gh-font-body"]):not([class^="gh-font-body"]) .gh-content > :is([id], p, ul, ol) {
font-family: var(--gh-font-body, var(--font-mono));
}
.gh-article-footer {
@ -742,11 +769,6 @@ hr {
grid-row-start: 2;
}
.gh-article-meta-inner {
flex-direction: row;
align-items: center;
}
.gh-article-meta .gh-author-image {
width: 64px;
height: 64px;
@ -757,10 +779,6 @@ hr {
.gh-article-meta-wrapper {
flex-grow: 1;
}
.gh-article-tag {
margin-top: 0;
}
}
@media (max-width: 767px) {
@ -810,12 +828,12 @@ h6:hover .anchor-link {
letter-spacing: -0.03em;
}
.has-serif-font .gh-cta-title {
font-family: var(--font-serif);
.has-serif-font:not([class*=" gh-font-heading"]):not([class^="gh-font-heading"]):not([class*=" gh-font-body"]):not([class^="gh-font-body"]) .gh-cta-title {
font-family: var(--gh-font-heading, var(--font-serif));
}
.has-mono-font .gh-cta-title {
font-family: var(--font-mono);
.has-mono-font:not([class*=" gh-font-heading"]):not([class^="gh-font-heading"]):not([class*=" gh-font-body"]):not([class^="gh-font-body"]) .gh-cta-title {
font-family: var(--gh-font-heading, var(--font-mono));
}
.gh-cta .gh-btn {
@ -836,12 +854,12 @@ h6:hover .anchor-link {
letter-spacing: -0.02em;
}
.has-serif-font .gh-navigation {
font-family: var(--font-serif);
.has-serif-font:not([class*=" gh-font-heading"]):not([class^="gh-font-heading"]):not([class*=" gh-font-body"]):not([class^="gh-font-body"]) .gh-navigation {
font-family: var(--gh-font-heading, var(--font-serif));
}
.has-mono-font .gh-navigation {
font-family: var(--font-mono);
.has-mono-font:not([class*=" gh-font-heading"]):not([class^="gh-font-heading"]):not([class*=" gh-font-body"]):not([class^="gh-font-body"]) .gh-navigation {
font-family: var(--gh-font-heading, var(--font-mono));
}
/* Comments
@ -856,12 +874,12 @@ h6:hover .anchor-link {
font-weight: 800;
}
.has-serif-font .gh-comments-title {
font-family: var(--font-serif);
.has-serif-font:not([class*=" gh-font-heading"]):not([class^="gh-font-heading"]):not([class*=" gh-font-body"]):not([class^="gh-font-body"]) .gh-comments-title {
font-family: var(--gh-font-heading, var(--font-serif));
}
.has-mono-font .gh-comments-title {
font-family: var(--font-mono);
.has-mono-font:not([class*=" gh-font-heading"]):not([class^="gh-font-heading"]):not([class*=" gh-font-body"]):not([class^="gh-font-body"]) .gh-comments-title {
font-family: var(--gh-font-heading, var(--font-mono));
}
/* Subscribe

View File

@ -1,5 +1,7 @@
const {series, parallel, watch, src, dest} = require('gulp');
const pump = require('pump');
const fs = require('fs');
const order = require('ordered-read-streams');
// gulp plugins and utils
const livereload = require('gulp-livereload');
@ -48,14 +50,24 @@ function css(done) {
], handleError(done));
}
function getJsFiles(version) {
const jsFiles = [
src(`node_modules/@tryghost/shared-theme-assets/assets/js/${version}/lib/**/*.js`),
src(`node_modules/@tryghost/shared-theme-assets/assets/js/${version}/main.js`),
];
if (fs.existsSync(`assets/js/lib`)) {
jsFiles.push(src(`assets/js/lib/*.js`));
}
jsFiles.push(src(`assets/js/main.js`));
return jsFiles;
}
function js(done) {
pump([
src([
'node_modules/@tryghost/shared-theme-assets/assets/js/v1/lib/**/*.js',
'node_modules/@tryghost/shared-theme-assets/assets/js/v1/main.js',
'assets/js/lib/*.js',
'assets/js/main.js'
], {sourcemaps: true}),
order(getJsFiles('v1'), {sourcemaps: true}),
concat('main.min.js'),
uglify(),
dest('assets/built/', {sourcemaps: '.'}),

View File

@ -89,19 +89,20 @@
"zip": "gulp zip"
},
"devDependencies": {
"@tryghost/shared-theme-assets": "2.4.2",
"autoprefixer": "10.4.16",
"@tryghost/shared-theme-assets": "2.5.0",
"autoprefixer": "10.4.20",
"beeper": "2.1.0",
"cssnano": "6.0.1",
"gscan": "4.39.4",
"gulp": "4.0.2",
"cssnano": "7.0.6",
"gscan": "4.46.0",
"gulp": "5.0.0",
"gulp-concat": "2.6.1",
"gulp-livereload": "4.0.2",
"gulp-postcss": "9.0.1",
"gulp-postcss": "10.0.0",
"gulp-uglify": "3.0.2",
"gulp-zip": "5.1.0",
"postcss": "8.4.31",
"ordered-read-streams": "2.0.0",
"postcss": "8.4.49",
"postcss-easy-import": "4.0.0",
"pump": "3.0.0"
"pump": "3.0.2"
}
}

View File

@ -0,0 +1 @@
<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" width="68" height="68"><g fill="none" fill-rule="evenodd"><path d="M3.513 18.998C4.749 15.504 8.082 13 12 13s7.251 2.504 8.487 5.998C18.47 21.442 15.417 23 12 23s-6.47-1.558-8.487-4.002zM12 12c2.21 0 4-2.79 4-5s-1.79-4-4-4-4 1.79-4 4 1.79 5 4 5z" fill="#FFF"/></g></svg>

After

Width:  |  Height:  |  Size: 331 B

View File

@ -27,7 +27,7 @@
{{/if}}
{{/match}}
<footer class="gh-card-meta">
<time class="gh-card-date" datetime="{{date format="YYYY-MM-DD"}}">{{date}}</time>
<time class="gh-card-date" datetime="{{date format="YYYY-MM-DD"}}">{{date format="DD MMM YYYY"}}</time>
{{#if reading_time}}
<span class="gh-card-length">{{reading_time}}</span>
{{/if}}

View File

@ -26,18 +26,23 @@
{{/unless}}
<aside class="gh-article-meta">
<div class="gh-article-meta-inner">
{{#primary_author}}
{{#if profile_image}}
<figure class="gh-author-image">
<img src="{{profile_image}}" alt="{{name}}">
</figure>
{{/if}}
<div class="gh-article-meta-wrapper">
<h4 class="gh-author-name">
<a href="{{url}}">{{name}}</a>
</h4>
{{/primary_author}}
<time class="gh-article-date" datetime="{{date format="YYYY-MM-DD"}}">{{date}}</time></div>
<div class="gh-author-image-list instapaper_ignore">
{{#foreach authors}}
<a class="gh-author-image" href="{{url}}">
{{#if profile_image}}
<img src="{{profile_image}}" alt="{{name}}">
{{else}}
<div class="gh-author-icon">{{> icons/avatar}}</div>
{{/if}}
</a>
{{/foreach}}
</div>
<div class="gh-article-meta-wrapper">
<div class="gh-author-name-list">
{{authors}}
</div>
<time class="gh-article-date" datetime="{{date format="YYYY-MM-DD"}}">{{date format="DD MMM YYYY"}}</time>
</div>
{{#if primary_tag}}
<a class="gh-article-tag" href="{{primary_tag.url}}" style="--tag-color: {{primary_tag.accent_color}}">{{primary_tag.name}}</a>
{{/if}}