Skip to content

Commit 2359a9f

Browse files
committed
redo thumbnails as jpgs
1 parent 3f10f35 commit 2359a9f

File tree

175 files changed

+6
-6
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

175 files changed

+6
-6
lines changed

site/scripts/get-example-thumbnails/index.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ fs.readdirSync(`content/examples`).forEach(group_dir => {
1515
async function main() {
1616
const browser = await puppeteer.launch({
1717
defaultViewport: {
18-
width: 600 * 10 / 4,
18+
width: 400 * 10 / 4,
1919
height: 400 + 42,
2020
deviceScaleFactor: 2
2121
}
@@ -25,7 +25,7 @@ async function main() {
2525

2626
for (const slug of slugs) {
2727
try {
28-
const output_file = `static/examples/thumbnails/${slug}.png`;
28+
const output_file = `static/examples/thumbnails/${slug}.jpg`;
2929
if (fs.existsSync(output_file)) {
3030
console.log(c.gray(`skipping ${slug}`));
3131
continue;
@@ -45,16 +45,16 @@ async function main() {
4545
image.autocrop();
4646
// image.scale(0.25);
4747

48-
if (image.bitmap.width > 300 || image.bitmap.width > 200) {
48+
if (image.bitmap.width > 200 || image.bitmap.width > 200) {
4949
const scale = Math.min(
50-
300 / image.bitmap.width,
50+
200 / image.bitmap.width,
5151
200 / image.bitmap.height
5252
);
5353

5454
image.scale(scale);
5555
}
5656

57-
await image.write(output_file);
57+
await image.quality(75).write(output_file);
5858
} catch (err) {
5959
console.log(c.bold().red(`failed to screenshot ${slug}`));
6060
console.log(err);

site/src/routes/examples/_TableOfContents.svelte

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
<div class="info">
5050
<div
5151
class="thumbnail"
52-
style="background-image: url(examples/thumbnails/{example.slug}.png)"
52+
style="background-image: url(examples/thumbnails/{example.slug}.jpg)"
5353
></div>
5454
<div class="example-title">
5555
{example.title}
841 Bytes
-542 Bytes
Binary file not shown.
-872 Bytes
Binary file not shown.
4.78 KB
-3.52 KB
Binary file not shown.
Binary file not shown.
Binary file not shown.
2.31 KB
-3.63 KB
Binary file not shown.
810 Bytes
-329 Bytes
Binary file not shown.
Binary file not shown.
Binary file not shown.
4.73 KB
-7.39 KB
Binary file not shown.
5.55 KB
-11 KB
Binary file not shown.
Binary file not shown.
2.97 KB
-4.3 KB
Binary file not shown.
3.91 KB
-3.14 KB
Binary file not shown.
6.52 KB
-9.87 KB
Binary file not shown.
Binary file not shown.
Binary file not shown.
3.81 KB
-1.88 KB
Binary file not shown.
6.24 KB
-9.35 KB
Binary file not shown.
Binary file not shown.
Binary file not shown.
14.9 KB
-50.8 KB
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
1.91 KB
-1.88 KB
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
4.55 KB
-4.96 KB
Binary file not shown.
Binary file not shown.
1.7 KB
-2.81 KB
Binary file not shown.
Binary file not shown.
Binary file not shown.
5.02 KB
-7.11 KB
Binary file not shown.
1.53 KB
-738 Bytes
Binary file not shown.
Binary file not shown.
Binary file not shown.
-1020 Bytes
Binary file not shown.
5.45 KB
-9.45 KB
Binary file not shown.
Binary file not shown.
2.28 KB
-2.88 KB
Binary file not shown.
1.58 KB
-2.37 KB
Binary file not shown.
1.53 KB
-738 Bytes
Binary file not shown.
Binary file not shown.
3.23 KB
-9.73 KB
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
9.78 KB
-16.8 KB
Binary file not shown.
Binary file not shown.
Binary file not shown.
3.23 KB
-6.31 KB
Binary file not shown.
Binary file not shown.
Binary file not shown.
1.67 KB
-2.52 KB
Binary file not shown.
8.07 KB
-12.4 KB
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
5.47 KB
-11.2 KB
Binary file not shown.
Binary file not shown.
7.83 KB
-13.7 KB
Binary file not shown.
Binary file not shown.
1.9 KB
-1.16 KB
Binary file not shown.
2.25 KB
-2.52 KB
Binary file not shown.
2.59 KB
-3.62 KB
Binary file not shown.
2.11 KB
-2.19 KB
Binary file not shown.
4.55 KB
-11.2 KB
Binary file not shown.
6.79 KB
-29.3 KB
Binary file not shown.
Binary file not shown.
2.23 KB
-2.72 KB
Binary file not shown.
-193 Bytes
Binary file not shown.
3.87 KB
-9.15 KB
Binary file not shown.
Binary file not shown.
-2.59 KB
Binary file not shown.
Binary file not shown.
2.58 KB
-3.7 KB
Binary file not shown.
Binary file not shown.
2.19 KB
-1.45 KB
Binary file not shown.
Binary file not shown.
3.32 KB
-10.1 KB
Binary file not shown.
1.33 KB
-826 Bytes
Binary file not shown.
2.61 KB
-1.66 KB
Binary file not shown.
Binary file not shown.

0 commit comments

Comments
 (0)