From deab42f3fb6df0c1c6d2b5d32a38cc86613740fc Mon Sep 17 00:00:00 2001 From: effectivnayarabota1 Date: Mon, 6 Nov 2023 11:37:59 +0300 Subject: [PATCH] card image change size to 288 --- controllers/element.controller.js | 6 +++--- controllers/page.controller.js | 6 +++--- controllers/profile.controller.js | 6 ------ templates/button/button.css | 3 +++ templates/card/cardElement.eta | 2 +- templates/card/cardPage.eta | 2 +- 6 files changed, 11 insertions(+), 14 deletions(-) diff --git a/controllers/element.controller.js b/controllers/element.controller.js index c3407031..179544d6 100644 --- a/controllers/element.controller.js +++ b/controllers/element.controller.js @@ -48,12 +48,12 @@ export default class Element { await File.remove(dir, "cover"); await File.write(cover, dir, `cover.${extention}`); - const webp190 = await sharp(buf, { animated: true }) + const webp288 = await sharp(buf, { animated: true }) .webp() // .resize(190, 288, { fit: "cover", withoutEnlargement: true }) - .resize(288, 288, { fit: "inside" }) + .resize(288, 288, { fit: "inside", withoutEnlargement: true }) .toBuffer(); - await File.write(webp190, dir, "cover@webp190.webp"); + await File.write(webp288, dir, "cover@webp288.webp"); } if (style.size) { diff --git a/controllers/page.controller.js b/controllers/page.controller.js index f9aba103..edb03d89 100644 --- a/controllers/page.controller.js +++ b/controllers/page.controller.js @@ -51,12 +51,12 @@ export default class Page { await File.remove(dir, "cover"); await File.write(cover, dir, `cover.${extention}`); - const webp190 = await sharp(buf, { animated: true }) + const webp288 = await sharp(buf, { animated: true }) .webp() // .resize(190, 288, { fit: "cover", withoutEnlargement: true }) - .resize(288, 288, { fit: "inside" }) + .resize(288, 288, { fit: "inside", withoutEnlargement: true }) .toBuffer(); - await File.write(webp190, dir, "cover@webp190.webp"); + await File.write(webp288, dir, "cover@webp288.webp"); } if (style.size) { diff --git a/controllers/profile.controller.js b/controllers/profile.controller.js index 4aa797c9..2a696cbf 100644 --- a/controllers/profile.controller.js +++ b/controllers/profile.controller.js @@ -33,12 +33,6 @@ export default class Profile { .resize(64, 64, { fit: "cover", withoutEnlargement: true }) .toBuffer(); await File.write(webp64, dir, "avatar@webp64.webp"); - - const webp190 = await sharp(buf, { animated: true }) - .webp() - .resize(190, 190, { fit: "cover", withoutEnlargement: true }) - .toBuffer(); - await File.write(webp190, dir, "avatar@webp190.webp"); } if (style.size) { diff --git a/templates/button/button.css b/templates/button/button.css index c3b51638..d1e159e7 100644 --- a/templates/button/button.css +++ b/templates/button/button.css @@ -15,6 +15,9 @@ color: var(--color); border-color: var(--color); } +.button * { + margin: 0; +} .button_delete { --color: var(--red); } diff --git a/templates/card/cardElement.eta b/templates/card/cardElement.eta index 51ddb6cc..328cdcca 100644 --- a/templates/card/cardElement.eta +++ b/templates/card/cardElement.eta @@ -1,4 +1,4 @@ -<% const mode = it.mode || 'webp190' %> +<% const mode = it.mode || 'webp288' %>
diff --git a/templates/card/cardPage.eta b/templates/card/cardPage.eta index 74ed53de..9d7e938e 100644 --- a/templates/card/cardPage.eta +++ b/templates/card/cardPage.eta @@ -1,4 +1,4 @@ -<% const mode = it.mode || 'webp190' %> +<% const mode = it.mode || 'webp288' %>