Adding thumbnails to all screenshots.

This commit is contained in:
chris062689 2017-06-24 15:34:51 -04:00
parent 5dffd58561
commit 1a41025f95
3 changed files with 8 additions and 2 deletions

View File

@ -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'], () => (

View File

@ -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"

View File

@ -8,7 +8,7 @@
{{ $fileTitle := (index (split $fileTitle ".") 0) }}
<div class="popup-gallery col-lg-3 col-md-4 col-xs-6 thumb">
<a class="thumbnail" href="/images/screenshots/{{ .Name }}" title="{{ $fileTitle }}">
<img class="img-responsive nearest-neighbor" src="/images/screenshots/{{ .Name }}">
<img class="img-responsive nearest-neighbor" src="/images/screenshots/thumbs/{{ .Name }}">
</a>
</div>
{{ end }}