ghost 4.25.0 → 4.27.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. package/content/themes/casper/assets/built/screen.css +1 -1
  2. package/content/themes/casper/assets/built/screen.css.map +1 -1
  3. package/content/themes/casper/assets/css/screen.css +54 -10
  4. package/content/themes/casper/package.json +1 -1
  5. package/core/app.js +8 -4
  6. package/core/boot.js +50 -23
  7. package/core/built/assets/{chunk.3.8f95b516d88ff4eec64c.js → chunk.3.e54be01b5124e4e27958.js} +7 -7
  8. package/core/built/assets/ghost-dark-ae67fe157509b6e82c607ba560fc52e9.css +1 -0
  9. package/core/built/assets/{ghost.min-bc72f685c1c9adc9885925c1412435a5.js → ghost.min-2d534cce15c43c646814b26f4beefb78.js} +134 -131
  10. package/core/built/assets/ghost.min-b1e58e098721e467388682a85a7c187d.css +1 -0
  11. package/core/built/assets/{vendor.min-d1234c632a54502777c34e50752fa3fc.js → vendor.min-e433aa7d5620e7837f30e170cd43f84e.js} +597 -563
  12. package/core/frontend/apps/amp/lib/views/amp.hbs +67 -0
  13. package/core/frontend/helpers/url.js +18 -1
  14. package/core/frontend/src/cards/css/audio.css +258 -0
  15. package/core/frontend/src/cards/css/blockquote.css +23 -0
  16. package/core/frontend/src/cards/css/callout.css +13 -4
  17. package/core/frontend/src/cards/css/product.css +101 -0
  18. package/core/frontend/src/cards/css/toggle.css +42 -20
  19. package/core/frontend/src/cards/js/audio.js +147 -0
  20. package/core/frontend/web/site.js +1 -1
  21. package/core/server/notify.js +1 -2
  22. package/core/server/services/mega/template.js +31 -5
  23. package/core/server/services/members/api.js +2 -2
  24. package/core/server/services/members/emails/signup-paid.js +4 -4
  25. package/core/server/services/nft-oembed.js +1 -1
  26. package/core/server/services/oembed.js +9 -1
  27. package/core/server/services/twitter-embed.js +3 -1
  28. package/core/server/web/admin/views/default-prod.html +4 -4
  29. package/core/server/web/admin/views/default.html +4 -4
  30. package/core/server/web/parent/app.js +2 -22
  31. package/core/server/web/parent/backend.js +2 -0
  32. package/core/shared/express.js +1 -1
  33. package/core/shared/labs.js +6 -4
  34. package/package.json +36 -36
  35. package/yarn.lock +362 -447
  36. package/core/built/assets/ghost-dark-d690e732e17ffc794e2e59c1467ca282.css +0 -1
  37. package/core/built/assets/ghost.min-043bb7480a0810109b130f13b2a4235e.css +0 -1
@@ -281,6 +281,19 @@
281
281
  background: var(--ghost-accent-color, #1292EE);
282
282
  }
283
283
 
284
+ .post-content blockquote.kg-blockquote-alt {
285
+ font-size: 1.2em;
286
+ font-style: italic;
287
+ line-height: 1.6em;
288
+ text-align: center;
289
+ color: #738a94;
290
+ padding: 0.75em 3em 1.25em;
291
+ }
292
+
293
+ .post-content blockquote.kg-blockquote-alt::before {
294
+ display: none;
295
+ }
296
+
284
297
  .post-content :not(.kg-card):not([id]) + .kg-card {
285
298
  margin-top: 40px;
286
299
  }
@@ -569,6 +582,60 @@
569
582
  color: #fff;
570
583
  }
571
584
 
