Fix tailwind config

This commit is contained in:
Mike Conrad
2025-05-08 21:00:30 -04:00
parent 8e5fc7d111
commit 70f17365a7
10 changed files with 306 additions and 16 deletions

33
scripts/fetch.js Normal file
View File

@ -0,0 +1,33 @@
const fs = require("fs");
const path = require("path");
const sharp = require("sharp");
const dir = path.join(__dirname, "public/img/galleries/gal6");
const files = fs.readdirSync(dir);
const getImages = async (files) => {
const images = [];
for (const file of files) {
const { width, height } = await sharp(path.join(dir, file)).metadata();
images.push({
src: `/img/galleries/gal6/${file}`,
alt: file,
width,
height,
});
}
return images;
};
const printYaml = async files => {
const images = await getImages(files);
console.log('images:');
images.forEach(image => {
console.log(`- src: "${image.src}"`);
console.log(` alt: "${image.alt}"`);
console.log(` width: ${image.width}`);
console.log(` height: ${image.height}`);
});
};
printYaml(files);