Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Commit

Permalink
Add v2.9.0
Browse files Browse the repository at this point in the history
  • Loading branch information
YannickRe committed Dec 26, 2018
1 parent f13eb30 commit 744e184
Show file tree
Hide file tree
Showing 65 changed files with 1,477 additions and 735 deletions.
2 changes: 1 addition & 1 deletion content/themes/casper/assets/built/jquery.fitvids.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion content/themes/casper/assets/built/screen.css

Large diffs are not rendered by default.

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

Large diffs are not rendered by default.

39 changes: 24 additions & 15 deletions content/themes/casper/assets/css/screen.css
Original file line number Diff line number Diff line change
Expand Up @@ -411,10 +411,10 @@ The knock-on effect of this is ugly browser-scroll bars at the bottom, so 80px o
}

.post-card-image {
width: auto;
width: 100%;
height: 200px;
background: var(--lightgrey) no-repeat center center;
background-size: cover;
object-fit: cover;
}

.post-card-content-link {
Expand Down Expand Up @@ -595,46 +595,48 @@ The knock-on effect of this is ugly browser-scroll bars at the bottom, so 80px o

/* Special Styling for home page grid (below):
The first (most recent) post in the list is styled to be bigger than the others and take over the full width of the grid to give it more emphasis. Wrapped in a media query to make sure this only happens on large viewports / desktop-ish devices.
The first post in the list is styled to be bigger than the others and take over
the full width of the grid to give it more emphasis. Wrapped in a media query to
make sure this only happens on large viewports / desktop-ish devices.
*/

@media (min-width: 795px) {
.home-template .post-feed .post-card:nth-child(6n+1):not(.no-image) {
.post-card-large {
flex: 1 1 100%;
flex-direction: row;
}

.home-template .post-feed .post-card:nth-child(6n+1):not(.no-image) .post-card-image-link {
.post-card-large .post-card-image-link {
position: relative;
flex: 1 1 auto;
border-radius: 5px 0 0 5px;
}

.home-template .post-feed .post-card:nth-child(6n+1):not(.no-image) .post-card-image {
.post-card-large .post-card-image {
position: absolute;
width: 100%;
height: 100%;
}

.home-template .post-feed .post-card:nth-child(6n+1):not(.no-image) .post-card-content {
.post-card-large .post-card-content {
flex: 0 1 357px;
}

.home-template .post-feed .post-card:nth-child(6n+1):not(.no-image) h2 {
.post-card-large h2 {
font-size: 2.6rem;
}

.home-template .post-feed .post-card:nth-child(6n+1):not(.no-image) p {
.post-card-large p {
font-size: 1.8rem;
line-height: 1.55em;
}

.home-template .post-feed .post-card:nth-child(6n+1):not(.no-image) .post-card-content-link {
.post-card-large .post-card-content-link {
padding: 30px 40px 0;
}

.home-template .post-feed .post-card:nth-child(6n+1):not(.no-image) .post-card-meta {
.post-card-large .post-card-meta {
padding: 0 40px 30px;
}
}
Expand Down Expand Up @@ -709,22 +711,29 @@ The first (most recent) post in the list is styled to be bigger than the others

.post-full-image {
margin: 0 -10vw -165px;
height: 800px;
background: var(--lightgrey) center center;
background-size: cover;
border-radius: 5px;
overflow: hidden;
}

.post-full-image img {
width: 100%;
height: 800px;
object-fit: cover;
}

@media (max-width: 1170px) {
.post-full-image {
margin: 0 -4vw -100px;
height: 600px;
border-radius: 0;
}
.post-full-image img {
height: 600px;
}
}

@media (max-width: 800px) {
.post-full-image {
.post-full-image img {
height: 400px;
}
}
Expand Down
4 changes: 3 additions & 1 deletion content/themes/casper/author.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@

{{#author}}
{{!-- Everything inside the #author tags pulls data from the author --}}
<header class="site-header outer {{#if cover_image}}" style="background-image: url({{cover_image}}){{else}}no-cover{{/if}}">


{{> header background=feature_image}} {{!--Special header.hbs partial to generate the <header> tag--}}
<div class="inner">
{{> "site-nav"}}
<div class="site-header-content">
Expand Down
2 changes: 1 addition & 1 deletion content/themes/casper/error-404.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ It's a good idea to keep this template as minimal as possible in terms of both f
<div class="inner">
<nav class="site-nav-center">
{{#if @blog.logo}}
<a class="site-nav-logo" href="{{@blog.url}}"><img src="{{@blog.logo}}" alt="{{@blog.title}}" /></a>
<a class="site-nav-logo" href="{{@blog.url}}"><img src="{{img_url @blog.logo size="xs"}}" alt="{{@blog.title}}" /></a>
{{else}}
<a class="site-nav-logo" href="{{@blog.url}}">{{@blog.title}}</a>
{{/if}}
Expand Down
2 changes: 1 addition & 1 deletion content/themes/casper/error.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ You'll notice that we *don't* use any JavsScript, or ghost_head / ghost_foot in
<div class="inner">
<nav class="site-nav-center">
{{#if @blog.logo}}
<a class="site-nav-logo" href="{{@blog.url}}"><img src="{{@blog.logo}}" alt="{{@blog.title}}" /></a>
<a class="site-nav-logo" href="{{@blog.url}}"><img src="{{img_url @blog.logo size="xs"}}" alt="{{@blog.title}}" /></a>
{{else}}
<a class="site-nav-logo" href="{{@blog.url}}">{{@blog.title}}</a>
{{/if}}
Expand Down
5 changes: 2 additions & 3 deletions content/themes/casper/index.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,12 @@
{{!-- The tag above means: insert everything in this file
into the {body} of the default.hbs template --}}

{{!-- The big featured header, it uses blog cover image as a BG if available --}}
<header class="site-header outer {{#if @blog.cover_image}}" style="background-image: url({{@blog.cover_image}}){{else}}no-cover{{/if}}">
{{> header background=@blog.cover_image}} {{!--Special header.hbs partial to generate the <header> tag--}}
<div class="inner">
<div class="site-header-content">
<h1 class="site-title">
{{#if @blog.logo}}
<img class="site-logo" src="{{@blog.logo}}" alt="{{@blog.title}}" />
<img class="site-logo" src="{{img_url @blog.logo size="s"}}" alt="{{@blog.title}}" />
{{else}}
{{@blog.title}}
{{/if}}
Expand Down
24 changes: 22 additions & 2 deletions content/themes/casper/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "casper",
"description": "The default personal blogging theme for Ghost. Beautiful, minimal and responsive.",
"demo": "https://demo.ghost.io",
"version": "2.7.1",
"version": "2.8.0",
"engines": {
"ghost": ">=2.0.0"
},
Expand Down Expand Up @@ -57,6 +57,26 @@
"gulp-uglify": "3.0.1"
},
"config": {
"posts_per_page": 25
"posts_per_page": 25,
"image_sizes": {
"xxs": {
"width": 30
},
"xs": {
"width": 100
},
"s": {
"width": 300
},
"m": {
"width": 600
},
"l": {
"width": 1000
},
"xl": {
"width": 2000
}
}
}
}
15 changes: 14 additions & 1 deletion content/themes/casper/page.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,20 @@ into the {body} of the default.hbs template --}}
</header>

{{#if feature_image}}
<figure class="post-full-image" style="background-image: url({{feature_image}})">
<figure class="post-full-image">
{{!-- This is a responsive image, it loads different sizes depending on device
https://medium.freecodecamp.org/a-guide-to-responsive-images-with-ready-to-use-templates-c400bd65c433 --}}
<img
srcset="{{img_url feature_image size="s"}} 300w,
{{img_url feature_image size="m"}} 600w,
{{img_url feature_image size="l"}} 1000w,
{{img_url feature_image size="xl"}} 2000w"
sizes="(max-width: 800px) 400px,
(max-width: 1170px) 700px,
1400px"
src="{{img_url feature_image size="xl"}}"
alt="{{title}}"
/>
</figure>
{{/if}}

Expand Down
6 changes: 4 additions & 2 deletions content/themes/casper/partials/byline-multiple.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<div class="author-card">
<div class="basic-info">
{{#if profile_image}}
<img class="author-profile-image" src="{{profile_image}}" alt="{{name}}" />
<img class="author-profile-image" src="{{img_url profile_image size="xs"}}" alt="{{name}}" />
{{else}}
<div class="author-profile-image">{{> "icons/avatar"}}</div>
{{/if}}
Expand All @@ -29,7 +29,9 @@
</div>

{{#if profile_image}}
<a href="{{url}}" class="moving-avatar"><img class="author-profile-image" src="{{profile_image}}" alt="{{name}}" /></a>
<a href="{{url}}" class="moving-avatar">
<img class="author-profile-image" src="{{img_url profile_image size="xs"}}" alt="{{name}}" />
</a>
{{else}}
<a href="{{url}}" class="moving-avatar author-profile-image">{{> "icons/avatar"}}</a>
{{/if}}
Expand Down
2 changes: 1 addition & 1 deletion content/themes/casper/partials/byline-single.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

<section class="author-card">
{{#if profile_image}}
<img class="author-profile-image" src="{{profile_image}}" alt="{{name}}" />
<img class="author-profile-image" src="{{img_url profile_image size="xs"}}" alt="{{name}}" />
{{else}}
<span class="avatar-wrapper">{{> "icons/avatar"}}</span>
{{/if}}
Expand Down
Loading

0 comments on commit 744e184

Please sign in to comment.