Skip to content

Commit 266fb6c

Browse files
committed
update theme for Ghost v4.0
* bump gscan which checks theme compatibility * add newly required CSS classes, copied from Ghost.org documentation Signed-off-by: Alex Suraci <[email protected]>
1 parent ca48118 commit 266fb6c

File tree

5 files changed

+1032
-513
lines changed

5 files changed

+1032
-513
lines changed

blog/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"email": "[email protected]"
77
},
88
"engines": {
9-
"ghost-api": "v2"
9+
"ghost-api": "v4"
1010
},
1111
"keywords": ["ghost-theme"],
1212
"config": {

css/blog.css

+69
Original file line numberDiff line numberDiff line change
@@ -465,3 +465,72 @@ h1 .author-image {
465465
.kg-code-card pre {
466466
margin: 0;
467467
}
468+
.kg-bookmark-card {
469+
width: 100%;
470+
position: relative;
471+
}
472+
.kg-bookmark-container {
473+
display: flex;
474+
flex-wrap: wrap;
475+
flex-direction: row-reverse;
476+
color: currentColor;
477+
font-family: inherit;
478+
text-decoration: none;
479+
border: 1px solid rgba(0, 0, 0, 0.1);
480+
}
481+
.kg-bookmark-container:hover {
482+
text-decoration: none;
483+
}
484+
.kg-bookmark-content {
485+
flex-basis: 0;
486+
flex-grow: 999;
487+
padding: 20px;
488+
order: 1;
489+
}
490+
.kg-bookmark-title {
491+
font-weight: 600;
492+
}
493+
.kg-bookmark-metadata,
494+
.kg-bookmark-description {
495+
margin-top: 0.5em;
496+
}
497+
.kg-bookmark-metadata {
498+
align-items: center;
499+
white-space: nowrap;
500+
overflow: hidden;
501+
text-overflow: ellipsis;
502+
}
503+
.kg-bookmark-description {
504+
display: -webkit-box;
505+
-webkit-box-orient: vertical;
506+
-webkit-line-clamp: 2;
507+
overflow: hidden;
508+
}
509+
.kg-bookmark-icon {
510+
display: inline-block;
511+
width: 1em;
512+
height: 1em;
513+
vertical-align: text-bottom;
514+
margin-right: 0.5em;
515+
margin-bottom: 0.05em;
516+
}
517+
.kg-bookmark-thumbnail {
518+
display: flex;
519+
flex-basis: 24rem;
520+
flex-grow: 1;
521+
}
522+
.kg-bookmark-thumbnail img {
523+
max-width: 100%;
524+
height: auto;
525+
vertical-align: bottom;
526+
object-fit: cover;
527+
}
528+
.kg-bookmark-author {
529+
white-space: nowrap;
530+
text-overflow: ellipsis;
531+
overflow: hidden;
532+
}
533+
.kg-bookmark-publisher::before {
534+
content: "•";
535+
margin: 0 0.5em;
536+
}

less/blog.less

+82
Original file line numberDiff line numberDiff line change
@@ -234,3 +234,85 @@ h1 .author-image {
234234
.kg-code-card pre {
235235
margin: 0;
236236
}
237+
238+
.kg-bookmark-card {
239+
width: 100%;
240+
position: relative;
241+
}
242+
243+
.kg-bookmark-container {
244+
display: flex;
245+
flex-wrap: wrap;
246+
flex-direction: row-reverse;
247+
color: currentColor;
248+
font-family: inherit;
249+
text-decoration: none;
250+
border: 1px solid rgba(0, 0, 0, 0.1);
251+
}
252+
253+
.kg-bookmark-container:hover {
254+
text-decoration: none;
255+
}
256+
257+
.kg-bookmark-content {
258+
flex-basis: 0;
259+
flex-grow: 999;
260+
padding: 20px;
261+
order: 1;
262+
}
263+
264+
.kg-bookmark-title {
265+
font-weight: 600;
266+
}
267+
268+
.kg-bookmark-metadata,
269+
.kg-bookmark-description {
270+
margin-top: .5em;
271+
}
272+
273+
.kg-bookmark-metadata {
274+
align-items: center;
275+
white-space: nowrap;
276+
overflow: hidden;
277+
text-overflow: ellipsis;
278+
}
279+
280+
.kg-bookmark-description {
281+
display: -webkit-box;
282+
-webkit-box-orient: vertical;
283+
-webkit-line-clamp: 2;
284+
overflow: hidden;
285+
}
286+
287+
.kg-bookmark-icon {
288+
display: inline-block;
289+
width: 1em;
290+
height: 1em;
291+
vertical-align: text-bottom;
292+
margin-right: .5em;
293+
margin-bottom: .05em;
294+
}
295+
296+
.kg-bookmark-thumbnail {
297+
display: flex;
298+
flex-basis: 24rem;
299+
flex-grow: 1;
300+
}
301+
302+
.kg-bookmark-thumbnail img {
303+
max-width: 100%;
304+
height: auto;
305+
vertical-align: bottom;
306+
object-fit: cover;
307+
}
308+
309+
.kg-bookmark-author {
310+
white-space: nowrap;
311+
text-overflow: ellipsis;
312+
overflow: hidden;
313+
}
314+
315+
.kg-bookmark-publisher::before {
316+
content: "";
317+
margin: 0 .5em;
318+
}

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
},
1111
"dependencies": {
1212
"elm": "^0.19.0-bugfix6",
13-
"gscan": "^2.6.5",
13+
"gscan": "^4.0.2",
1414
"less": "^3.9.0"
1515
},
1616
"devDependencies": {

0 commit comments

Comments
 (0)