diff options
author | (quasar) nebula <qznebula@protonmail.com> | 2023-08-12 23:44:22 -0300 |
---|---|---|
committer | (quasar) nebula <qznebula@protonmail.com> | 2023-08-12 23:44:39 -0300 |
commit | 82036040f70ab9d5b30afe372bcd43061acff5d8 (patch) | |
tree | ff7263b63687a1b4e42555b6ace18ca5fc4e43b7 | |
parent | 38ee553fa9e4e1aebccb845ef28e6abc7a32c86e (diff) |
content: transformContent: display large thumbs by default
-rw-r--r-- | src/content/dependencies/transformContent.js | 1 | ||||
-rw-r--r-- | src/util/urls.js | 1 | ||||
-rw-r--r-- | tap-snapshots/test/snapshot/transformContent.js.test.cjs | 6 |
3 files changed, 5 insertions, 3 deletions
diff --git a/src/content/dependencies/transformContent.js b/src/content/dependencies/transformContent.js index 588e5355..68d7eaa4 100644 --- a/src/content/dependencies/transformContent.js +++ b/src/content/dependencies/transformContent.js @@ -318,6 +318,7 @@ export default { thumb: { validate: v => v.is('small', 'medium', 'large'), + default: 'large', }, }, diff --git a/src/util/urls.js b/src/util/urls.js index 4d099acd..bd3a349a 100644 --- a/src/util/urls.js +++ b/src/util/urls.js @@ -142,6 +142,7 @@ const thumbnailHelper = (name) => (file) => file.replace(/\.(jpg|png)$/, name + '.jpg'); export const thumb = { + large: thumbnailHelper('.large'), medium: thumbnailHelper('.medium'), small: thumbnailHelper('.small'), }; diff --git a/tap-snapshots/test/snapshot/transformContent.js.test.cjs b/tap-snapshots/test/snapshot/transformContent.js.test.cjs index 6b30ebc2..dd859b2f 100644 --- a/tap-snapshots/test/snapshot/transformContent.js.test.cjs +++ b/tap-snapshots/test/snapshot/transformContent.js.test.cjs @@ -59,16 +59,16 @@ How it goes</p> ` exports[`test/snapshot/transformContent.js TAP transformContent (snapshot) > non-inline image #1 1`] = ` -<div class="content-image"><a class="box image-link" href="spark.png"><div class="image-container"><div class="image-inner-area"><img src="spark.png"></div></div></a></div> +<div class="content-image"><a class="box image-link" href="spark.png"><div class="image-container"><div class="image-inner-area"><img src="spark.large.jpg"></div></div></a></div> ` exports[`test/snapshot/transformContent.js TAP transformContent (snapshot) > non-inline image #2 1`] = ` <p>Rad.</p> -<div class="content-image"><a class="box image-link" href="spark.png"><div class="image-container"><div class="image-inner-area"><img src="spark.png"></div></div></a></div> +<div class="content-image"><a class="box image-link" href="spark.png"><div class="image-container"><div class="image-inner-area"><img src="spark.large.jpg"></div></div></a></div> ` exports[`test/snapshot/transformContent.js TAP transformContent (snapshot) > non-inline image #3 1`] = ` -<div class="content-image"><a class="box image-link" href="spark.png"><div class="image-container"><div class="image-inner-area"><img src="spark.png"></div></div></a></div> +<div class="content-image"><a class="box image-link" href="spark.png"><div class="image-container"><div class="image-inner-area"><img src="spark.large.jpg"></div></div></a></div> <p>Baller.</p> |