From 1a41025f95d54ae7d119cd40725c799efe31581a Mon Sep 17 00:00:00 2001 From: chris062689 Date: Sat, 24 Jun 2017 15:34:51 -0400 Subject: [PATCH] Adding thumbnails to all screenshots. --- gulpfile.js | 7 ++++++- package.json | 1 + site/themes/citra-bs-theme/layouts/screenshots/single.html | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/gulpfile.js b/gulpfile.js index 5be03e3..3e5365c 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -9,6 +9,7 @@ const postcss = require('gulp-postcss'); const cssImport = require('postcss-import'); const cssnext = require('postcss-cssnext'); const cleanCSS = require('gulp-clean-css'); +const rename = require("gulp-rename"); const imageResize = require('gulp-image-resize'); @@ -65,7 +66,11 @@ gulp.task('images', ['hugo'], () => ( .pipe(gulp.dest('./')), gulp.src(`${distPath}/images/game/icons/*`, {base: './'}) .pipe(imageResize({ width: 48, height: 48, crop: true })) - .pipe(gulp.dest('./')) + .pipe(gulp.dest('./')), + + gulp.src(`${distPath}/images/screenshots/*`) + .pipe(imageResize({ width: 400, height: 240, crop: false })) + .pipe(gulp.dest(`${distPath}/images/screenshots/thumbs`)) )); gulp.task('html', ['hugo', 'css', 'js', 'images'], () => ( diff --git a/package.json b/package.json index 5d38fe6..3168db5 100644 --- a/package.json +++ b/package.json @@ -12,6 +12,7 @@ "gulp-image-resize": "^0.12.0", "gulp-md5-plus": "^0.2.5", "gulp-postcss": "^7.0.0", + "gulp-rename": "^1.2.2", "postcss-cssnext": "^2.9.0", "postcss-import": "^8.2.0", "rimraf": "^2.6.1" diff --git a/site/themes/citra-bs-theme/layouts/screenshots/single.html b/site/themes/citra-bs-theme/layouts/screenshots/single.html index 0e29dbd..7f53aa8 100644 --- a/site/themes/citra-bs-theme/layouts/screenshots/single.html +++ b/site/themes/citra-bs-theme/layouts/screenshots/single.html @@ -8,7 +8,7 @@ {{ $fileTitle := (index (split $fileTitle ".") 0) }} {{ end }}