ArticleGrid img

This commit is contained in:
tmshv committed 2020-02-27 17:12:15 +03:00
1 parent b96e06068e
commit f08d577e11
2 files changed
+3 -3

No files matched your search

+1
View File
@@ -5,6 +5,7 @@ module.exports = withCss(withSass({
exportTrailingSlash: true,
env: {
APP_ARTICLES_PAGE_SIZE: 24,
APP_CARD_DEFAULT_IMAGE: 'https://art.shlisselburg.org/static/img/HudozkaMain2014.jpg',
},
webpack(config) {
config.resolve.modules.push(__dirname)
+2 -3
View File
@@ -12,13 +12,12 @@ export interface IResizeImage {
}
export function resizeImage(src: string, options: IResizeImage): string {
return src
// return `https://images.weserv.nl/?url=${src}&w=${options.w}&h=${options.h}&n=-1`
return `https://images.weserv.nl/?url=${src}&w=${options.w}&h=${options.h}&n=-1`
}
function getImage(image?: ImageDefinition) {
if (!image) {
const defaultSrc = '/static/img/HudozkaMain2014.jpg'
const defaultSrc = process.env.APP_CARD_DEFAULT_IMAGE
const src = resizeImage(defaultSrc, { w: 400, h: 400 })
const set = [
{