feat: some updates
All checks were successful
Deploy to SFTP Server / build (push) Successful in 17m5s

This commit is contained in:
Max Richter 2025-05-14 19:23:59 +02:00
parent 972c2382f3
commit 8e293c204d
5 changed files with 1514 additions and 1225 deletions

View File

@ -11,32 +11,32 @@
},
"dependencies": {
"@astrojs/check": "^0.9.4",
"@astrojs/mdx": "^4.0.8",
"@astrojs/svelte": "^7.0.4",
"@astrojs/tailwind": "^6.0.0",
"astro": "^5.3.0",
"@astrojs/mdx": "^4.2.6",
"@astrojs/svelte": "^7.0.13",
"@astrojs/tailwind": "^6.0.2",
"astro": "^5.7.13",
"astro-i18n-aut": "^0.7.3",
"exifreader": "^4.26.1",
"svelte": "^5.20.1",
"svelte-gestures": "^5.1.3",
"tailwindcss": "^4.0.6",
"exifreader": "^4.30.1",
"svelte": "^5.28.6",
"svelte-gestures": "^5.1.4",
"tailwindcss": "^4.1.6",
"thumbhash": "^0.1.1",
"typescript": "^5.7.3"
"typescript": "^5.8.3"
},
"devDependencies": {
"@astrojs/sitemap": "^3.2.1",
"@iconify-json/tabler": "^1.2.16",
"@astrojs/sitemap": "^3.4.0",
"@iconify-json/tabler": "^1.2.17",
"@types/markdown-it": "^14.1.2",
"@unocss/preset-icons": "^65.5.0",
"@unocss/reset": "^65.5.0",
"astro-font": "^1.0.0",
"@unocss/preset-icons": "^66.1.1",
"@unocss/reset": "^66.1.1",
"astro-font": "^1.1.0",
"markdown-it": "^14.1.0",
"ogl": "^1.0.11",
"prettier": "^3.5.1",
"prettier": "^3.5.3",
"prettier-plugin-astro": "^0.14.1",
"sharp": "^0.33.5",
"unocss": "^65.5.0",
"unplugin-icons": "^22.0.0",
"vite-plugin-glsl": "^1.3.1"
"sharp": "^0.34.1",
"unocss": "^66.1.1",
"unplugin-icons": "^22.1.0",
"vite-plugin-glsl": "^1.4.1"
}
}

2668
pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff

View File

@ -19,16 +19,23 @@ export async function generateThumbHash(image: { width: number, height: number }
const smallWidth = Math.floor(image.width * scaleFactor);
const smallHeight = Math.floor(image.height * scaleFactor);
//@ts-ignore
const smallImg = await sharp(image.fsPath)
.resize(smallWidth, smallHeight)
.withMetadata()
.raw()
.ensureAlpha()
.toBuffer();
try {
//@ts-ignore
const smallImg = await sharp(image.fsPath)
.resize(smallWidth, smallHeight)
.withMetadata()
.raw()
.ensureAlpha()
.toBuffer();
const buffer = rgbaToThumbHash(smallWidth, smallHeight, smallImg);
return Buffer.from(buffer).toString("base64");
} catch (error) {
console.log("Could not generate thumbhash", error)
return undefined
}
const buffer = rgbaToThumbHash(smallWidth, smallHeight, smallImg);
return Buffer.from(buffer).toString("base64");
}
const allowedExif = [

View File

@ -41,10 +41,6 @@ const list = [...posts, ...photos];
list.sort((a, b) => {
return a.data.date > b.data.date ? -1 : 1;
});
// .sort((a, b) => {
// return a.data.date.getDate() > b.data.date.getDate() ? 1 : -1;
// });
console.log(list.map((post) => [post.data.date, post.data.title]));
const featuredPost = list.find((post) => post.data?.featured);
const otherPosts = list.filter((post) => featuredPost !== post).slice(0, 3);

View File

@ -1,10 +1,10 @@
// uno.config.ts
import { defineConfig, presetUno } from 'unocss'
import { defineConfig, presetWind3 } from 'unocss'
import presetIcons from '@unocss/preset-icons'
export default defineConfig({
presets: [
presetUno(),
presetWind3(),
presetIcons(),
],
shortcuts: {