Skip to content

Commit 9c3219d

Browse files
committed
chore(upstream): merge TryGhost/Casper v5.6.0
2 parents dccff5f + 592226b commit 9c3219d

File tree

7 files changed

+70
-49
lines changed

7 files changed

+70
-49
lines changed

LICENSE

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
Copyright (c) 2013-2022 Ghost Foundation
2-
Copyright (c) 2022 Thomas Lamant
1+
Copyright (c) 2013-2023 Ghost Foundation
2+
Copyright (c) 2022-2023 Thomas Lamant
33

44
Permission is hereby granted, free of charge, to any person
55
obtaining a copy of this software and associated documentation

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,6 @@ Fork of the default theme for [Ghost](http://github.com/tryghost/ghost/). _Fanto
1818

1919
# Copyright & License
2020

21-
Copyright (c) 2013-2022 Ghost Foundation
21+
Copyright (c) 2013-2023 Ghost Foundation
2222
Copyright (c) 2022-2023 Thomas Lamant
2323
Released under the [MIT license](LICENSE).

assets/css/global.css

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -88,10 +88,6 @@ video {
8888
body {
8989
line-height: 1;
9090
}
91-
ol,
92-
ul {
93-
list-style: none;
94-
}
9591
blockquote,
9692
q {
9793
quotes: none;
@@ -343,15 +339,7 @@ ol ol,
343339
ul ul,
344340
ul ol,
345341
ol ul {
346-
margin: 0.5em 0 1em;
347-
}
348-
349-
ul {
350-
list-style: disc;
351-
}
352-
353-
ol {
354-
list-style: decimal;
342+
margin: 0.5em 0;
355343
}
356344

357345
ul,

assets/css/screen.css

Lines changed: 35 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1034,6 +1034,11 @@ production stylesheet in assets/built/screen.css
10341034
margin-top: 6px;
10351035
}
10361036

1037+
:is(.tag-template, .author-template) .post-card-large .post-card-excerpt {
1038+
display: block;
1039+
overflow-y: auto;
1040+
}
1041+
10371042
.post-card-meta {
10381043
display: flex;
10391044
align-items: center;
@@ -1222,20 +1227,19 @@ html.no-infinite-scroll .pagination {
12221227
/* ---------------------------------------------------------- */
12231228

12241229
.article {
1225-
padding: max(8vmin, 40px) 0 max(8vmin, 64px);
12261230
word-break: break-word;
12271231
}
12281232

1229-
.page-template .article {
1230-
padding-top: max(12vmin, 64px);
1233+
.post-template .article {
1234+
padding: max(8vmin, 40px) 0 max(8vmin, 64px);
12311235
}
12321236

1233-
.article-header {
1234-
padding: 0 0 max(6.4vmin, 40px) 0;
1237+
.post-template .article-header {
1238+
padding: 0 0 max(6.4vmin, 40px);
12351239
}
12361240

12371241
.page-template .article-header {
1238-
padding-bottom: max(3.2vmin, 28px);
1242+
padding: max(12vmin, 64px) 0 max(3.2vmin, 28px);
12391243
}
12401244

12411245
.article-tag {
@@ -1351,6 +1355,11 @@ headings, text, images and lists. We deal with cards lower down. */
13511355
margin-bottom: 0;
13521356
}
13531357

1358+
/* Remove space between full-width cards */
1359+
.gh-content > .kg-width-full + .kg-width-full:not(.kg-width-full.kg-card-hascaption + .kg-width-full) {
1360+
margin-top: 0;
1361+
}
1362+
13541363
/* [id] represents all headings h1-h6, reset all margins */
13551364
.gh-content > [id] {
13561365
margin: 0;
@@ -1401,6 +1410,14 @@ is the very first element in the post content */
14011410
line-height: 1.6em;
14021411
}
14031412

1413+
.page-template .gh-content:only-child > *:first-child:not(.kg-width-full) {
1414+
margin-top: max(12vmin, 64px);
1415+
}
1416+
1417+
.page-template .gh-content > *:last-child:not(.kg-width-full) {
1418+
margin-bottom: max(12vmin, 64px);
1419+
}
1420+
14041421
.gh-content .kg-callout-card .kg-callout-text,
14051422
.gh-content .kg-toggle-card .kg-toggle-content > ol,
14061423
.gh-content .kg-toggle-card .kg-toggle-content > ul,
@@ -1488,6 +1505,14 @@ is the very first element in the post content */
14881505
box-shadow: 0 2px 6px -2px rgba(0,0,0,.1), 0 0 1px rgba(0,0,0,.4);
14891506
}
14901507

1508+
.gh-content ol ol li {
1509+
list-style-type: lower-alpha;
1510+
}
1511+
1512+
.gh-content ol ol ol li {
1513+
list-style-type: lower-roman;
1514+
}
1515+
14911516
@media (max-width: 650px) {
14921517
.gh-content > blockquote:not([class]),
14931518
.gh-content > ol,
@@ -1525,11 +1550,9 @@ make sure they look good, and are given a bit of extra spacing. */
15251550
except for when immediately preceeded by a heading */
15261551
.gh-content :not(.kg-card):not([id]) + .kg-card {
15271552
margin-top: 6vmin;
1528-
margin-bottom: 0;
15291553
}
15301554
.gh-content .kg-card + :not(.kg-card) {
15311555
margin-top: 6vmin;
1532-
margin-bottom: 0;
15331556
}
15341557

15351558
/* This keeps small embeds centered */
@@ -2033,6 +2056,10 @@ iframe.instagram-media + script + :not([id]) {
20332056
background: color-mod(var(--color-darkgrey) l(-5%));
20342057
}
20352058

2059+
.page-template .site-footer {
2060+
margin-top: 0;
2061+
}
2062+
20362063
.site-footer .inner {
20372064
display: grid;
20382065
grid-gap: 40px;

default.hbs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@
88
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
99
<meta name="HandheldFriendly" content="True" />
1010
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
11+
12+
{{!-- Preload scripts --}}
13+
<link rel="preload" as="style" href="{{asset "built/screen.css"}}" />
14+
<link rel="preload" as="script" href="{{asset "built/casper.js"}}" />
1115

1216
{{!-- Theme assets - use the {asset} helper to reference styles & scripts,
1317
this will take care of caching and cache-busting automatically --}}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,4 +184,4 @@
184184
"@tryghost:theme"
185185
]
186186
}
187-
}
187+
}

page.hbs

Lines changed: 26 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -10,30 +10,32 @@ into the {body} tag of the default.hbs template --}}
1010
<main id="site-main" class="site-main">
1111
<article class="article {{post_class}}">
1212

13-
<header class="article-header gh-canvas">
14-
15-
<h1 class="article-title">{{title}}</h1>
16-
17-
{{#if feature_image}}
18-
<figure class="article-image">
19-
{{!-- This is a responsive image, it loads different sizes depending on device
20-
https://medium.freecodecamp.org/a-guide-to-responsive-images-with-ready-to-use-templates-c400bd65c433 --}}
21-
<img
22-
srcset="{{img_url feature_image size="s"}} 300w,
23-
{{img_url feature_image size="m"}} 600w,
24-
{{img_url feature_image size="l"}} 1000w,
25-
{{img_url feature_image size="xl"}} 2000w"
26-
sizes="(min-width: 1400px) 1400px, 92vw"
27-
src="{{img_url feature_image size="xl"}}"
28-
alt="{{#if feature_image_alt}}{{feature_image_alt}}{{else}}{{title}}{{/if}}"
29-
/>
30-
{{#if feature_image_caption}}
31-
<figcaption>{{feature_image_caption}}</figcaption>
32-
{{/if}}
33-
</figure>
34-
{{/if}}
35-
36-
</header>
13+
{{#match @page.show_title_and_feature_image}}
14+
<header class="article-header gh-canvas">
15+
16+
<h1 class="article-title">{{title}}</h1>
17+
18+
{{#if feature_image}}
19+
<figure class="article-image">
20+
{{!-- This is a responsive image, it loads different sizes depending on device
21+
https://medium.freecodecamp.org/a-guide-to-responsive-images-with-ready-to-use-templates-c400bd65c433 --}}
22+
<img
23+
srcset="{{img_url feature_image size="s"}} 300w,
24+
{{img_url feature_image size="m"}} 600w,
25+
{{img_url feature_image size="l"}} 1000w,
26+
{{img_url feature_image size="xl"}} 2000w"
27+
sizes="(min-width: 1400px) 1400px, 92vw"
28+
src="{{img_url feature_image size="xl"}}"
29+
alt="{{#if feature_image_alt}}{{feature_image_alt}}{{else}}{{title}}{{/if}}"
30+
/>
31+
{{#if feature_image_caption}}
32+
<figcaption>{{feature_image_caption}}</figcaption>
33+
{{/if}}
34+
</figure>
35+
{{/if}}
36+
37+
</header>
38+
{{/match}}
3739

3840
<section class="gh-content gh-canvas">
3941
{{content}}

0 commit comments

Comments
 (0)