Skip to content

Commit 770162a

Browse files
committed
fix: Use github new size
1 parent 72cacb3 commit 770162a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

cli.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ const trash = require("trash");
1515

1616
const { cloneGistPath, commitAll, push } = require("./git-util");
1717

18-
const CONTAINER_WIDTH = 727;
19-
const CUT_WIDTH = 325;
18+
const CONTAINER_WIDTH = 892;
19+
const CUT_WIDTH = 404;
2020
const CUT_HEIGHT = 100;
2121
const CARD_PADDING_TOP = 37;
2222
const CARD_PADDING_HORIZONTAL = 16;
@@ -98,8 +98,8 @@ const cropGif = async path => {
9898
const { width, height } = await sharp(path).metadata();
9999
const resizeOpts =
100100
width / height >= CONTAINER_WIDTH / MINIMUM_HEIGHT
101-
? ["--resize", "_x513"]
102-
: ["--resize", "727x_"];
101+
? ["--resize", `_x${MINIMUM_HEIGHT}`]
102+
: ["--resize", `${CONTAINER_WIDTH}x_`];
103103
const resized = "resized.gif";
104104
await execa(gifsicle, [...resizeOpts, "-o", resized, path]);
105105
const files = [];

0 commit comments

Comments
 (0)