585
+ .kg-callout-card {
586
+ display: flex;
587
+ padding: 20px 28px;
588
+ border-radius: 3px;
589
+ }
590
+
591
+ .kg-callout-card-grey {
592
+ background: rgba(124, 139, 154, 0.13);
593
+ }
594
+
595
+ .kg-callout-card-white {
596
+ background: transparent;
597
+ box-shadow: inset 0 0 0 1px rgba(124, 139, 154, 0.25);
598
+ }
599
+
600
+ .kg-callout-card-blue {
601
+ background: rgba(33, 172, 232, 0.12);
602
+ }
603
+
604
+ .kg-callout-card-green {
605
+ background: rgba(52, 183, 67, 0.12);
606
+ }
607
+
608
+ .kg-callout-card-yellow {
609
+ background: rgba(240, 165, 15, 0.13);
610
+ }
611
+
612
+ .kg-callout-card-red {
613
+ background: rgba(209, 46, 46, 0.11);
614
+ }
615
+
616
+ .kg-callout-card-pink {
617
+ background: rgba(225, 71, 174, 0.11);
618
+ }
619
+
620
+ .kg-callout-card-purple {
621
+ background: rgba(135, 85, 236, 0.12);
622
+ }
623
+
624
+ .kg-callout-card-accent {
625
+ background: var(--ghost-accent-color);
626
+ color: #fff;
627
+ }
628
+
629
+ .kg-callout-card-accent a {
630
+ color: #fff;
631
+ }
632
+
633
+ .kg-callout-emoji {
634
+ padding-right: 16px;
635
+ line-height: 1.3;
636
+ font-size: 1.25em;
637
+ }
638
+
572
639
  .kg-width-full.kg-card-hascaption {
573
640
  display: grid;
574
641
  grid-template-columns: inherit;
@@ -6,6 +6,9 @@
6
6
 
7
7
  const {metaData} = require('../services/proxy');
8
8
  const {SafeString} = require('../services/rendering');
9
+ const logging = require('@tryghost/logging');
10
+ const sentry = require('../../shared/sentry');
11
+ const errors = require('@tryghost/errors');
9
12
 
10
13
  const {getMetaDataUrl} = metaData;
11
14
 
@@ -13,7 +16,21 @@ module.exports = function url(options) {
13
16
  const absolute = options && options.hash.absolute && options.hash.absolute !== 'false';
14
17
  let outputUrl = getMetaDataUrl(this, absolute);
15
18
 
16
- outputUrl = encodeURI(decodeURI(outputUrl));
19
+ try {
20
+ outputUrl = encodeURI(decodeURI(outputUrl));
21
+ } catch (err) {
22
+ // Happens when the outputURL contains an invalid URI character like "%%" or "%80"
23
+
24
+ // Send the error not to be blind to these
25
+ const error = new errors.IncorrectUsageError({
26
+ message: `The url "${outputUrl}" couldn't be escaped correctly`,
27
+ err: err
28
+ });
29
+ sentry.captureException(error);
30
+ logging.error(error);
31
+
32
+ return new SafeString('');
33
+ }
17
34
 
18
35
  return new SafeString(outputUrl);
19
36
  };
@@ -0,0 +1,258 @@
1
+ .kg-audio-card {
2
+ display: flex;
3
+ width: 100%;
4
+ min-height: 96px;
5
+ box-shadow: inset 0 0 0 1px rgba(124, 139, 154, 0.25);
6
+ }
7
+
8
+ .kg-audio-thumbnail {
9
+ width: 80px;
10
+ margin: 8px;
11
+ object-fit: cover;
12
+ aspect-ratio: 1/1;
13
+ border-radius: 3px;
14
+ }
15
+
16
+ .kg-player-container {
17
+ position: relative;
18
+ display: flex;
19
+ flex-direction: column;
20
+ justify-content: space-between;
21
+ width: 100%;
22
+ --seek-before-width: 0%;
23
+ --volume-before-width: 100%;
24
+ --buffered-width: 0%;
25
+ }
26
+
27
+ .kg-audio-title {
28
+ width: 100%;
29
+ margin: 8px 0 0 0;
30
+ padding: 8px 12px 0;
31
+ border: none;
32
+ font-family: inherit;
33
+ font-size: 1em;
34
+ font-weight: 700;
35
+ background: transparent;
36
+ }
37
+
38
+ .kg-player {
39
+ display: flex;
40
+ flex-grow: 1;
41
+ align-items: center;
42
+ padding: 8px 12px;
43
+ }
44
+
45
+ .kg-audio-current-time {
46
+ min-width: 38px;
47
+ padding: 0 4px;
48
+ font-family: inherit;
49
+ font-size: .85em;
50
+ font-weight: 500;
51
+ line-height: 1.4em;
52
+ }
53
+
54
+ .kg-audio-time {
55
+ color: #ababab;
56
+ font-family: inherit;
57
+ font-size: .85em;
58
+ font-weight: 500;
59
+ line-height: 1.4em;
60
+ }
61
+
62
+ .kg-audio-duration {
63
+ padding: 0 4px;
64
+ }
65
+
66
+ .kg-audio-play-icon,
67
+ .kg-audio-pause-icon {
68
+ position: relative;
69
+ bottom: 1px;
70
+ padding: 0px 4px 0 0;
71
+ background: transparent;
72
+ }
73
+
74
+ .kg-audio-hide {
75
+ display: none;
76
+ }
77
+
78
+ .kg-audio-play-icon svg,
79
+ .kg-audio-pause-icon svg {
80
+ width: 14px;
81
+ height: 14px;
82
+ fill: currentColor;
83
+ }
84
+
85
+ .kg-audio-seek-slider {
86
+ flex-grow: 1;
87
+ margin: 0 4px;
88
+ }
89
+
90
+ .kg-audio-playback-rate {
91
+ width: 37px;
92
+ padding: 0 4px;
93
+ font-family: inherit;
94
+ font-size: .85em;
95
+ font-weight: 600;
96
+ line-height: 1.4em;
97
+ text-align: left;
98
+ background: transparent;
99
+ }
100
+
101
+ .kg-audio-mute-icon,
102
+ .kg-audio-unmute-icon {
103
+ position: relative;
104
+ bottom: 1px;
105
+ padding: 0 4px;
106
+ background: transparent;
107
+ }
108
+
109
+ .kg-audio-mute-icon svg,
110
+ .kg-audio-unmute-icon svg {
111
+ width: 16px;
112
+ height: 16px;
113
+ fill: currentColor;
114
+ }
115
+
116
+ .kg-audio-volume-slider {
117
+ width: 80px;
118
+ }
119
+
120
+ .kg-audio-seek-slider::before {
121
+ content: "";
122
+ position: absolute;
123
+ left: 0;
124
+ width: var(--seek-before-width) !important;
125
+ height: 4px;
126
+ cursor: pointer;
127
+ background-color: currentColor;
128
+ border-radius: 2px;
129
+ }
130
+
131
+ .kg-audio-volume-slider::before {
132
+ content: "";
133
+ position: absolute;
134
+ left: 0;
135
+ width: var(--volume-before-width) !important;
136
+ height: 4px;
137
+ cursor: pointer;
138
+ background-color: currentColor;
139
+ border-radius: 2px;
140
+ }
141
+
142
+ /* Resetting browser styles
143
+ /* --------------------------------------------------------------- */
144
+
145
+ .kg-player-container input[type=range] {
146
+ position: relative;
147
+ -webkit-appearance: none;
148
+ background: transparent;
149
+ }
150
+
151
+ .kg-player-container input[type=range]:focus {
152
+ outline: none;
153
+ }
154
+
155
+ .kg-player-container input[type=range]::-webkit-slider-thumb {
156
+ -webkit-appearance: none;
157
+ }
158
+
159
+ .kg-player-container input[type=range]::-ms-track {
160
+ cursor: pointer;
161
+ border-color: transparent;
162
+ color: transparent;
163
+ background: transparent;
164
+ }
165
+
166
+ /* Chrome & Safari styles
167
+ /* --------------------------------------------------------------- */
168
+
169
+ .kg-player-container input[type="range"]::-webkit-slider-runnable-track {
170
+ width: 100%;
171
+ height: 4px;
172
+ cursor: pointer;
173
+ background: rgba(124, 139, 154, 0.25);
174
+ border-radius: 2px;
175
+ }
176
+
177
+ .kg-player-container input[type="range"]::-webkit-slider-thumb {
178
+ position: relative;
179
+ box-sizing: content-box;
180
+ width: 12px;
181
+ height: 12px;
182
+ margin: -5px 0 0 0;
183
+ border: 0;
184
+ cursor: pointer;
185
+ background: #fff;
186
+ border-radius: 50%;
187
+ box-shadow: 0 0 0 1px rgba(0,0,0,.08), 0 1px 4px rgba(0,0,0,0.24);
188
+ }
189
+
190
+ .kg-player-container input[type="range"]:active::-webkit-slider-thumb {
191
+ transform: scale(1.2);
192
+ }
193
+
194
+ /* Firefox styles
195
+ /* --------------------------------------------------------------- */
196
+
197
+ .kg-player-container input[type="range"]::-moz-range-track {
198
+ width: 100%;
199
+ height: 4px;
200
+ cursor: pointer;
201
+ background: rgba(124, 139, 154, 0.25);
202
+ border-radius: 2px;
203
+ }
204
+
205
+ .kg-player-container input[type="range"]::-moz-range-progress {
206
+ background: currentColor;
207
+ border-radius: 2px;
208
+ }
209
+
210
+ .kg-player-container input[type="range"]::-moz-range-thumb {
211
+ box-sizing: content-box;
212
+ width: 12px;
213
+ height: 12px;
214
+ border: 0;
215
+ cursor: pointer;
216
+ background: #fff;
217
+ border-radius: 50%;
218
+ box-shadow: 0 0 0 1px rgba(0,0,0,.08), 0 1px 4px rgba(0,0,0,0.24);
219
+ }
220
+
221
+ .kg-player-container input[type="range"]:active::-moz-range-thumb {
222
+ transform: scale(1.2);
223
+ }
224
+
225
+ /* Edge & IE styles
226
+ /* --------------------------------------------------------------- */
227
+
228
+ .kg-player-container input[type="range"]::-ms-track {
229
+ width: 100%;
230
+ height: 3px;
231
+ border: solid transparent;
232
+ color: transparent;
233
+ cursor: pointer;
234
+ background: transparent;
235
+ }
236
+
237
+ .kg-player-container input[type="range"]::-ms-fill-lower {
238
+ background: #fff;
239
+ }
240
+
241
+ .kg-player-container input[type="range"]::-ms-fill-upper {
242
+ background: currentColor;
243
+ }
244
+
245
+ .kg-player-container input[type="range"]::-ms-thumb {
246
+ box-sizing: content-box;
247
+ width: 12px;
248
+ height: 12px;
249
+ border: 0;
250
+ cursor: pointer;
251
+ background: #fff;
252
+ border-radius: 50%;
253
+ box-shadow: 0 0 0 1px rgba(0,0,0,.08), 0 1px 4px rgba(0,0,0,0.24);
254
+ }
255
+
256
+ .kg-player-container input[type="range"]:active::-ms-thumb {
257
+ transform: scale(1.2);
258
+ }
@@ -0,0 +1,23 @@
1
+ .kg-blockquote-alt {
2
+ font-size: 1.5em;
3
+ font-style: italic;
4
+ line-height: 1.7em;
5
+ text-align: center;
6
+ padding: 0 2.5em;
7
+ }
8
+
9
+ @media (max-width: 800px) {
10
+ .kg-blockquote-alt {
11
+ font-size: 1.4em;
12
+ padding-left: 2em;
13
+ padding-right: 2em;
14
+ }
15
+ }
16
+
17
+ @media (max-width: 600px) {
18
+ .kg-blockquote-alt {
19
+ font-size: 1.2em;
20
+ padding-left: 1.75em;
21
+ padding-right: 1.75em;
22
+ }
23
+ }
@@ -1,6 +1,6 @@
1
1
  .kg-callout-card {
2
2
  display: flex;
3
- padding: 20px 28px;
3
+ padding: 1.2em 1.6em;
4
4
  border-radius: 3px;
5
5
  }
6
6
 
@@ -42,8 +42,17 @@
42
42
  color: #fff;
43
43
  }
