diff options
75 files changed, 263 insertions, 36 deletions
diff --git a/package.json b/package.json index f5b4e1b..6df3cce 100644 --- a/package.json +++ b/package.json @@ -33,8 +33,8 @@ "@sveltejs/kit": "^1.0.0", "cookie": "^0.5.0", "dotenv": "^16.0.3", + "sharp": "^0.31.2", "skyblock-assets": "^2.0.11", - "squoosh": "^0.0.0", "svelte": "^3.55.0", "svelte-preprocess": "^5.0.0", "typed-hypixel-api": "^1.8.0" diff --git a/scripts/updateBackgrounds.js b/scripts/updateBackgrounds.js index 0c3e214..a5467fa 100644 --- a/scripts/updateBackgrounds.js +++ b/scripts/updateBackgrounds.js @@ -1,9 +1,7 @@ import { promises as fs } from 'fs' -import { ImagePool } from '@squoosh/lib' +import sharp from 'sharp' import { cpus } from 'os' -const imagePool = new ImagePool(cpus().length) - // read the file names in the backgrounds folder const backgrounds = await fs.readdir('static/backgrounds') // sort by natural order @@ -18,25 +16,13 @@ await fs.writeFile( // resize the backgrounds async function resizeBackground(name) { - const file = await fs.readFile(`static/backgrounds/${name}`) - const image = imagePool.ingestImage(file) - - const preprocessOptions = { - resize: { - width: 512, - }, - } - await image.preprocess(preprocessOptions) - - await image.encode({ - mozjpeg: { - quality: 30, - }, - }) - - const rawEncodedImage = await image.encodedWith.mozjpeg + const rawEncodedImage = await sharp(`static/backgrounds/${name}`) + .rotate() + .resize(512) + .jpeg({ mozjpeg: true, quality: 30 }) + .toBuffer() - await fs.writeFile(`static/backgrounds-small/${name}`, rawEncodedImage.binary) + await fs.writeFile(`static/backgrounds-small/${name}`, rawEncodedImage) } try { @@ -47,4 +33,3 @@ try { await fs.mkdir('static/backgrounds-small', { recursive: true }) await Promise.all(backgrounds.map(b => resizeBackground(b))) -await imagePool.close() diff --git a/static/backgrounds-small/1.jpg b/static/backgrounds-small/1.jpg Binary files differindex 2410a67..ae221f0 100644 --- a/static/backgrounds-small/1.jpg +++ b/static/backgrounds-small/1.jpg diff --git a/static/backgrounds-small/10.jpg b/static/backgrounds-small/10.jpg Binary files differindex c40c088..8e4b686 100644 --- a/static/backgrounds-small/10.jpg +++ b/static/backgrounds-small/10.jpg diff --git a/static/backgrounds-small/11.jpg b/static/backgrounds-small/11.jpg Binary files differindex 920853d..ad02292 100644 --- a/static/backgrounds-small/11.jpg +++ b/static/backgrounds-small/11.jpg diff --git a/static/backgrounds-small/12.jpg b/static/backgrounds-small/12.jpg Binary files differindex 793d0a6..a1af189 100644 --- a/static/backgrounds-small/12.jpg +++ b/static/backgrounds-small/12.jpg diff --git a/static/backgrounds-small/13.jpg b/static/backgrounds-small/13.jpg Binary files differindex eb18141..3f781a9 100644 --- a/static/backgrounds-small/13.jpg +++ b/static/backgrounds-small/13.jpg diff --git a/static/backgrounds-small/14.jpg b/static/backgrounds-small/14.jpg Binary files differindex 716d0ea..b8a5bb3 100644 --- a/static/backgrounds-small/14.jpg +++ b/static/backgrounds-small/14.jpg diff --git a/static/backgrounds-small/15.jpg b/static/backgrounds-small/15.jpg Binary files differindex df343b0..cdf42e1 100644 --- a/static/backgrounds-small/15.jpg +++ b/static/backgrounds-small/15.jpg diff --git a/static/backgrounds-small/16.jpg b/static/backgrounds-small/16.jpg Binary files differindex 40a619b..b5cb5dd 100644 --- a/static/backgrounds-small/16.jpg +++ b/static/backgrounds-small/16.jpg diff --git a/static/backgrounds-small/17.jpg b/static/backgrounds-small/17.jpg Binary files differindex 4e389a6..4b1bb24 100644 --- a/static/backgrounds-small/17.jpg +++ b/static/backgrounds-small/17.jpg diff --git a/static/backgrounds-small/18.jpg b/static/backgrounds-small/18.jpg Binary files differindex d188195..4fe0a37 100644 --- a/static/backgrounds-small/18.jpg +++ b/static/backgrounds-small/18.jpg diff --git a/static/backgrounds-small/19.jpg b/static/backgrounds-small/19.jpg Binary files differindex 9c058d2..01bfffb 100644 --- a/static/backgrounds-small/19.jpg +++ b/static/backgrounds-small/19.jpg diff --git a/static/backgrounds-small/2.jpg b/static/backgrounds-small/2.jpg Binary files differindex b3c9bf8..4465da4 100644 --- a/static/backgrounds-small/2.jpg +++ b/static/backgrounds-small/2.jpg diff --git a/static/backgrounds-small/20.jpg b/static/backgrounds-small/20.jpg Binary files differindex 5e597b0..ecde01f 100644 --- a/static/backgrounds-small/20.jpg +++ b/static/backgrounds-small/20.jpg diff --git a/static/backgrounds-small/21.jpg b/static/backgrounds-small/21.jpg Binary files differindex 09458c0..0b9a5b9 100644 --- a/static/backgrounds-small/21.jpg +++ b/static/backgrounds-small/21.jpg diff --git a/static/backgrounds-small/22.jpg b/static/backgrounds-small/22.jpg Binary files differindex fd9a919..1dd098e 100644 --- a/static/backgrounds-small/22.jpg +++ b/static/backgrounds-small/22.jpg diff --git a/static/backgrounds-small/23.jpg b/static/backgrounds-small/23.jpg Binary files differindex e8fd99e..740a749 100644 --- a/static/backgrounds-small/23.jpg +++ b/static/backgrounds-small/23.jpg diff --git a/static/backgrounds-small/24.jpg b/static/backgrounds-small/24.jpg Binary files differindex 3229560..cfe24ed 100644 --- a/static/backgrounds-small/24.jpg +++ b/static/backgrounds-small/24.jpg diff --git a/static/backgrounds-small/25.jpg b/static/backgrounds-small/25.jpg Binary files differindex f1d0ddd..196dd66 100644 --- a/static/backgrounds-small/25.jpg +++ b/static/backgrounds-small/25.jpg diff --git a/static/backgrounds-small/26.jpg b/static/backgrounds-small/26.jpg Binary files differindex 835af05..f54e20a 100644 --- a/static/backgrounds-small/26.jpg +++ b/static/backgrounds-small/26.jpg diff --git a/static/backgrounds-small/27.jpg b/static/backgrounds-small/27.jpg Binary files differindex 53852a1..a493cf4 100644 --- a/static/backgrounds-small/27.jpg +++ b/static/backgrounds-small/27.jpg diff --git a/static/backgrounds-small/28.jpg b/static/backgrounds-small/28.jpg Binary files differindex e223845..144b386 100644 --- a/static/backgrounds-small/28.jpg +++ b/static/backgrounds-small/28.jpg diff --git a/static/backgrounds-small/29.jpg b/static/backgrounds-small/29.jpg Binary files differindex 547aab1..e92cab3 100644 --- a/static/backgrounds-small/29.jpg +++ b/static/backgrounds-small/29.jpg diff --git a/static/backgrounds-small/3.jpg b/static/backgrounds-small/3.jpg Binary files differindex a228f02..f0203db 100644 --- a/static/backgrounds-small/3.jpg +++ b/static/backgrounds-small/3.jpg diff --git a/static/backgrounds-small/30.jpg b/static/backgrounds-small/30.jpg Binary files differindex daa36ea..9aad91c 100644 --- a/static/backgrounds-small/30.jpg +++ b/static/backgrounds-small/30.jpg diff --git a/static/backgrounds-small/31.jpg b/static/backgrounds-small/31.jpg Binary files differindex 5ac57ba..4044d19 100644 --- a/static/backgrounds-small/31.jpg +++ b/static/backgrounds-small/31.jpg diff --git a/static/backgrounds-small/32.jpg b/static/backgrounds-small/32.jpg Binary files differindex 88f195c..9f7fb50 100644 --- a/static/backgrounds-small/32.jpg +++ b/static/backgrounds-small/32.jpg diff --git a/static/backgrounds-small/33.jpg b/static/backgrounds-small/33.jpg Binary files differindex cb0aafb..5712cd7 100644 --- a/static/backgrounds-small/33.jpg +++ b/static/backgrounds-small/33.jpg diff --git a/static/backgrounds-small/34.jpg b/static/backgrounds-small/34.jpg Binary files differindex e89ab46..cedf2c9 100644 --- a/static/backgrounds-small/34.jpg +++ b/static/backgrounds-small/34.jpg diff --git a/static/backgrounds-small/35.jpg b/static/backgrounds-small/35.jpg Binary files differindex 151bd73..41fe101 100644 --- a/static/backgrounds-small/35.jpg +++ b/static/backgrounds-small/35.jpg diff --git a/static/backgrounds-small/36.jpg b/static/backgrounds-small/36.jpg Binary files differindex bf81cd6..46696d2 100644 --- a/static/backgrounds-small/36.jpg +++ b/static/backgrounds-small/36.jpg diff --git a/static/backgrounds-small/37.jpg b/static/backgrounds-small/37.jpg Binary files differindex 87fb966..470606d 100644 --- a/static/backgrounds-small/37.jpg +++ b/static/backgrounds-small/37.jpg diff --git a/static/backgrounds-small/38.jpg b/static/backgrounds-small/38.jpg Binary files differindex 536c385..f1ecda5 100644 --- a/static/backgrounds-small/38.jpg +++ b/static/backgrounds-small/38.jpg diff --git a/static/backgrounds-small/39.jpg b/static/backgrounds-small/39.jpg Binary files differindex 4c6c868..3da27a7 100644 --- a/static/backgrounds-small/39.jpg +++ b/static/backgrounds-small/39.jpg diff --git a/static/backgrounds-small/4.jpg b/static/backgrounds-small/4.jpg Binary files differindex b2fb421..fc2f71c 100644 --- a/static/backgrounds-small/4.jpg +++ b/static/backgrounds-small/4.jpg diff --git a/static/backgrounds-small/40.jpg b/static/backgrounds-small/40.jpg Binary files differindex aabc1ba..f2475d7 100644 --- a/static/backgrounds-small/40.jpg +++ b/static/backgrounds-small/40.jpg diff --git a/static/backgrounds-small/41.jpg b/static/backgrounds-small/41.jpg Binary files differindex c8a3394..7c4a550 100644 --- a/static/backgrounds-small/41.jpg +++ b/static/backgrounds-small/41.jpg diff --git a/static/backgrounds-small/42.jpg b/static/backgrounds-small/42.jpg Binary files differindex c927cd9..1bc7d2a 100644 --- a/static/backgrounds-small/42.jpg +++ b/static/backgrounds-small/42.jpg diff --git a/static/backgrounds-small/43.jpg b/static/backgrounds-small/43.jpg Binary files differindex 140ca7b..6ffb28a 100644 --- a/static/backgrounds-small/43.jpg +++ b/static/backgrounds-small/43.jpg diff --git a/static/backgrounds-small/44.jpg b/static/backgrounds-small/44.jpg Binary files differindex c430d09..f65ae45 100644 --- a/static/backgrounds-small/44.jpg +++ b/static/backgrounds-small/44.jpg diff --git a/static/backgrounds-small/45.jpg b/static/backgrounds-small/45.jpg Binary files differindex a763f0f..ebd0638 100644 --- a/static/backgrounds-small/45.jpg +++ b/static/backgrounds-small/45.jpg diff --git a/static/backgrounds-small/46.jpg b/static/backgrounds-small/46.jpg Binary files differindex bab2800..fcb104d 100644 --- a/static/backgrounds-small/46.jpg +++ b/static/backgrounds-small/46.jpg diff --git a/static/backgrounds-small/47.jpg b/static/backgrounds-small/47.jpg Binary files differindex e2f4a8b..1a82d3f 100644 --- a/static/backgrounds-small/47.jpg +++ b/static/backgrounds-small/47.jpg diff --git a/static/backgrounds-small/48.jpg b/static/backgrounds-small/48.jpg Binary files differindex 92d844c..5e56133 100644 --- a/static/backgrounds-small/48.jpg +++ b/static/backgrounds-small/48.jpg diff --git a/static/backgrounds-small/49.jpg b/static/backgrounds-small/49.jpg Binary files differindex d8de72a..5598424 100644 --- a/static/backgrounds-small/49.jpg +++ b/static/backgrounds-small/49.jpg diff --git a/static/backgrounds-small/5.jpg b/static/backgrounds-small/5.jpg Binary files differindex 301381b..9130c6b 100644 --- a/static/backgrounds-small/5.jpg +++ b/static/backgrounds-small/5.jpg diff --git a/static/backgrounds-small/50.jpg b/static/backgrounds-small/50.jpg Binary files differindex b372e03..273fb45 100644 --- a/static/backgrounds-small/50.jpg +++ b/static/backgrounds-small/50.jpg diff --git a/static/backgrounds-small/51.jpg b/static/backgrounds-small/51.jpg Binary files differindex 1e69780..12795eb 100644 --- a/static/backgrounds-small/51.jpg +++ b/static/backgrounds-small/51.jpg diff --git a/static/backgrounds-small/52.jpg b/static/backgrounds-small/52.jpg Binary files differindex 09bf3de..c545967 100644 --- a/static/backgrounds-small/52.jpg +++ b/static/backgrounds-small/52.jpg diff --git a/static/backgrounds-small/53.jpg b/static/backgrounds-small/53.jpg Binary files differindex 0b80ef4..b686e35 100644 --- a/static/backgrounds-small/53.jpg +++ b/static/backgrounds-small/53.jpg diff --git a/static/backgrounds-small/54.jpg b/static/backgrounds-small/54.jpg Binary files differindex 062cb07..1ed9594 100644 --- a/static/backgrounds-small/54.jpg +++ b/static/backgrounds-small/54.jpg diff --git a/static/backgrounds-small/55.jpg b/static/backgrounds-small/55.jpg Binary files differindex 67e8fe0..175552e 100644 --- a/static/backgrounds-small/55.jpg +++ b/static/backgrounds-small/55.jpg diff --git a/static/backgrounds-small/56.jpg b/static/backgrounds-small/56.jpg Binary files differindex 4d99ef4..963d885 100644 --- a/static/backgrounds-small/56.jpg +++ b/static/backgrounds-small/56.jpg diff --git a/static/backgrounds-small/57.jpg b/static/backgrounds-small/57.jpg Binary files differindex 62916e3..111434b 100644 --- a/static/backgrounds-small/57.jpg +++ b/static/backgrounds-small/57.jpg diff --git a/static/backgrounds-small/58.jpg b/static/backgrounds-small/58.jpg Binary files differindex c2b6208..147dc22 100644 --- a/static/backgrounds-small/58.jpg +++ b/static/backgrounds-small/58.jpg diff --git a/static/backgrounds-small/59.jpg b/static/backgrounds-small/59.jpg Binary files differindex b58fdaf..e09c91f 100644 --- a/static/backgrounds-small/59.jpg +++ b/static/backgrounds-small/59.jpg diff --git a/static/backgrounds-small/6.jpg b/static/backgrounds-small/6.jpg Binary files differindex 9b943eb..3330148 100644 --- a/static/backgrounds-small/6.jpg +++ b/static/backgrounds-small/6.jpg diff --git a/static/backgrounds-small/60.jpg b/static/backgrounds-small/60.jpg Binary files differindex 31a96e7..da61648 100644 --- a/static/backgrounds-small/60.jpg +++ b/static/backgrounds-small/60.jpg diff --git a/static/backgrounds-small/61.jpg b/static/backgrounds-small/61.jpg Binary files differindex e9f98a1..7dec548 100644 --- a/static/backgrounds-small/61.jpg +++ b/static/backgrounds-small/61.jpg diff --git a/static/backgrounds-small/62.jpg b/static/backgrounds-small/62.jpg Binary files differindex 3adfc7b..1d60a75 100644 --- a/static/backgrounds-small/62.jpg +++ b/static/backgrounds-small/62.jpg diff --git a/static/backgrounds-small/63.jpg b/static/backgrounds-small/63.jpg Binary files differindex cb0b89d..c54e0d7 100644 --- a/static/backgrounds-small/63.jpg +++ b/static/backgrounds-small/63.jpg diff --git a/static/backgrounds-small/64.jpg b/static/backgrounds-small/64.jpg Binary files differindex a46b17a..3810e4c 100644 --- a/static/backgrounds-small/64.jpg +++ b/static/backgrounds-small/64.jpg diff --git a/static/backgrounds-small/65.jpg b/static/backgrounds-small/65.jpg Binary files differindex 2e754d6..8ccdfa8 100644 --- a/static/backgrounds-small/65.jpg +++ b/static/backgrounds-small/65.jpg diff --git a/static/backgrounds-small/66.jpg b/static/backgrounds-small/66.jpg Binary files differindex 8e346ae..f1d83a7 100644 --- a/static/backgrounds-small/66.jpg +++ b/static/backgrounds-small/66.jpg diff --git a/static/backgrounds-small/67.jpg b/static/backgrounds-small/67.jpg Binary files differindex e47475d..19d30ea 100644 --- a/static/backgrounds-small/67.jpg +++ b/static/backgrounds-small/67.jpg diff --git a/static/backgrounds-small/68.jpg b/static/backgrounds-small/68.jpg Binary files differindex e845ca1..c3cfd10 100644 --- a/static/backgrounds-small/68.jpg +++ b/static/backgrounds-small/68.jpg diff --git a/static/backgrounds-small/69.jpg b/static/backgrounds-small/69.jpg Binary files differindex b260e3b..8097ec7 100644 --- a/static/backgrounds-small/69.jpg +++ b/static/backgrounds-small/69.jpg diff --git a/static/backgrounds-small/7.jpg b/static/backgrounds-small/7.jpg Binary files differindex 5e6611f..9848668 100644 --- a/static/backgrounds-small/7.jpg +++ b/static/backgrounds-small/7.jpg diff --git a/static/backgrounds-small/70.jpg b/static/backgrounds-small/70.jpg Binary files differindex 009e19a..630d8a4 100644 --- a/static/backgrounds-small/70.jpg +++ b/static/backgrounds-small/70.jpg diff --git a/static/backgrounds-small/71.jpg b/static/backgrounds-small/71.jpg Binary files differindex 99fb0fd..9d139df 100644 --- a/static/backgrounds-small/71.jpg +++ b/static/backgrounds-small/71.jpg diff --git a/static/backgrounds-small/8.jpg b/static/backgrounds-small/8.jpg Binary files differindex 101ffa9..1a7f825 100644 --- a/static/backgrounds-small/8.jpg +++ b/static/backgrounds-small/8.jpg diff --git a/static/backgrounds-small/9.jpg b/static/backgrounds-small/9.jpg Binary files differindex 583ae62..ab3f17a 100644 --- a/static/backgrounds-small/9.jpg +++ b/static/backgrounds-small/9.jpg diff --git a/vite.config.js.timestamp-1671151290985.mjs b/vite.config.js.timestamp-1671151290985.mjs new file mode 100644 index 0000000..8e11286 --- /dev/null +++ b/vite.config.js.timestamp-1671151290985.mjs @@ -0,0 +1,24 @@ +// vite.config.js +import { sveltekit } from "file:///C:/Users/mat/Documents/GitHub/skyblock-stats-svelte/node_modules/@sveltejs/kit/src/exports/vite/index.js"; +var config = { + plugins: [sveltekit()], + build: { + rollupOptions: { + output: { + manualChunks: void 0 + } + } + }, + server: process.env.REPL_ID || process.env.GITPOD_WORKSPACE_ID ? { + hmr: process.env.GITPOD_WORKSPACE_URL ? { + host: process.env.GITPOD_WORKSPACE_URL.replace("https://", "3000-"), + protocol: "wss", + clientPort: 443 + } : true + } : {} +}; +var vite_config_default = config; +export { + vite_config_default as default +}; +//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsidml0ZS5jb25maWcuanMiXSwKICAic291cmNlc0NvbnRlbnQiOiBbImNvbnN0IF9fdml0ZV9pbmplY3RlZF9vcmlnaW5hbF9kaXJuYW1lID0gXCJDOlxcXFxVc2Vyc1xcXFxtYXRcXFxcRG9jdW1lbnRzXFxcXEdpdEh1YlxcXFxza3libG9jay1zdGF0cy1zdmVsdGVcIjtjb25zdCBfX3ZpdGVfaW5qZWN0ZWRfb3JpZ2luYWxfZmlsZW5hbWUgPSBcIkM6XFxcXFVzZXJzXFxcXG1hdFxcXFxEb2N1bWVudHNcXFxcR2l0SHViXFxcXHNreWJsb2NrLXN0YXRzLXN2ZWx0ZVxcXFx2aXRlLmNvbmZpZy5qc1wiO2NvbnN0IF9fdml0ZV9pbmplY3RlZF9vcmlnaW5hbF9pbXBvcnRfbWV0YV91cmwgPSBcImZpbGU6Ly8vQzovVXNlcnMvbWF0L0RvY3VtZW50cy9HaXRIdWIvc2t5YmxvY2stc3RhdHMtc3ZlbHRlL3ZpdGUuY29uZmlnLmpzXCI7aW1wb3J0IHsgc3ZlbHRla2l0IH0gZnJvbSAnQHN2ZWx0ZWpzL2tpdC92aXRlJ1xyXG5cclxuLyoqIEB0eXBlIHtpbXBvcnQoJ3ZpdGUnKS5Vc2VyQ29uZmlnfSAqL1xyXG5jb25zdCBjb25maWcgPSB7XHJcblx0cGx1Z2l |
