Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main'
Browse files Browse the repository at this point in the history
  • Loading branch information
li-sky committed Feb 14, 2025
2 parents 3b065ee + 940daf7 commit 6c7be49
Show file tree
Hide file tree
Showing 12 changed files with 139 additions and 32 deletions.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2013-2023 Ghost Foundation
Copyright (c) 2013-2025 Ghost Foundation

Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,4 @@ This repo is synced automatically with [TryGhost/Themes](https://github.com/TryG

# Copyright & License

Copyright (c) 2013-2023 Ghost Foundation - Released under the [MIT license](LICENSE).
Copyright (c) 2013-2025 Ghost Foundation - Released under the [MIT license](LICENSE).
3 changes: 1 addition & 2 deletions assets/built/main.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion assets/built/main.min.js.map

Large diffs are not rendered by default.

3 changes: 1 addition & 2 deletions assets/built/screen.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion assets/built/screen.css.map

Large diffs are not rendered by default.

97 changes: 91 additions & 6 deletions assets/css/screen.css
Original file line number Diff line number Diff line change
Expand Up @@ -240,8 +240,8 @@
letter-spacing: 0;
}

.has-serif-title .gh-topic-name {
font-family: var(--font-serif);
.has-serif-title:not([class*=" gh-font-heading"]):not([class^="gh-font-heading"]) .gh-topic-name {
font-family: var(--gh-font-heading, var(--font-serif));
}

.gh-topic-count {
Expand All @@ -252,6 +252,91 @@
border-radius: 32px;
}

.gh-recommendations .recommendations {
display: flex;
flex-direction: column;
gap: 26px;
padding: 0;
margin: 0;
list-style-type: none;
}

.gh-recommendations .recommendation:first-child {
margin-top: 4px;
}

.gh-recommendations .recommendation a {
display: grid;
grid-template-columns: 24px auto;
gap: 4px 12px;
}

.gh-recommendations .recommendation a:hover {
opacity: 1;
}

.gh-recommendations .recommendation-favicon {
grid-row: span 2;
width: 100%;
border-radius: 4px;
}

.gh-recommendations .recommendation-title {
margin-top: -2px;
font-size: 1.5rem;
font-weight: 600;
letter-spacing: -0.009em;
}

.gh-recommendations .recommendation a:hover .recommendation-title {
opacity: 0.8;
}

.gh-recommendations .recommendation-url {
order: 1;
overflow: hidden;
font-size: 1.4rem;
line-height: 1.25;
color: var(--color-secondary-text);
text-overflow: ellipsis;
}

.gh-recommendations .recommendation-description {
display: -webkit-box;
display: none;
grid-column: 2;
overflow-y: hidden;
font-size: 1.4rem;
line-height: 1.4;
color: var(--color-secondary-text);
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
}

.gh-recommendations button {
display: inline-flex;
gap: 2px;
align-items: center;
padding: 0;
margin-top: 24px;
font-size: 1.2rem;
font-weight: 550;
text-transform: uppercase;
letter-spacing: 0.025em;
cursor: pointer;
background-color: transparent;
border: 0;
}

.gh-recommendations button svg {
width: 12px;
margin-top: -1px;
}

.gh-recommendations button:hover {
opacity: 0.8;
}

.gh-subscribe {
padding: 7.2rem 0;
margin: 12rem 0 8rem;
Expand All @@ -270,8 +355,8 @@
color: #fff;
}

.has-serif-title .gh-subscribe-title {
font-family: var(--font-serif);
.has-serif-title:not([class*=" gh-font-heading"]):not([class^="gh-font-heading"]) .gh-subscribe-title {
font-family: var(--gh-font-heading, var(--font-serif));
letter-spacing: -0.01em;
}

Expand Down Expand Up @@ -337,10 +422,10 @@
}

.gh-article-meta {
margin-bottom: 2rem;
margin-bottom: 1.8rem;
font-size: 1.2rem;
font-weight: 500;
line-height: 1;
line-height: 1.5;
color: var(--color-secondary-text);
text-transform: uppercase;
}
Expand Down
24 changes: 18 additions & 6 deletions gulpfile.js
Original file line number Diff line number Diff line change
@@ -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');
Expand Down Expand Up @@ -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: '.'}),
Expand Down
13 changes: 12 additions & 1 deletion index.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<a class="gh-card-link" href="{{url}}">
<header class="gh-card-header">
<div class="gh-article-meta">
<span class="gh-card-date">Latest — <time datetime="{{date format="YYYY-MM-DD"}}">{{date}}</time></span>
<span class="gh-card-date">Latest — <time datetime="{{date format="YYYY-MM-DD"}}">{{date format="DD MMM YYYY"}}</time></span>
</div>
<h2 class="gh-article-title gh-card-title">{{title}}</h2>
</header>
Expand Down Expand Up @@ -117,6 +117,17 @@
</div>
</section>
{{/get}}

{{#if @site.recommendations_enabled}}
<section class="gh-section">
<h3 class="gh-section-title">Recommendations</h3>

<div class="gh-recommendations">
{{recommendations}}
<button data-portal="recommendations">See all {{> "icons/arrow-right"}}</button>
</div>
</section>
{{/if}}
</aside>
</div>
</div>
Expand Down
17 changes: 9 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,19 +65,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.47.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.5.2",
"postcss-easy-import": "4.0.0",
"pump": "3.0.0"
"pump": "3.0.2"
}
}
2 changes: 1 addition & 1 deletion partials/loop.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<div class="gh-card-excerpt">{{excerpt}}</div>

<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>
<span class="gh-card-duration">{{reading_time}}</span>
{{#if @site.comments_enabled}}
{{comment_count class="gh-card-comments"}}
Expand Down
4 changes: 2 additions & 2 deletions post.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@

<header class="gh-article-header gh-canvas">
<span class="gh-article-meta">
{{#primary_author}}By <a href="{{url}}">{{name}}</a>{{/primary_author}}
By {{authors}}
{{#if primary_tag}}
in
<a class="gh-article-tag" href="{{primary_tag.url}}">{{primary_tag.name}}</a>
{{/if}}
<time datetime="{{date format="YYYY-MM-DD"}}">{{date}}</time>
<time datetime="{{date format="YYYY-MM-DD"}}">{{date format="DD MMM YYYY"}}</time>
</span>

<h1 class="gh-article-title">{{title}}</h1>
Expand Down

0 comments on commit 6c7be49

Please sign in to comment.