44
44
 
45
+ .kg-callout-card-accent a {
46
+ color: #fff;
47
+ }
48
+
45
49
  .kg-callout-emoji {
46
- padding-right: 16px;
47
- line-height: 1.6;
48
- font-size: 2rem;
50
+ padding-right: .8em;
51
+ line-height: 1.3em;
52
+ font-size: 1.2em;
49
53
  }
54
+
55
+ .kg-callout-text {
56
+ font-size: .95em;
57
+ line-height: 1.5em;
58
+ }
@@ -0,0 +1,101 @@
1
+ .kg-product-card-container {
2
+ display: flex;
3
+ background: transparent;
4
+ box-shadow: inset 0 0 0 1px rgb(124 139 154 / 25%);
5
+ border-radius: 5px;
6
+ flex-direction: column;
7
+ text-decoration: none;
8
+ max-width: 550px;
9
+ padding: 20px;
10
+ width: 100%;
11
+ }
12
+
13
+ .kg-product-card {
14
+ align-items: center;
15
+ display: flex;
16
+ flex-direction: column;
17
+ width: 100%;
18
+ }
19
+
20
+ .kg-product-card-image {
21
+ margin-bottom: 1.6rem;
22
+ }
23
+
24
+ .kg-product-card-header {
25
+ display: flex;
26
+ align-items: flex-start;
27
+ gap: 8px;
28
+ flex-wrap: wrap;
29
+ justify-content: space-between;
30
+ }
31
+
32
+ .kg-product-card-title-container {
33
+ flex: 2 1 250px;
34
+ }
35
+
36
+ .kg-product-card-title {
37
+ text-decoration: none;
38
+ font-weight: 700;
39
+ font-size: 1.4em;
40
+ margin-top: 0;
41
+ margin-bottom: 0;
42
+ line-height: 1.4em;
43
+ }
44
+
45
+ .kg-product-card-description {
46
+ font-size: 1em;
47
+ line-height: 1.6em;
48
+ opacity: .7;
49
+ margin-top: 8px;
50
+ }
51
+
52
+ .kg-product-card-button {
53
+ width: 100%;
54
+ margin-top: 16px;
55
+ }
56
+
57
+ .kg-product-card-rating {
58
+ display: flex;
59
+ align-items: center;
60
+ flex: 0 0 100px;
61
+ }
62
+
63
+ .kg-product-card-rating-star {
64
+ display: flex;
65
+ align-items: center;
66
+ justify-content: center;
67
+ height: 32px;
68
+ width: 20px;
69
+ }
70
+
71
+ .kg-product-card-rating-star svg {
72
+ width: 16px;
73
+ height: 16px;
74
+ fill: #fff;
75
+ }
76
+
77
+ .kg-product-card-rating-edit .kg-product-card-rating-star:hover {
78
+ opacity: 0.7;
79
+ }
80
+
81
+ .kg-product-card-rating-edit {
82
+ background: none;
83
+ display: flex;
84
+ align-items: center;
85
+ }
86
+
87
+ .kg-product-card-rating-preview {
88
+ display: flex;
89
+ }
90
+
91
+ .kg-product-card-rating-star svg {
92
+ fill: #ebeef0;
93
+ }
94
+
95
+ .kg-product-card-rating-active.kg-product-card-rating-star svg {
96
+ fill: #394047;
97
+ }
98
+
99
+ .kg-product-card-button {
100
+ justify-content: center;
101
+ }
@@ -1,8 +1,30 @@
1
+ .kg-toggle-card+.kg-toggle-card {
2
+ margin-top: 1em;
3
+ }
4
+
1
5
  .kg-toggle-card[data-kg-toggle-state="close"] .kg-toggle-content{
2
- visibility: hidden;
6
+ height: 0;
7
+ overflow: hidden;
8
+ transition: opacity .5s ease, top .35s ease;
3
9
  opacity: 0;
4
- max-height: 0;
5
- padding-top: 0px;
10
+ top: -0.5em;
11
+ position: relative;
12
+ }
13
+
14
+ .kg-toggle-content {
15
+ height: auto;
16
+ opacity: 1;
17
+ transition: opacity 1s ease, top .35s ease;
18
+ top: 0;
19
+ position: relative;
20
+ }
21
+
22
+ .kg-toggle-content p:first-of-type {
23
+ margin-top: 0.5em;
24
+ }
25
+
26
+ .kg-toggle-content p {
27
+ font-size: 0.95em;
6
28
  }
