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

Commit 1174600

Browse files
committed
Add v2.12.0
1 parent 2d1493f commit 1174600

File tree

72 files changed

+13132
-12317
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

72 files changed

+13132
-12317
lines changed

Gruntfile.js

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -254,21 +254,6 @@ var config = require('./core/server/config'),
254254
}
255255
},
256256

257-
// ### grunt-docker
258-
// Generate documentation from code
259-
docker: {
260-
docs: {
261-
dest: 'docs',
262-
src: ['.'],
263-
options: {
264-
onlyUpdated: true,
265-
exclude: 'node_modules,bower_components,content,core/client,*test,*doc*,' +
266-
'*vendor,config.*.json,*buil*,.dist*,.idea,.git*,.travis.yml,.bower*,.editorconfig,.js*,*.md,' +
267-
'MigratorConfig.js'
268-
}
269-
}
270-
},
271-
272257
// ### grunt-contrib-clean
273258
// Clean up files as part of other tasks
274259
clean: {

content/themes/casper/gulpfile.js

Lines changed: 41 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
var gulp = require('gulp');
2+
var pump = require('pump');
23

34
// gulp plugins and utils
4-
var gutil = require('gulp-util');
55
var livereload = require('gulp-livereload');
66
var postcss = require('gulp-postcss');
77
var sourcemaps = require('gulp-sourcemaps');
88
var zip = require('gulp-zip');
99
var uglify = require('gulp-uglify');
1010
var filter = require('gulp-filter');
11+
var beeper = require('beeper');
1112

1213
// postcss plugins
1314
var autoprefixer = require('autoprefixer');
@@ -16,23 +17,26 @@ var cssnano = require('cssnano');
1617
var customProperties = require('postcss-custom-properties');
1718
var easyimport = require('postcss-easy-import');
1819

19-
var swallowError = function swallowError(error) {
20-
gutil.log(error.toString());
21-
gutil.beep();
22-
this.emit('end');
23-
};
24-
2520
var nodemonServerInit = function () {
2621
livereload.listen(1234);
2722
};
2823

24+
function handleError(done) {
25+
return function (err) {
26+
if (err) {
27+
beeper();
28+
}
29+
return done(err);
30+
};
31+
}
32+
2933
gulp.task('build', ['css', 'js'], function (/* cb */) {
3034
return nodemonServerInit();
3135
});
3236

3337
gulp.task('generate', ['css', 'js']);
3438

35-
gulp.task('css', function () {
39+
gulp.task('css', function (done) {
3640
var processors = [
3741
easyimport,
3842
customProperties,
@@ -41,45 +45,49 @@ gulp.task('css', function () {
4145
cssnano()
4246
];
4347

44-
return gulp.src('assets/css/*.css')
45-
.on('error', swallowError)
46-
.pipe(sourcemaps.init())
47-
.pipe(postcss(processors))
48-
.pipe(sourcemaps.write('.'))
49-
.pipe(gulp.dest('assets/built/'))
50-
.pipe(livereload());
48+
pump([
49+
gulp.src('assets/css/*.css'),
50+
sourcemaps.init(),
51+
postcss(processors),
52+
sourcemaps.write('.'),
53+
gulp.dest('assets/built/'),
54+
livereload()
55+
], handleError(done));
5156
});
5257

53-
gulp.task('js', function () {
58+
gulp.task('js', function (done) {
5459
var jsFilter = filter(['**/*.js'], {restore: true});
5560

56-
return gulp.src('assets/js/*.js')
57-
.on('error', swallowError)
58-
.pipe(sourcemaps.init())
59-
.pipe(jsFilter)
60-
.pipe(uglify())
61-
.pipe(jsFilter.restore)
62-
.pipe(sourcemaps.write('.'))
63-
.pipe(gulp.dest('assets/built/'))
64-
.pipe(livereload());
61+
pump([
62+
gulp.src('assets/js/*.js'),
63+
sourcemaps.init(),
64+
jsFilter,
65+
uglify(),
66+
jsFilter.restore,
67+
sourcemaps.write('.'),
68+
gulp.dest('assets/built/'),
69+
livereload()
70+
], handleError(done));
6571
});
6672

6773
gulp.task('watch', function () {
6874
gulp.watch('assets/css/**', ['css']);
6975
});
7076

71-
gulp.task('zip', ['css', 'js'], function () {
77+
gulp.task('zip', ['css', 'js'], function (done) {
7278
var targetDir = 'dist/';
7379
var themeName = require('./package.json').name;
7480
var filename = themeName + '.zip';
7581

76-
return gulp.src([
77-
'**',
78-
'!node_modules', '!node_modules/**',
79-
'!dist', '!dist/**'
80-
])
81-
.pipe(zip(filename))
82-
.pipe(gulp.dest(targetDir));
82+
pump([
83+
gulp.src([
84+
'**',
85+
'!node_modules', '!node_modules/**',
86+
'!dist', '!dist/**'
87+
]),
88+
zip(filename),
89+
gulp.dest(targetDir)
90+
], handleError(done));
8391
});
8492

8593
gulp.task('default', ['build'], function () {

content/themes/casper/index.hbs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ into the {body} of the default.hbs template --}}
77
<div class="site-header-content">
88
<h1 class="site-title">
99
{{#if @site.logo}}
10-
<img class="site-logo" src="{{img_url @site.logo size="s"}}" alt="{{@site.title}}" />
10+
<img class="site-logo" src="{{img_url @site.logo size="l"}}" alt="{{@site.title}}" />
1111
{{else}}
1212
{{@site.title}}
1313
{{/if}}

content/themes/casper/package.json

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "casper",
33
"description": "The default personal blogging theme for Ghost. Beautiful, minimal and responsive.",
44
"demo": "https://demo.ghost.io",
5-
"version": "2.9.0",
5+
"version": "2.9.1",
66
"engines": {
77
"ghost": ">=2.0.0",
88
"ghost-api": "v2"
@@ -42,20 +42,21 @@
4242
"contributors": "https://github.com/TryGhost/Casper/graphs/contributors",
4343
"devDependencies": {
4444
"autoprefixer": "6.3.6",
45+
"beeper": "^1.1.1",
4546
"cssnano": "3.7.1",
4647
"gscan": "^2.0.0",
4748
"gulp": "3.9.1",
49+
"gulp-filter": "5.1.0",
4850
"gulp-livereload": "3.8.1",
4951
"gulp-postcss": "6.1.1",
5052
"gulp-sourcemaps": "1.6.0",
51-
"gulp-util": "3.0.7",
53+
"gulp-uglify": "3.0.1",
5254
"gulp-watch": "4.3.8",
5355
"gulp-zip": "4.0.0",
5456
"postcss-color-function": "2.0.1",
5557
"postcss-custom-properties": "5.0.1",
5658
"postcss-easy-import": "1.0.1",
57-
"gulp-filter": "5.1.0",
58-
"gulp-uglify": "3.0.1"
59+
"pump": "3.0.0"
5960
},
6061
"config": {
6162
"posts_per_page": 25,

content/themes/casper/partials/header.hbs

Lines changed: 23 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -18,28 +18,30 @@ with a `no-image` class so we can style it accordingly.
1818
background-image: url({{img_url background size='xl'}});
1919
}
2020
@media(max-width: 1000px) {
21-
.responsive-header-img {
22-
background-image: url({{img_url background size='l'}});
23-
background-image: -webkit-image-set(
24-
url({{img_url background size='l'}}) 1x,
25-
url({{img_url background size='xl'}}) 2x
26-
);
27-
background-image: image-set(
28-
url({{img_url background size='l'}}) 1x,
29-
url({{img_url background size='xl'}}) 2x
30-
);
21+
.responsive-header-img {
22+
background-image: url({{img_url background size='l'}});
23+
background-image: -webkit-image-set(
24+
url({{img_url background size='l'}}) 1x,
25+
url({{img_url background size='xl'}}) 2x
26+
);
27+
background-image: image-set(
28+
url({{img_url background size='l'}}) 1x,
29+
url({{img_url background size='xl'}}) 2x
30+
);
31+
}
3132
}
3233
@media(max-width: 600px) {
33-
.responsive-header-img {
34-
background-image: url({{img_url background size='m'}});
35-
background-image: -webkit-image-set(
36-
url({{img_url background size='m'}}) 1x,
37-
url({{img_url background size='l'}}) 2x
38-
);
39-
background-image: image-set(
40-
url({{img_url background size='m'}}) 1x,
41-
url({{img_url background size='l'}}) 2x
42-
);
34+
.responsive-header-img {
35+
background-image: url({{img_url background size='m'}});
36+
background-image: -webkit-image-set(
37+
url({{img_url background size='m'}}) 1x,
38+
url({{img_url background size='l'}}) 2x
39+
);
40+
background-image: image-set(
41+
url({{img_url background size='m'}}) 1x,
42+
url({{img_url background size='l'}}) 2x
43+
);
44+
}
4345
}
4446
</style>
4547
<header class="site-header outer responsive-header-img">
@@ -48,4 +50,4 @@ with a `no-image` class so we can style it accordingly.
4850

4951
<header class="site-header outer no-image">
5052

51-
{{/if}}
53+
{{/if}}

0 commit comments

Comments
 (0)