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

Commit

Permalink
Add v2.12.0
Browse files Browse the repository at this point in the history
  • Loading branch information
YannickRe committed Jan 22, 2019
1 parent 2d1493f commit 1174600
Show file tree
Hide file tree
Showing 72 changed files with 13,132 additions and 12,317 deletions.
15 changes: 0 additions & 15 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -254,21 +254,6 @@ var config = require('./core/server/config'),
}
},

// ### grunt-docker
// Generate documentation from code
docker: {
docs: {
dest: 'docs',
src: ['.'],
options: {
onlyUpdated: true,
exclude: 'node_modules,bower_components,content,core/client,*test,*doc*,' +
'*vendor,config.*.json,*buil*,.dist*,.idea,.git*,.travis.yml,.bower*,.editorconfig,.js*,*.md,' +
'MigratorConfig.js'
}
}
},

// ### grunt-contrib-clean
// Clean up files as part of other tasks
clean: {
Expand Down
74 changes: 41 additions & 33 deletions content/themes/casper/gulpfile.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
var gulp = require('gulp');
var pump = require('pump');

// gulp plugins and utils
var gutil = require('gulp-util');
var livereload = require('gulp-livereload');
var postcss = require('gulp-postcss');
var sourcemaps = require('gulp-sourcemaps');
var zip = require('gulp-zip');
var uglify = require('gulp-uglify');
var filter = require('gulp-filter');
var beeper = require('beeper');

// postcss plugins
var autoprefixer = require('autoprefixer');
Expand All @@ -16,23 +17,26 @@ var cssnano = require('cssnano');
var customProperties = require('postcss-custom-properties');
var easyimport = require('postcss-easy-import');

var swallowError = function swallowError(error) {
gutil.log(error.toString());
gutil.beep();
this.emit('end');
};

var nodemonServerInit = function () {
livereload.listen(1234);
};

function handleError(done) {
return function (err) {
if (err) {
beeper();
}
return done(err);
};
}

gulp.task('build', ['css', 'js'], function (/* cb */) {
return nodemonServerInit();
});

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

gulp.task('css', function () {
gulp.task('css', function (done) {
var processors = [
easyimport,
customProperties,
Expand All @@ -41,45 +45,49 @@ gulp.task('css', function () {
cssnano()
];

return gulp.src('assets/css/*.css')
.on('error', swallowError)
.pipe(sourcemaps.init())
.pipe(postcss(processors))
.pipe(sourcemaps.write('.'))
.pipe(gulp.dest('assets/built/'))
.pipe(livereload());
pump([
gulp.src('assets/css/*.css'),
sourcemaps.init(),
postcss(processors),
sourcemaps.write('.'),
gulp.dest('assets/built/'),
livereload()
], handleError(done));
});

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

return gulp.src('assets/js/*.js')
.on('error', swallowError)
.pipe(sourcemaps.init())
.pipe(jsFilter)
.pipe(uglify())
.pipe(jsFilter.restore)
.pipe(sourcemaps.write('.'))
.pipe(gulp.dest('assets/built/'))
.pipe(livereload());
pump([
gulp.src('assets/js/*.js'),
sourcemaps.init(),
jsFilter,
uglify(),
jsFilter.restore,
sourcemaps.write('.'),
gulp.dest('assets/built/'),
livereload()
], handleError(done));
});

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

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

return gulp.src([
'**',
'!node_modules', '!node_modules/**',
'!dist', '!dist/**'
])
.pipe(zip(filename))
.pipe(gulp.dest(targetDir));
pump([
gulp.src([
'**',
'!node_modules', '!node_modules/**',
'!dist', '!dist/**'
]),
zip(filename),
gulp.dest(targetDir)
], handleError(done));
});

gulp.task('default', ['build'], function () {
Expand Down
2 changes: 1 addition & 1 deletion content/themes/casper/index.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ into the {body} of the default.hbs template --}}
<div class="site-header-content">
<h1 class="site-title">
{{#if @site.logo}}
<img class="site-logo" src="{{img_url @site.logo size="s"}}" alt="{{@site.title}}" />
<img class="site-logo" src="{{img_url @site.logo size="l"}}" alt="{{@site.title}}" />
{{else}}
{{@site.title}}
{{/if}}
Expand Down
9 changes: 5 additions & 4 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.9.0",
"version": "2.9.1",
"engines": {
"ghost": ">=2.0.0",
"ghost-api": "v2"
Expand Down Expand Up @@ -42,20 +42,21 @@
"contributors": "https://github.com/TryGhost/Casper/graphs/contributors",
"devDependencies": {
"autoprefixer": "6.3.6",
"beeper": "^1.1.1",
"cssnano": "3.7.1",
"gscan": "^2.0.0",
"gulp": "3.9.1",
"gulp-filter": "5.1.0",
"gulp-livereload": "3.8.1",
"gulp-postcss": "6.1.1",
"gulp-sourcemaps": "1.6.0",
"gulp-util": "3.0.7",
"gulp-uglify": "3.0.1",
"gulp-watch": "4.3.8",
"gulp-zip": "4.0.0",
"postcss-color-function": "2.0.1",
"postcss-custom-properties": "5.0.1",
"postcss-easy-import": "1.0.1",
"gulp-filter": "5.1.0",
"gulp-uglify": "3.0.1"
"pump": "3.0.0"
},
"config": {
"posts_per_page": 25,
Expand Down
44 changes: 23 additions & 21 deletions content/themes/casper/partials/header.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -18,28 +18,30 @@ with a `no-image` class so we can style it accordingly.
background-image: url({{img_url background size='xl'}});
}
@media(max-width: 1000px) {
.responsive-header-img {
background-image: url({{img_url background size='l'}});
background-image: -webkit-image-set(
url({{img_url background size='l'}}) 1x,
url({{img_url background size='xl'}}) 2x
);
background-image: image-set(
url({{img_url background size='l'}}) 1x,
url({{img_url background size='xl'}}) 2x
);
.responsive-header-img {
background-image: url({{img_url background size='l'}});
background-image: -webkit-image-set(
url({{img_url background size='l'}}) 1x,
url({{img_url background size='xl'}}) 2x
);
background-image: image-set(
url({{img_url background size='l'}}) 1x,
url({{img_url background size='xl'}}) 2x
);
}
}
@media(max-width: 600px) {
.responsive-header-img {
background-image: url({{img_url background size='m'}});
background-image: -webkit-image-set(
url({{img_url background size='m'}}) 1x,
url({{img_url background size='l'}}) 2x
);
background-image: image-set(
url({{img_url background size='m'}}) 1x,
url({{img_url background size='l'}}) 2x
);
.responsive-header-img {
background-image: url({{img_url background size='m'}});
background-image: -webkit-image-set(
url({{img_url background size='m'}}) 1x,
url({{img_url background size='l'}}) 2x
);
background-image: image-set(
url({{img_url background size='m'}}) 1x,
url({{img_url background size='l'}}) 2x
);
}
}
</style>
<header class="site-header outer responsive-header-img">
Expand All @@ -48,4 +50,4 @@ with a `no-image` class so we can style it accordingly.

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

{{/if}}
{{/if}}
Loading

0 comments on commit 1174600

Please sign in to comment.