7
29
 
8
30
  .kg-toggle-card[data-kg-toggle-state="close"] svg {
@@ -13,11 +35,10 @@
13
35
  background: transparent;
14
36
  box-shadow: inset 0 0 0 1px rgba(124, 139, 154, 0.25);
15
37
  border-radius: 4px;
16
- padding: 20px;
38
+ padding: 1.2em;
17
39
  }
18
40
 
19
41
  .kg-toggle-heading {
20
- font-weight: 600;
21
42
  cursor: pointer;
22
43
  display: flex;
23
44
  justify-content: space-between;
@@ -30,29 +51,30 @@
30
51
  display: flex;
31
52
  justify-content: center;
32
53
  align-items: center;
33
- margin-left: 16px;
54
+ margin-left: 1em;
55
+ background: none;
56
+ border: 0;
34
57
  }
35
58
 
36
59
  .kg-toggle-heading svg {
37
60
  width: 14px;
38
61
  color: rgba(124, 139, 154, 0.5);
39
- transition: transform 0.3s;
62
+ transition: all 0.3s;
40
63
  transform: rotate(-180deg);
41
64
  }
42
65
 
66
+ .kg-toggle-heading path {
67
+ fill: none;
68
+ stroke: currentcolor;
69
+ stroke-linecap: round;
70
+ stroke-linejoin: round;
71
+ stroke-width: 1.5;
72
+ fill-rule: evenodd;
73
+ }
74
+
43
75
  .kg-toggle-heading-text {
44
76
  margin-top: 0;
45
77
  margin-bottom: 0;
46
- }
47
-
48
- .kg-toggle-content {
49
- transition: all .3s;
50
- padding-top: 1.5rem;
51
- max-height: 100vh;
52
- overflow: hidden;
53
- opacity: 1;
54
- }
55
-
56
- .kg-toggle-content > *+* {
57
-
58
- }
78
+ line-height: 1.3em;
79
+ font-size: 1.1em;
80
+ }