Compare commits
12 Commits
eba518ccc2
...
astro/buil
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b13935c7c5 | ||
|
|
0ef04d5f3e | ||
|
|
d9430335d5 | ||
|
|
9a92b1939c | ||
|
|
b304cc400c | ||
|
|
79e343dbdc | ||
|
|
7116aa2348 | ||
|
|
c112a69f0e | ||
|
|
4a9d0fb273 | ||
|
|
29c47ab72d | ||
|
|
27b8dc4118 | ||
|
|
45a2627ec6 |
@@ -1,16 +1,34 @@
|
||||
// @ts-check
|
||||
import { defineConfig } from 'astro/config';
|
||||
import preact from '@astrojs/preact';
|
||||
import tailwindcss from '@tailwindcss/vite';
|
||||
import graphql from '@rollup/plugin-graphql';
|
||||
import { defineConfig } from "astro/config";
|
||||
import preact from "@astrojs/preact";
|
||||
import tailwindcss from "@tailwindcss/vite";
|
||||
import graphql from "@rollup/plugin-graphql";
|
||||
import playformCompress from "@playform/compress";
|
||||
import { getFiles } from "./src/build/files.ts";
|
||||
|
||||
// https://astro.build/config
|
||||
export default defineConfig({
|
||||
integrations: [preact()],
|
||||
output: 'static',
|
||||
integrations: [preact(), playformCompress({
|
||||
CSS: true,
|
||||
Image: false,
|
||||
JSON: true,
|
||||
JavaScript: false,
|
||||
HTML: true
|
||||
}), {
|
||||
name: "download-files",
|
||||
hooks: {
|
||||
"astro:build:start": async ({ }) => {
|
||||
await getFiles();
|
||||
}
|
||||
}
|
||||
}],
|
||||
output: "static",
|
||||
prefetch: true,
|
||||
build: {
|
||||
assets: "assets"
|
||||
},
|
||||
image: {
|
||||
domains: ['development.directus.itsfinniii.com']
|
||||
domains: ["development.directus.itsfinniii.com"]
|
||||
},
|
||||
vite: {
|
||||
plugins: [graphql(), tailwindcss()],
|
||||
@@ -21,7 +39,7 @@ export default defineConfig({
|
||||
},
|
||||
},
|
||||
optimizeDeps: {
|
||||
exclude: ['@immich/justified-layout-wasm']
|
||||
exclude: ["@immich/justified-layout-wasm"]
|
||||
}
|
||||
}
|
||||
});
|
||||
515
astro/package-lock.json
generated
515
astro/package-lock.json
generated
@@ -11,6 +11,7 @@
|
||||
"@astrojs/preact": "^5.1.2",
|
||||
"@directus/sdk": "^21.2.0",
|
||||
"@immich/justified-layout-wasm": "^0.4.3",
|
||||
"@playform/compress": "^0.2.3",
|
||||
"@rollup/plugin-graphql": "^2.0.5",
|
||||
"@tailwindcss/typography": "^0.5.19",
|
||||
"@tailwindcss/vite": "^4.2.4",
|
||||
@@ -896,7 +897,6 @@
|
||||
"resolved": "https://registry.npmjs.org/@img/colour/-/colour-1.1.0.tgz",
|
||||
"integrity": "sha512-Td76q7j57o/tLVdgS746cYARfSyxk8iEfRxewL9h4OMzYhbW4TAcppl0mT4eyqXddh6L/jwoM75mo7ixa/pCeQ==",
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"engines": {
|
||||
"node": ">=18"
|
||||
}
|
||||
@@ -1440,6 +1440,16 @@
|
||||
"node": ">=6.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@jridgewell/source-map": {
|
||||
"version": "0.3.11",
|
||||
"resolved": "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.11.tgz",
|
||||
"integrity": "sha512-ZMp1V8ZFcPG5dIWnQLr3NSI1MiCU7UETdS/A0G8V/XWHvJv3ZsFqutJn1Y5RPmAPX6F3BiE397OqveU/9NCuIA==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@jridgewell/gen-mapping": "^0.3.5",
|
||||
"@jridgewell/trace-mapping": "^0.3.25"
|
||||
}
|
||||
},
|
||||
"node_modules/@jridgewell/sourcemap-codec": {
|
||||
"version": "1.5.5",
|
||||
"resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.5.tgz",
|
||||
@@ -1456,12 +1466,89 @@
|
||||
"@jridgewell/sourcemap-codec": "^1.4.14"
|
||||
}
|
||||
},
|
||||
"node_modules/@nodelib/fs.scandir": {
|
||||
"version": "2.1.5",
|
||||
"resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz",
|
||||
"integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@nodelib/fs.stat": "2.0.5",
|
||||
"run-parallel": "^1.1.9"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 8"
|
||||
}
|
||||
},
|
||||
"node_modules/@nodelib/fs.stat": {
|
||||
"version": "2.0.5",
|
||||
"resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz",
|
||||
"integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">= 8"
|
||||
}
|
||||
},
|
||||
"node_modules/@nodelib/fs.walk": {
|
||||
"version": "1.2.8",
|
||||
"resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz",
|
||||
"integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@nodelib/fs.scandir": "2.1.5",
|
||||
"fastq": "^1.6.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 8"
|
||||
}
|
||||
},
|
||||
"node_modules/@oslojs/encoding": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/@oslojs/encoding/-/encoding-1.1.0.tgz",
|
||||
"integrity": "sha512-70wQhgYmndg4GCPxPPxPGevRKqTIJ2Nh4OkiMWmDAVYsTQ+Ta7Sq+rPevXyXGdzr30/qZBnyOalCszoMxlyldQ==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@playform/compress": {
|
||||
"version": "0.2.3",
|
||||
"resolved": "https://registry.npmjs.org/@playform/compress/-/compress-0.2.3.tgz",
|
||||
"integrity": "sha512-Aucz303xKYbWxOPjQUHc1vBVk+p06xbq17hjy540RdkcBaMiPUjk37Qlo9ixv12Wgk9aPIy3Yl7NIe8E3S28eQ==",
|
||||
"license": "SEE LICENSE IN LICENSE",
|
||||
"dependencies": {
|
||||
"@playform/pipe": "0.1.5",
|
||||
"@types/csso": "5.0.4",
|
||||
"@types/html-minifier-terser": "7.0.2",
|
||||
"astro": "*",
|
||||
"commander": "14.0.3",
|
||||
"csso": "5.0.5",
|
||||
"deepmerge-ts": "7.1.5",
|
||||
"fast-glob": "3.3.3",
|
||||
"html-minifier-terser": "7.2.0",
|
||||
"kleur": "4.1.5",
|
||||
"lightningcss": "1.32.0",
|
||||
"sharp": "0.34.5",
|
||||
"svgo": "4.0.1",
|
||||
"terser": "5.46.1"
|
||||
}
|
||||
},
|
||||
"node_modules/@playform/compress/node_modules/commander": {
|
||||
"version": "14.0.3",
|
||||
"resolved": "https://registry.npmjs.org/commander/-/commander-14.0.3.tgz",
|
||||
"integrity": "sha512-H+y0Jo/T1RZ9qPP4Eh1pkcQcLRglraJaSLoyOtHxu6AapkjWVCy2Sit1QQ4x3Dng8qDlSsZEet7g5Pq06MvTgw==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=20"
|
||||
}
|
||||
},
|
||||
"node_modules/@playform/pipe": {
|
||||
"version": "0.1.5",
|
||||
"resolved": "https://registry.npmjs.org/@playform/pipe/-/pipe-0.1.5.tgz",
|
||||
"integrity": "sha512-PYf/h1eUZGUoxEy0sagA3NBdcUp7+Bud/7Tvn7uYnulq1vsGtUCIkcrZF7/HjXD0ejJbTWSz3cXpIdqzceiFOw==",
|
||||
"license": "SEE LICENSE IN LICENSE",
|
||||
"dependencies": {
|
||||
"@types/node": "*",
|
||||
"deepmerge-ts": "7.1.5",
|
||||
"fast-glob": "3.3.3"
|
||||
}
|
||||
},
|
||||
"node_modules/@preact/preset-vite": {
|
||||
"version": "2.10.5",
|
||||
"resolved": "https://registry.npmjs.org/@preact/preset-vite/-/preset-vite-2.10.5.tgz",
|
||||
@@ -2362,6 +2449,21 @@
|
||||
"vite": "^5.2.0 || ^6 || ^7 || ^8"
|
||||
}
|
||||
},
|
||||
"node_modules/@types/css-tree": {
|
||||
"version": "2.3.11",
|
||||
"resolved": "https://registry.npmjs.org/@types/css-tree/-/css-tree-2.3.11.tgz",
|
||||
"integrity": "sha512-aEokibJOI77uIlqoBOkVbaQGC9zII0A+JH1kcTNKW2CwyYWD8KM6qdo+4c77wD3wZOQfJuNWAr9M4hdk+YhDIg==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@types/csso": {
|
||||
"version": "5.0.4",
|
||||
"resolved": "https://registry.npmjs.org/@types/csso/-/csso-5.0.4.tgz",
|
||||
"integrity": "sha512-W/FsRkm/9c04x9ON+bj+HQ0cSgNkG1LvcfuBCpkP7cpikM7+RkrNFLGtiofb++xBG6KGMUycLoDbi9/K621ZCw==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@types/css-tree": "*"
|
||||
}
|
||||
},
|
||||
"node_modules/@types/debug": {
|
||||
"version": "4.1.13",
|
||||
"resolved": "https://registry.npmjs.org/@types/debug/-/debug-4.1.13.tgz",
|
||||
@@ -2386,6 +2488,12 @@
|
||||
"@types/unist": "*"
|
||||
}
|
||||
},
|
||||
"node_modules/@types/html-minifier-terser": {
|
||||
"version": "7.0.2",
|
||||
"resolved": "https://registry.npmjs.org/@types/html-minifier-terser/-/html-minifier-terser-7.0.2.tgz",
|
||||
"integrity": "sha512-mm2HqV22l8lFQh4r2oSsOEVea+m0qqxEmwpc9kC1p/XzmjLWrReR9D/GRs8Pex2NX/imyEH9c5IU/7tMBQCHOA==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@types/linkify-it": {
|
||||
"version": "5.0.0",
|
||||
"resolved": "https://registry.npmjs.org/@types/linkify-it/-/linkify-it-5.0.0.tgz",
|
||||
@@ -2442,6 +2550,15 @@
|
||||
"@types/unist": "*"
|
||||
}
|
||||
},
|
||||
"node_modules/@types/node": {
|
||||
"version": "25.6.0",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-25.6.0.tgz",
|
||||
"integrity": "sha512-+qIYRKdNYJwY3vRCZMdJbPLJAtGjQBudzZzdzwQYkEPQd+PJGixUL5QfvCLDaULoLv+RhT3LDkwEfKaAkgSmNQ==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"undici-types": "~7.19.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@types/unist": {
|
||||
"version": "3.0.3",
|
||||
"resolved": "https://registry.npmjs.org/@types/unist/-/unist-3.0.3.tgz",
|
||||
@@ -2454,6 +2571,18 @@
|
||||
"integrity": "sha512-WmoN8qaIAo7WTYWbAZuG8PYEhn5fkz7dZrqTBZ7dtt//lL2Gwms1IcnQ5yHqjDfX8Ft5j4YzDM23f87zBfDe9g==",
|
||||
"license": "ISC"
|
||||
},
|
||||
"node_modules/acorn": {
|
||||
"version": "8.16.0",
|
||||
"resolved": "https://registry.npmjs.org/acorn/-/acorn-8.16.0.tgz",
|
||||
"integrity": "sha512-UVJyE9MttOsBQIDKw1skb9nAwQuR5wuGD3+82K6JgJlm/Y+KI92oNsMNGZCYdDsVtRHSak0pcV5Dno5+4jh9sw==",
|
||||
"license": "MIT",
|
||||
"bin": {
|
||||
"acorn": "bin/acorn"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.4.0"
|
||||
}
|
||||
},
|
||||
"node_modules/anymatch": {
|
||||
"version": "3.1.3",
|
||||
"resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz",
|
||||
@@ -2639,6 +2768,18 @@
|
||||
"integrity": "sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww==",
|
||||
"license": "ISC"
|
||||
},
|
||||
"node_modules/braces": {
|
||||
"version": "3.0.3",
|
||||
"resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz",
|
||||
"integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"fill-range": "^7.1.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=8"
|
||||
}
|
||||
},
|
||||
"node_modules/browserslist": {
|
||||
"version": "4.28.2",
|
||||
"resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.28.2.tgz",
|
||||
@@ -2672,6 +2813,22 @@
|
||||
"node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7"
|
||||
}
|
||||
},
|
||||
"node_modules/buffer-from": {
|
||||
"version": "1.1.2",
|
||||
"resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz",
|
||||
"integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/camel-case": {
|
||||
"version": "4.1.2",
|
||||
"resolved": "https://registry.npmjs.org/camel-case/-/camel-case-4.1.2.tgz",
|
||||
"integrity": "sha512-gxGWBrTT1JuMx6R+o5PTXMmUnhnVzLQ9SNutD4YqKtI6ap897t3tKECYla6gCWEkplXnlNybEkZg9GEGxKFCgw==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"pascal-case": "^3.1.2",
|
||||
"tslib": "^2.0.3"
|
||||
}
|
||||
},
|
||||
"node_modules/caniuse-lite": {
|
||||
"version": "1.0.30001791",
|
||||
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001791.tgz",
|
||||
@@ -2771,6 +2928,27 @@
|
||||
"node": ">=8"
|
||||
}
|
||||
},
|
||||
"node_modules/clean-css": {
|
||||
"version": "5.3.3",
|
||||
"resolved": "https://registry.npmjs.org/clean-css/-/clean-css-5.3.3.tgz",
|
||||
"integrity": "sha512-D5J+kHaVb/wKSFcyyV75uCn8fiY4sV38XJoe4CUyGQ+mOU/fMVYUdH1hJC+CJQ5uY3EnW27SbJYS4X8BiLrAFg==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"source-map": "~0.6.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/clean-css/node_modules/source-map": {
|
||||
"version": "0.6.1",
|
||||
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
|
||||
"integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
|
||||
"license": "BSD-3-Clause",
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/clsx": {
|
||||
"version": "2.1.1",
|
||||
"resolved": "https://registry.npmjs.org/clsx/-/clsx-2.1.1.tgz",
|
||||
@@ -2973,6 +3151,15 @@
|
||||
"url": "https://github.com/sponsors/wooorm"
|
||||
}
|
||||
},
|
||||
"node_modules/deepmerge-ts": {
|
||||
"version": "7.1.5",
|
||||
"resolved": "https://registry.npmjs.org/deepmerge-ts/-/deepmerge-ts-7.1.5.tgz",
|
||||
"integrity": "sha512-HOJkrhaYsweh+W+e74Yn7YStZOilkoPb6fycpwNLKzSPtruFs48nYis0zy5yJz1+ktUhHxoRDJ27RQAWLIJVJw==",
|
||||
"license": "BSD-3-Clause",
|
||||
"engines": {
|
||||
"node": ">=16.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/defu": {
|
||||
"version": "6.1.7",
|
||||
"resolved": "https://registry.npmjs.org/defu/-/defu-6.1.7.tgz",
|
||||
@@ -3092,6 +3279,16 @@
|
||||
"url": "https://github.com/fb55/domutils?sponsor=1"
|
||||
}
|
||||
},
|
||||
"node_modules/dot-case": {
|
||||
"version": "3.0.4",
|
||||
"resolved": "https://registry.npmjs.org/dot-case/-/dot-case-3.0.4.tgz",
|
||||
"integrity": "sha512-Kv5nKlh6yRrdrGvxeJ2e5y2eRUpkUosIW4A2AS38zwSz27zu7ufDwQPi5Jhs3XAlGNetl3bmnGhQsMtkKJnj3w==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"no-case": "^3.0.4",
|
||||
"tslib": "^2.0.3"
|
||||
}
|
||||
},
|
||||
"node_modules/dset": {
|
||||
"version": "3.1.4",
|
||||
"resolved": "https://registry.npmjs.org/dset/-/dset-3.1.4.tgz",
|
||||
@@ -3239,6 +3436,22 @@
|
||||
"integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/fast-glob": {
|
||||
"version": "3.3.3",
|
||||
"resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.3.tgz",
|
||||
"integrity": "sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@nodelib/fs.stat": "^2.0.2",
|
||||
"@nodelib/fs.walk": "^1.2.3",
|
||||
"glob-parent": "^5.1.2",
|
||||
"merge2": "^1.3.0",
|
||||
"micromatch": "^4.0.8"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=8.6.0"
|
||||
}
|
||||
},
|
||||
"node_modules/fast-string-truncated-width": {
|
||||
"version": "1.2.1",
|
||||
"resolved": "https://registry.npmjs.org/fast-string-truncated-width/-/fast-string-truncated-width-1.2.1.tgz",
|
||||
@@ -3263,6 +3476,15 @@
|
||||
"fast-string-width": "^1.1.0"
|
||||
}
|
||||
},
|
||||
"node_modules/fastq": {
|
||||
"version": "1.20.1",
|
||||
"resolved": "https://registry.npmjs.org/fastq/-/fastq-1.20.1.tgz",
|
||||
"integrity": "sha512-GGToxJ/w1x32s/D2EKND7kTil4n8OVk/9mycTc4VDza13lOvpUZTGX3mFSCtV9ksdGBVzvsyAVLM6mHFThxXxw==",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"reusify": "^1.0.4"
|
||||
}
|
||||
},
|
||||
"node_modules/fdir": {
|
||||
"version": "6.5.0",
|
||||
"resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz",
|
||||
@@ -3280,6 +3502,18 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"node_modules/fill-range": {
|
||||
"version": "7.1.1",
|
||||
"resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz",
|
||||
"integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"to-regex-range": "^5.0.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=8"
|
||||
}
|
||||
},
|
||||
"node_modules/flattie": {
|
||||
"version": "1.1.1",
|
||||
"resolved": "https://registry.npmjs.org/flattie/-/flattie-1.1.1.tgz",
|
||||
@@ -3339,6 +3573,18 @@
|
||||
"integrity": "sha512-IaOQ9puYtjrkq7Y0Ygl9KDZnrf/aiUJYUpVf89y8kyaxbRG7Y1SrX/jaumrv81vc61+kiMempujsM3Yw7w5qcw==",
|
||||
"license": "ISC"
|
||||
},
|
||||
"node_modules/glob-parent": {
|
||||
"version": "5.1.2",
|
||||
"resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz",
|
||||
"integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"is-glob": "^4.0.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 6"
|
||||
}
|
||||
},
|
||||
"node_modules/graceful-fs": {
|
||||
"version": "4.2.11",
|
||||
"resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz",
|
||||
@@ -3588,6 +3834,36 @@
|
||||
"integrity": "sha512-RuMffC89BOWQoY0WKGpIhn5gX3iI54O6nRA0yC124NYVtzjmFWBIiFd8M0x+ZdX0P9R4lADg1mgP8C7PxGOWuQ==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/html-minifier-terser": {
|
||||
"version": "7.2.0",
|
||||
"resolved": "https://registry.npmjs.org/html-minifier-terser/-/html-minifier-terser-7.2.0.tgz",
|
||||
"integrity": "sha512-tXgn3QfqPIpGl9o+K5tpcj3/MN4SfLtsx2GWwBC3SSd0tXQGyF3gsSqad8loJgKZGM3ZxbYDd5yhiBIdWpmvLA==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"camel-case": "^4.1.2",
|
||||
"clean-css": "~5.3.2",
|
||||
"commander": "^10.0.0",
|
||||
"entities": "^4.4.0",
|
||||
"param-case": "^3.0.4",
|
||||
"relateurl": "^0.2.7",
|
||||
"terser": "^5.15.1"
|
||||
},
|
||||
"bin": {
|
||||
"html-minifier-terser": "cli.js"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^14.13.1 || >=16.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/html-minifier-terser/node_modules/commander": {
|
||||
"version": "10.0.1",
|
||||
"resolved": "https://registry.npmjs.org/commander/-/commander-10.0.1.tgz",
|
||||
"integrity": "sha512-y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=14"
|
||||
}
|
||||
},
|
||||
"node_modules/html-void-elements": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/html-void-elements/-/html-void-elements-3.0.0.tgz",
|
||||
@@ -3640,6 +3916,27 @@
|
||||
"url": "https://github.com/sponsors/sindresorhus"
|
||||
}
|
||||
},
|
||||
"node_modules/is-extglob": {
|
||||
"version": "2.1.1",
|
||||
"resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz",
|
||||
"integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/is-glob": {
|
||||
"version": "4.0.3",
|
||||
"resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz",
|
||||
"integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"is-extglob": "^2.1.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/is-inside-container": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/is-inside-container/-/is-inside-container-1.0.0.tgz",
|
||||
@@ -3673,6 +3970,15 @@
|
||||
"url": "https://github.com/sponsors/sindresorhus"
|
||||
}
|
||||
},
|
||||
"node_modules/is-number": {
|
||||
"version": "7.0.0",
|
||||
"resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz",
|
||||
"integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=0.12.0"
|
||||
}
|
||||
},
|
||||
"node_modules/is-plain-obj": {
|
||||
"version": "4.1.0",
|
||||
"resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-4.1.0.tgz",
|
||||
@@ -3757,6 +4063,15 @@
|
||||
"node": ">=6"
|
||||
}
|
||||
},
|
||||
"node_modules/kleur": {
|
||||
"version": "4.1.5",
|
||||
"resolved": "https://registry.npmjs.org/kleur/-/kleur-4.1.5.tgz",
|
||||
"integrity": "sha512-o+NO+8WrRiQEE4/7nwRJhN1HWpVmJm511pBHUxPLtp0BUISzlBplORYSmTclCnJvQq2tKu/sgl3xVpkc7ZWuQQ==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=6"
|
||||
}
|
||||
},
|
||||
"node_modules/kolorist": {
|
||||
"version": "1.8.0",
|
||||
"resolved": "https://registry.npmjs.org/kolorist/-/kolorist-1.8.0.tgz",
|
||||
@@ -4055,6 +4370,15 @@
|
||||
"loose-envify": "cli.js"
|
||||
}
|
||||
},
|
||||
"node_modules/lower-case": {
|
||||
"version": "2.0.2",
|
||||
"resolved": "https://registry.npmjs.org/lower-case/-/lower-case-2.0.2.tgz",
|
||||
"integrity": "sha512-7fm3l3NAF9WfN6W3JOmf5drwpVqX78JtoGJ3A6W0a6ZnldM41w2fV5D490psKFTpMds8TJse/eHLFFsNHHjHgg==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"tslib": "^2.0.3"
|
||||
}
|
||||
},
|
||||
"node_modules/lru-cache": {
|
||||
"version": "5.1.1",
|
||||
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz",
|
||||
@@ -4380,6 +4704,15 @@
|
||||
"url": "https://github.com/sponsors/sindresorhus"
|
||||
}
|
||||
},
|
||||
"node_modules/merge2": {
|
||||
"version": "1.4.1",
|
||||
"resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz",
|
||||
"integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">= 8"
|
||||
}
|
||||
},
|
||||
"node_modules/micromark": {
|
||||
"version": "4.0.2",
|
||||
"resolved": "https://registry.npmjs.org/micromark/-/micromark-4.0.2.tgz",
|
||||
@@ -4943,6 +5276,31 @@
|
||||
],
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/micromatch": {
|
||||
"version": "4.0.8",
|
||||
"resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz",
|
||||
"integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"braces": "^3.0.3",
|
||||
"picomatch": "^2.3.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=8.6"
|
||||
}
|
||||
},
|
||||
"node_modules/micromatch/node_modules/picomatch": {
|
||||
"version": "2.3.2",
|
||||
"resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.2.tgz",
|
||||
"integrity": "sha512-V7+vQEJ06Z+c5tSye8S+nHUfI51xoXIXjHQ99cQtKUkQqqO1kO/KCJUfZXuB47h/YBlDhah2H3hdUGXn8ie0oA==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=8.6"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/jonschlinkert"
|
||||
}
|
||||
},
|
||||
"node_modules/minify-xml": {
|
||||
"version": "4.5.2",
|
||||
"resolved": "https://registry.npmjs.org/minify-xml/-/minify-xml-4.5.2.tgz",
|
||||
@@ -5015,6 +5373,16 @@
|
||||
"url": "https://opencollective.com/unified"
|
||||
}
|
||||
},
|
||||
"node_modules/no-case": {
|
||||
"version": "3.0.4",
|
||||
"resolved": "https://registry.npmjs.org/no-case/-/no-case-3.0.4.tgz",
|
||||
"integrity": "sha512-fgAN3jGAh+RoxUGZHTSOLJIqUc2wmoBwGR4tbpNAKmmovFoWq0OdRkb0VkldReO2a2iBT/OEulG9XSUc10r3zg==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"lower-case": "^2.0.2",
|
||||
"tslib": "^2.0.3"
|
||||
}
|
||||
},
|
||||
"node_modules/node-fetch-native": {
|
||||
"version": "1.6.7",
|
||||
"resolved": "https://registry.npmjs.org/node-fetch-native/-/node-fetch-native-1.6.7.tgz",
|
||||
@@ -5175,6 +5543,16 @@
|
||||
"integrity": "sha512-61A5ThoTiDG/C8s8UMZwSorAGwMJ0ERVGj2OjoW5pAalsNOg15+iQiPzrLJ4jhZ1HJzmC2PIHT2oEiH3R5fzNA==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/param-case": {
|
||||
"version": "3.0.4",
|
||||
"resolved": "https://registry.npmjs.org/param-case/-/param-case-3.0.4.tgz",
|
||||
"integrity": "sha512-RXlj7zCYokReqWpOPH9oYivUzLYZ5vAPIfEmCTNViosC78F8F0H9y7T7gG2M39ymgutxF5gcFEsyZQSph9Bp3A==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"dot-case": "^3.0.4",
|
||||
"tslib": "^2.0.3"
|
||||
}
|
||||
},
|
||||
"node_modules/parse-latin": {
|
||||
"version": "7.0.0",
|
||||
"resolved": "https://registry.npmjs.org/parse-latin/-/parse-latin-7.0.0.tgz",
|
||||
@@ -5217,6 +5595,16 @@
|
||||
"url": "https://github.com/fb55/entities?sponsor=1"
|
||||
}
|
||||
},
|
||||
"node_modules/pascal-case": {
|
||||
"version": "3.1.2",
|
||||
"resolved": "https://registry.npmjs.org/pascal-case/-/pascal-case-3.1.2.tgz",
|
||||
"integrity": "sha512-uWlGT3YSnK9x3BQJaOdcZwrnV6hPpd8jFH1/ucpiLRPh/2zCVJKS19E4GvYHvaCcACn3foXZ0cLB9Wrx1KGe5g==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"no-case": "^3.0.4",
|
||||
"tslib": "^2.0.3"
|
||||
}
|
||||
},
|
||||
"node_modules/piccolore": {
|
||||
"version": "0.1.3",
|
||||
"resolved": "https://registry.npmjs.org/piccolore/-/piccolore-0.1.3.tgz",
|
||||
@@ -5367,6 +5755,26 @@
|
||||
"node": ">=6"
|
||||
}
|
||||
},
|
||||
"node_modules/queue-microtask": {
|
||||
"version": "1.2.3",
|
||||
"resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz",
|
||||
"integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==",
|
||||
"funding": [
|
||||
{
|
||||
"type": "github",
|
||||
"url": "https://github.com/sponsors/feross"
|
||||
},
|
||||
{
|
||||
"type": "patreon",
|
||||
"url": "https://www.patreon.com/feross"
|
||||
},
|
||||
{
|
||||
"type": "consulting",
|
||||
"url": "https://feross.org/support"
|
||||
}
|
||||
],
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/radix3": {
|
||||
"version": "1.1.2",
|
||||
"resolved": "https://registry.npmjs.org/radix3/-/radix3-1.1.2.tgz",
|
||||
@@ -5506,6 +5914,15 @@
|
||||
"url": "https://opencollective.com/unified"
|
||||
}
|
||||
},
|
||||
"node_modules/relateurl": {
|
||||
"version": "0.2.7",
|
||||
"resolved": "https://registry.npmjs.org/relateurl/-/relateurl-0.2.7.tgz",
|
||||
"integrity": "sha512-G08Dxvm4iDN3MLM0EsP62EDV9IuhXPR6blNz6Utcp7zyV3tr4HVNINt6MpaRWbxoOHT3Q7YN2P+jaHX8vUbgog==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">= 0.10"
|
||||
}
|
||||
},
|
||||
"node_modules/remark-gfm": {
|
||||
"version": "4.0.1",
|
||||
"resolved": "https://registry.npmjs.org/remark-gfm/-/remark-gfm-4.0.1.tgz",
|
||||
@@ -5698,6 +6115,16 @@
|
||||
"url": "https://opencollective.com/unified"
|
||||
}
|
||||
},
|
||||
"node_modules/reusify": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/reusify/-/reusify-1.1.0.tgz",
|
||||
"integrity": "sha512-g6QUff04oZpHs0eG5p83rFLhHeV00ug/Yf9nZM6fLeUrPguBTkTQOdpAWWspMh55TZfVQDPaN3NQJfbVRAxdIw==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"iojs": ">=1.0.0",
|
||||
"node": ">=0.10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/rollup": {
|
||||
"version": "4.60.2",
|
||||
"resolved": "https://registry.npmjs.org/rollup/-/rollup-4.60.2.tgz",
|
||||
@@ -5742,6 +6169,29 @@
|
||||
"fsevents": "~2.3.2"
|
||||
}
|
||||
},
|
||||
"node_modules/run-parallel": {
|
||||
"version": "1.2.0",
|
||||
"resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz",
|
||||
"integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==",
|
||||
"funding": [
|
||||
{
|
||||
"type": "github",
|
||||
"url": "https://github.com/sponsors/feross"
|
||||
},
|
||||
{
|
||||
"type": "patreon",
|
||||
"url": "https://www.patreon.com/feross"
|
||||
},
|
||||
{
|
||||
"type": "consulting",
|
||||
"url": "https://feross.org/support"
|
||||
}
|
||||
],
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"queue-microtask": "^1.2.2"
|
||||
}
|
||||
},
|
||||
"node_modules/safe-buffer": {
|
||||
"version": "5.2.1",
|
||||
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz",
|
||||
@@ -5786,7 +6236,6 @@
|
||||
"integrity": "sha512-Ou9I5Ft9WNcCbXrU9cMgPBcCK8LiwLqcbywW3t4oDV37n1pzpuNLsYiAV8eODnjbtQlSDwZ2cUEeQz4E54Hltg==",
|
||||
"hasInstallScript": true,
|
||||
"license": "Apache-2.0",
|
||||
"optional": true,
|
||||
"dependencies": {
|
||||
"@img/colour": "^1.0.0",
|
||||
"detect-libc": "^2.1.2",
|
||||
@@ -5830,7 +6279,6 @@
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-7.7.4.tgz",
|
||||
"integrity": "sha512-vFKC2IEtQnVhpT78h1Yp8wzwrf8CM+MzKMHGJZfBtzhZNycRFnXsHk6E5TxIkkMsgNS7mdX3AGB7x2QM2di4lA==",
|
||||
"license": "ISC",
|
||||
"optional": true,
|
||||
"bin": {
|
||||
"semver": "bin/semver.js"
|
||||
},
|
||||
@@ -5902,6 +6350,25 @@
|
||||
"node": ">=0.10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/source-map-support": {
|
||||
"version": "0.5.21",
|
||||
"resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz",
|
||||
"integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"buffer-from": "^1.0.0",
|
||||
"source-map": "^0.6.0"
|
||||
}
|
||||
},
|
||||
"node_modules/source-map-support/node_modules/source-map": {
|
||||
"version": "0.6.1",
|
||||
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
|
||||
"integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
|
||||
"license": "BSD-3-Clause",
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/space-separated-tokens": {
|
||||
"version": "2.0.2",
|
||||
"resolved": "https://registry.npmjs.org/space-separated-tokens/-/space-separated-tokens-2.0.2.tgz",
|
||||
@@ -5994,6 +6461,30 @@
|
||||
"url": "https://opencollective.com/webpack"
|
||||
}
|
||||
},
|
||||
"node_modules/terser": {
|
||||
"version": "5.46.1",
|
||||
"resolved": "https://registry.npmjs.org/terser/-/terser-5.46.1.tgz",
|
||||
"integrity": "sha512-vzCjQO/rgUuK9sf8VJZvjqiqiHFaZLnOiimmUuOKODxWL8mm/xua7viT7aqX7dgPY60otQjUotzFMmCB4VdmqQ==",
|
||||
"license": "BSD-2-Clause",
|
||||
"dependencies": {
|
||||
"@jridgewell/source-map": "^0.3.3",
|
||||
"acorn": "^8.15.0",
|
||||
"commander": "^2.20.0",
|
||||
"source-map-support": "~0.5.20"
|
||||
},
|
||||
"bin": {
|
||||
"terser": "bin/terser"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=10"
|
||||
}
|
||||
},
|
||||
"node_modules/terser/node_modules/commander": {
|
||||
"version": "2.20.3",
|
||||
"resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz",
|
||||
"integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/tiny-inflate": {
|
||||
"version": "1.0.3",
|
||||
"resolved": "https://registry.npmjs.org/tiny-inflate/-/tiny-inflate-1.0.3.tgz",
|
||||
@@ -6034,6 +6525,18 @@
|
||||
"url": "https://github.com/sponsors/SuperchupuDev"
|
||||
}
|
||||
},
|
||||
"node_modules/to-regex-range": {
|
||||
"version": "5.0.1",
|
||||
"resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz",
|
||||
"integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"is-number": "^7.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=8.0"
|
||||
}
|
||||
},
|
||||
"node_modules/trim-lines": {
|
||||
"version": "3.0.1",
|
||||
"resolved": "https://registry.npmjs.org/trim-lines/-/trim-lines-3.0.1.tgz",
|
||||
@@ -6104,6 +6607,12 @@
|
||||
"integrity": "sha512-Ql87qFHB3s/De2ClA9e0gsnS6zXG27SkTiSJwjCc9MebbfapQfuPzumMIUMi38ezPZVNFcHI9sUIepeQfw8J8Q==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/undici-types": {
|
||||
"version": "7.19.2",
|
||||
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.19.2.tgz",
|
||||
"integrity": "sha512-qYVnV5OEm2AW8cJMCpdV20CDyaN3g0AjDlOGf1OW4iaDEx8MwdtChUp4zu4H0VP3nDRF/8RKWH+IPp9uW0YGZg==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/unified": {
|
||||
"version": "11.0.5",
|
||||
"resolved": "https://registry.npmjs.org/unified/-/unified-11.0.5.tgz",
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
"@astrojs/preact": "^5.1.2",
|
||||
"@directus/sdk": "^21.2.0",
|
||||
"@immich/justified-layout-wasm": "^0.4.3",
|
||||
"@playform/compress": "^0.2.3",
|
||||
"@rollup/plugin-graphql": "^2.0.5",
|
||||
"@tailwindcss/typography": "^0.5.19",
|
||||
"@tailwindcss/vite": "^4.2.4",
|
||||
|
||||
@@ -1 +1,3 @@
|
||||
// This file gets files, and puts them in the public folder before starting the build.
|
||||
export async function getFiles() {
|
||||
}
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
---
|
||||
import { getAllPaginatedBlogs } from '@/content/blogs/blogs';
|
||||
import { getSettings } from '@/content/settings/settings';
|
||||
import CalendarIcon from '@/icons/CalendarIcon.astro';
|
||||
import { getImageSize, getImageUrl } from '@/lib/images';
|
||||
import { markdownToHtml } from '@/lib/markdown';
|
||||
import { getBlogRoute } from '@/lib/routing';
|
||||
import { Image } from 'astro:assets';
|
||||
import { getAllPaginatedBlogs } from "@/content/blogs/blogs";
|
||||
import { getSettings } from "@/content/settings/settings";
|
||||
import CalendarIcon from "@/icons/CalendarIcon.astro";
|
||||
import { getImageSize, getImageUrl } from "@/lib/images";
|
||||
import { markdownToHtml } from "@/lib/markdown";
|
||||
import { getBlogRoute } from "@/lib/routing";
|
||||
import { Image } from "astro:assets";
|
||||
|
||||
interface Props {
|
||||
page: BlogIndex;
|
||||
|
||||
@@ -1,17 +1,14 @@
|
||||
---
|
||||
import CalendarIcon from '@/icons/CalendarIcon.astro';
|
||||
import { getImageSize, getImageUrl } from '@/lib/images';
|
||||
import { markdownToHtml } from '@/lib/markdown';
|
||||
import { getTypographyClasses } from '@/styles/markdownClasses';
|
||||
import { Image } from 'astro:assets';
|
||||
import CalendarIcon from "@/icons/CalendarIcon.astro";
|
||||
import { markdownToHtml } from "@/lib/markdown";
|
||||
import { getTypographyClasses } from "@/styles/markdownClasses";
|
||||
import { Image } from "astro:assets";
|
||||
|
||||
interface Props {
|
||||
blog: BlogPost;
|
||||
}
|
||||
|
||||
const { blog } = Astro.props;
|
||||
|
||||
const imageSize = getImageSize(blog.searchEngine.thumbnail.width, blog.searchEngine.thumbnail.height, 1);
|
||||
---
|
||||
|
||||
<div
|
||||
@@ -30,9 +27,9 @@ const imageSize = getImageSize(blog.searchEngine.thumbnail.width, blog.searchEng
|
||||
<div class="aspect-1200/630 w-full max-w-full overflow-hidden">
|
||||
<div class="w-full h-full rounded-2xl shadow-md object-cover">
|
||||
<Image
|
||||
src={getImageUrl(blog.searchEngine.thumbnail.url)}
|
||||
width={imageSize.width}
|
||||
height={imageSize.height}
|
||||
src={blog.searchEngine.thumbnail.url}
|
||||
width={blog.searchEngine.thumbnail.width}
|
||||
height={blog.searchEngine.thumbnail.height}
|
||||
alt={blog.title}
|
||||
class="rounded-2xl"
|
||||
/>
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
---
|
||||
import { getAlbumRoute, getPhotoRoute } from '@/lib/routing';
|
||||
import { AlbumPhotos } from './Album.tsx';
|
||||
import { getImageSize, getImageUrl } from '@/lib/images';
|
||||
import { getSettings } from '@/content/settings/settings';
|
||||
import Pagination from '../common/Pagination.astro';
|
||||
import { getAlbumRoute, getPhotoRoute } from "@/lib/routing";
|
||||
import { AlbumPhotos } from "./Album.tsx";
|
||||
import { getImageSize, getImageUrl } from "@/lib/images";
|
||||
import { getSettings } from "@/content/settings/settings";
|
||||
import Pagination from "@/components/common/Pagination.astro";
|
||||
|
||||
interface Props {
|
||||
page: PhotoAlbumPage;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { useEffect, useLayoutEffect, useRef, useState } from "preact/hooks";
|
||||
import { JustifiedLayout } from '@immich/justified-layout-wasm';
|
||||
import { JustifiedLayout } from "@immich/justified-layout-wasm";
|
||||
import { LoadingSpinner } from "@/icons/jsx/loadingSpinner";
|
||||
|
||||
export function AlbumPhotos(props: { photos: PhotoAlbumGalleryItem[] }) {
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
---
|
||||
import { getAllCategories } from "@/content/photos/categories";
|
||||
import { getSettings } from "@/content/settings/settings"
|
||||
import { getImageUrl } from "@/lib/images";
|
||||
import { getCategoryRoute } from "@/lib/routing";
|
||||
import { Image } from "astro:assets";
|
||||
|
||||
@@ -23,7 +22,7 @@ const categories = await getAllCategories(settings);
|
||||
<a href={getCategoryRoute(settings.photo, category)} class="group relative block w-[70%] overflow-hidden rounded-2xl shadow-md">
|
||||
<div>
|
||||
<Image
|
||||
src={getImageUrl(category.thumbnail.url)}
|
||||
src={category.thumbnail.url}
|
||||
alt={category.title}
|
||||
width={category.thumbnail.width}
|
||||
height={category.thumbnail.height}
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
---
|
||||
import { getAlbum } from '@/content/photos/albums';
|
||||
import { getSettings } from '@/content/settings/settings';
|
||||
import ChevronUp from '@/icons/ChevronUp.astro';
|
||||
import Download from '@/icons/Download.astro';
|
||||
import Close from '@/icons/Close.astro';
|
||||
import { getImageSize, getImageUrl } from '@/lib/images';
|
||||
import { getAlbumRoute, getPhotoRoute } from '@/lib/routing';
|
||||
import { getImage } from 'astro:assets';
|
||||
import { Image } from 'astro:assets';
|
||||
import { getPhotoHash } from '@/lib/hash';
|
||||
import { getAlbum } from "@/content/photos/albums";
|
||||
import { getSettings } from "@/content/settings/settings";
|
||||
import ChevronUp from "@/icons/ChevronUp.astro";
|
||||
import Download from "@/icons/Download.astro";
|
||||
import Close from "@/icons/Close.astro";
|
||||
import { getImageSize, getImageUrl } from "@/lib/images";
|
||||
import { getAlbumRoute, getPhotoRoute } from "@/lib/routing";
|
||||
import { getImage } from "astro:assets";
|
||||
import { Image } from "astro:assets";
|
||||
import { getPhotoHash } from "@/lib/hash";
|
||||
|
||||
interface Props {
|
||||
page: PhotoPage;
|
||||
|
||||
@@ -1,12 +1,11 @@
|
||||
---
|
||||
import { getSettings } from '@/content/settings/settings';
|
||||
import { getAllPaginatedProjects } from '@/content/projects/projects';
|
||||
import { markdownToHtml } from '@/lib/markdown';
|
||||
import { Image } from 'astro:assets';
|
||||
import { getProjectRoute } from '@/lib/routing';
|
||||
import CalendarIcon from '@/icons/CalendarIcon.astro';
|
||||
import { getImageSize, getImageUrl } from '@/lib/images';
|
||||
import { promise } from 'astro:schema';
|
||||
import { getSettings } from "@/content/settings/settings";
|
||||
import { getAllPaginatedProjects } from "@/content/projects/projects";
|
||||
import { markdownToHtml } from "@/lib/markdown";
|
||||
import { Image } from "astro:assets";
|
||||
import { getProjectRoute } from "@/lib/routing";
|
||||
import CalendarIcon from "@/icons/CalendarIcon.astro";
|
||||
import { getImageSize, getImageUrl } from "@/lib/images";
|
||||
|
||||
interface Props {
|
||||
page: ProjectIndex;
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
---
|
||||
import CalendarIcon from '@/icons/CalendarIcon.astro';
|
||||
import { getImageSize, getImageUrl } from '@/lib/images';
|
||||
import { markdownToHtml } from '@/lib/markdown';
|
||||
import { getTypographyClasses } from '@/styles/markdownClasses';
|
||||
import { Image } from 'astro:assets';
|
||||
import CalendarIcon from "@/icons/CalendarIcon.astro";
|
||||
import { getImageSize } from "@/lib/images";
|
||||
import { markdownToHtml } from "@/lib/markdown";
|
||||
import { getTypographyClasses } from "@/styles/markdownClasses";
|
||||
import { Image } from "astro:assets";
|
||||
|
||||
interface Props {
|
||||
project: ProjectPost;
|
||||
@@ -30,7 +30,7 @@ const imageSize = getImageSize(project.searchEngine.thumbnail.width, project.sea
|
||||
<div class="aspect-1200/630 w-full max-w-full overflow-hidden">
|
||||
<div class="w-full h-full rounded-2xl shadow-md object-cover">
|
||||
<Image
|
||||
src={getImageUrl(project.searchEngine.thumbnail.url)}
|
||||
src={project.searchEngine.thumbnail.url}
|
||||
width={imageSize.width}
|
||||
height={imageSize.height}
|
||||
alt={project.title}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
import { markdownToHtml } from '@/lib/markdown';
|
||||
import { Image } from 'astro:assets';
|
||||
import { markdownToHtml } from "@/lib/markdown";
|
||||
import { Image } from "astro:assets";
|
||||
|
||||
interface Props {
|
||||
contact: ContactComponent;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
import { markdownToHtml } from '@/lib/markdown';
|
||||
import { Image } from 'astro:assets';
|
||||
import { markdownToHtml } from "@/lib/markdown";
|
||||
import { Image } from "astro:assets";
|
||||
|
||||
interface Props {
|
||||
equipment: EquipmentTableComponent;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
import { markdownToHtml } from '@/lib/markdown';
|
||||
import { QuestionList } from '@/components/web/subcomponents/QuestionList.tsx';
|
||||
import { markdownToHtml } from "@/lib/markdown";
|
||||
import { QuestionList } from "@/components/web/subcomponents/QuestionList.tsx";
|
||||
|
||||
interface Props {
|
||||
faq: FrequentlyAskedQuestionsComponent;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
---
|
||||
import { Image } from 'astro:assets';
|
||||
import { Image } from "astro:assets";
|
||||
|
||||
interface Props {
|
||||
hero: HeroComponent;
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
---
|
||||
import { getLastBlogs } from '@/content/blogs/blogs';
|
||||
import { getSettings } from '@/content/settings/settings';
|
||||
import CalendarIcon from '@/icons/CalendarIcon.astro';
|
||||
import { getImageSize, getImageUrl } from '@/lib/images';
|
||||
import { getBlogRoute } from '@/lib/routing';
|
||||
import { Image } from 'astro:assets';
|
||||
import { getLastBlogs } from "@/content/blogs/blogs";
|
||||
import { getSettings } from "@/content/settings/settings";
|
||||
import CalendarIcon from "@/icons/CalendarIcon.astro";
|
||||
import { getImageSize, getImageUrl } from "@/lib/images";
|
||||
import { getBlogRoute } from "@/lib/routing";
|
||||
import { Image } from "astro:assets";
|
||||
|
||||
interface Props {
|
||||
blogs: LastBlogsComponent;
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
---
|
||||
import { getLastProjects } from '@/content/projects/projects';
|
||||
import { getSettings } from '@/content/settings/settings';
|
||||
import CalendarIcon from '@/icons/CalendarIcon.astro';
|
||||
import { getImageSize, getImageUrl } from '@/lib/images';
|
||||
import { getProjectRoute } from '@/lib/routing';
|
||||
import { Image } from 'astro:assets';
|
||||
import { getLastProjects } from "@/content/projects/projects";
|
||||
import { getSettings } from "@/content/settings/settings";
|
||||
import CalendarIcon from "@/icons/CalendarIcon.astro";
|
||||
import { getImageSize, getImageUrl } from "@/lib/images";
|
||||
import { getProjectRoute } from "@/lib/routing";
|
||||
import { Image } from "astro:assets";
|
||||
|
||||
interface Props {
|
||||
projects: LastProjectsComponent;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
import { markdownToHtml } from '@/lib/markdown';
|
||||
import StarRating from './subcomponents/StarRating.astro';
|
||||
import { markdownToHtml } from "@/lib/markdown";
|
||||
import StarRating from "./subcomponents/StarRating.astro";
|
||||
|
||||
interface Props {
|
||||
reviews: ReviewListComponent;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
import { markdownToHtml } from '@/lib/markdown';
|
||||
import { Image } from 'astro:assets';
|
||||
import { markdownToHtml } from "@/lib/markdown";
|
||||
import { Image } from "astro:assets";
|
||||
|
||||
interface Props {
|
||||
textWithImage: TextWithImageComponent;
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
---
|
||||
import CalendarIcon from '@/icons/CalendarIcon.astro';
|
||||
import { Image } from 'astro:assets';
|
||||
import { upcomingEvent as UpcomingEvent } from './subcomponents/UpcomingEvent';
|
||||
import { markdownToHtml } from '@/lib/markdown';
|
||||
import CalendarIcon from "@/icons/CalendarIcon.astro";
|
||||
import { Image } from "astro:assets";
|
||||
import { upcomingEvent as UpcomingEvent } from "./subcomponents/UpcomingEvent";
|
||||
import { markdownToHtml } from "@/lib/markdown";
|
||||
|
||||
interface Props {
|
||||
upcomingEvents: UpcomingEventsComponent;
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
---
|
||||
import FrequentlyAskedQuestions from '../web/FrequentlyAskedQuestions.astro';
|
||||
import Hero from '../web/Hero.astro';
|
||||
import TextWithImage from '../web/TextWithImage.astro';
|
||||
import UpcomingEvents from '../web/UpcomingEvents.astro';
|
||||
import WallOfText from '../web/WallOfText.astro';
|
||||
import EquipmentTable from '../web/EquipmentTable.astro';
|
||||
import Reviews from '../web/Reviews.astro';
|
||||
import LastBlogs from '../web/LastBlogs.astro';
|
||||
import LastProjects from '../web/LastProjects.astro';
|
||||
import LastAlbums from '../web/LastAlbums.astro';
|
||||
import Contact from '../web/Contact.astro';
|
||||
import FrequentlyAskedQuestions from '@/components/web/FrequentlyAskedQuestions.astro';
|
||||
import Hero from '@/components/web/Hero.astro';
|
||||
import TextWithImage from '@/components/web/TextWithImage.astro';
|
||||
import UpcomingEvents from '@/components/web/UpcomingEvents.astro';
|
||||
import WallOfText from '@/components/web/WallOfText.astro';
|
||||
import EquipmentTable from '@/components/web/EquipmentTable.astro';
|
||||
import Reviews from '@/components/web/Reviews.astro';
|
||||
import LastBlogs from '@/components/web/LastBlogs.astro';
|
||||
import LastProjects from '@/components/web/LastProjects.astro';
|
||||
import LastAlbums from '@/components/web/LastAlbums.astro';
|
||||
import Contact from '@/components/web/Contact.astro';
|
||||
|
||||
interface Props {
|
||||
webpage: WebpageComponent[];
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
import { createDirectusConnection } from "@/lib/directus";
|
||||
import { print } from 'graphql';
|
||||
import getBlogs from '@/graphql/blogs/getBlogs.graphql';
|
||||
import getBlogPost from '@/graphql/blogs/getBlog.graphql';
|
||||
import getLastBlogPosts from '@/graphql/blogs/getLastBlogPosts.graphql';
|
||||
import getPaginatedBlogs from '@/graphql/blogs/getPaginatedBlogs.graphql';
|
||||
import { print } from "graphql";
|
||||
import getBlogs from "@/graphql/blogs/getBlogs.graphql";
|
||||
import getBlogPost from "@/graphql/blogs/getBlog.graphql";
|
||||
import getLastBlogPosts from "@/graphql/blogs/getLastBlogPosts.graphql";
|
||||
import getPaginatedBlogs from "@/graphql/blogs/getPaginatedBlogs.graphql";
|
||||
import { formatDate } from "@/lib/dates";
|
||||
import { getImageSize } from "@/lib/images";
|
||||
import { getImageSize, getImageUrl } from "@/lib/images";
|
||||
import { getImage } from "astro:assets";
|
||||
|
||||
export async function getAllBlogs(settings: GlobalSettings): Promise<BlogPost[]> {
|
||||
const client = await createDirectusConnection();
|
||||
@@ -38,6 +39,11 @@ export async function getAllBlogs(settings: GlobalSettings): Promise<BlogPost[]>
|
||||
content: blogRecord["content"],
|
||||
date: blogRecord["date"],
|
||||
url: blogRecord["url"],
|
||||
thumbnail: {
|
||||
url: blogRecord["search_engine"][0]["thumbnail"]["filename_disk"],
|
||||
width: blogRecord["search_engine"][0]["thumbnail"]["width"],
|
||||
height: blogRecord["search_engine"][0]["thumbnail"]["height"]
|
||||
},
|
||||
searchEngine: {
|
||||
title: blogRecord["search_engine"][0]["title"],
|
||||
description: blogRecord["search_engine"][0]["description"],
|
||||
@@ -99,8 +105,15 @@ export async function getBlog(settings: GlobalSettings, route: string): Promise<
|
||||
blogRecord["search_engine"][0]["thumbnail"]["created_on"]
|
||||
];
|
||||
|
||||
const blogThumbnailImage =
|
||||
getImageSize(blogRecord["search_engine"][0]["thumbnail"]["width"], blogRecord["search_engine"][0]["thumbnail"]["height"], 0.756);
|
||||
const blogThumbnailImage = getImageSize(blogRecord["search_engine"][0]["thumbnail"]["width"],
|
||||
blogRecord["search_engine"][0]["thumbnail"]["height"], 0.756);
|
||||
|
||||
const thumbnail = await getImage({
|
||||
src: getImageUrl(blogRecord["search_engine"][0]["thumbnail"]["filename_disk"]),
|
||||
width: blogThumbnailImage.width,
|
||||
height: blogThumbnailImage.height,
|
||||
format: "jpeg"
|
||||
});
|
||||
|
||||
const blog: BlogPost = {
|
||||
exists: true,
|
||||
@@ -111,6 +124,11 @@ export async function getBlog(settings: GlobalSettings, route: string): Promise<
|
||||
content: blogRecord["content"],
|
||||
date: blogRecord["date"],
|
||||
url: blogRecord["url"],
|
||||
thumbnail: {
|
||||
url: blogRecord["search_engine"][0]["thumbnail"]["filename_disk"],
|
||||
width: blogRecord["search_engine"][0]["thumbnail"]["width"],
|
||||
height: blogRecord["search_engine"][0]["thumbnail"]["height"]
|
||||
},
|
||||
searchEngine: {
|
||||
title: blogRecord["search_engine"][0]["title"],
|
||||
description: blogRecord["search_engine"][0]["description"],
|
||||
@@ -118,7 +136,7 @@ export async function getBlog(settings: GlobalSettings, route: string): Promise<
|
||||
canonical: blogRecord["search_engine"][0]["canonical"],
|
||||
priority: blogRecord["search_engine"][0]["priority"],
|
||||
thumbnail: {
|
||||
url: blogRecord["search_engine"][0]["thumbnail"]["filename_disk"],
|
||||
url: `${settings.website.domainName}${thumbnail.src}`,
|
||||
width: blogThumbnailImage.width,
|
||||
height: blogThumbnailImage.height
|
||||
}
|
||||
@@ -181,6 +199,11 @@ export async function getLastBlogs(amount: number): Promise<BlogPost[]> {
|
||||
content: blogRecord["content"],
|
||||
date: blogRecord["date"],
|
||||
url: blogRecord["url"],
|
||||
thumbnail: {
|
||||
url: blogRecord["search_engine"][0]["thumbnail"]["filename_disk"],
|
||||
width: blogRecord["search_engine"][0]["thumbnail"]["width"],
|
||||
height: blogRecord["search_engine"][0]["thumbnail"]["height"]
|
||||
},
|
||||
searchEngine: {
|
||||
title: blogRecord["search_engine"][0]["title"],
|
||||
description: blogRecord["search_engine"][0]["description"],
|
||||
@@ -257,6 +280,11 @@ export async function getAllPaginatedBlogs(settings: GlobalSettings, page: numbe
|
||||
content: blogRecord["content"],
|
||||
date: blogRecord["date"],
|
||||
url: blogRecord["url"],
|
||||
thumbnail: {
|
||||
url: blogRecord["search_engine"][0]["thumbnail"]["filename_disk"],
|
||||
width: blogRecord["search_engine"][0]["thumbnail"]["width"],
|
||||
height: blogRecord["search_engine"][0]["thumbnail"]["height"]
|
||||
},
|
||||
searchEngine: {
|
||||
title: blogRecord["search_engine"][0]["title"],
|
||||
description: blogRecord["search_engine"][0]["description"],
|
||||
|
||||
@@ -1,95 +1,95 @@
|
||||
import { createDirectusConnection } from "@/lib/directus";
|
||||
import { print } from 'graphql';
|
||||
import { print } from "graphql";
|
||||
import type { Footer, FooterColumn, FooterSecondaryLink, FooterSocial } from "@/types/footers/footer";
|
||||
import getFooterQuery from '@/graphql/footer/getFooter.graphql';
|
||||
import getFooterQuery from "@/graphql/footer/getFooter.graphql";
|
||||
import { getImageUrl } from "@/lib/images";
|
||||
|
||||
export async function getFooter(): Promise<Footer> {
|
||||
const client = await createDirectusConnection();
|
||||
const result = await client.query(print(getFooterQuery));
|
||||
|
||||
const footerRecord = result['Footer'];
|
||||
const footerRecord = result["Footer"];
|
||||
|
||||
let dates: string[] = [
|
||||
footerRecord['date_created'],
|
||||
footerRecord['date_updated']
|
||||
footerRecord["date_created"],
|
||||
footerRecord["date_updated"]
|
||||
];
|
||||
|
||||
let footer: Footer = {
|
||||
id: footerRecord['id'],
|
||||
title: footerRecord['title'],
|
||||
id: footerRecord["id"],
|
||||
title: footerRecord["title"],
|
||||
logo: {
|
||||
url: getImageUrl(footerRecord['logo']['filename_disk']),
|
||||
width: footerRecord['logo']['width'],
|
||||
height: footerRecord['logo']['height']
|
||||
url: getImageUrl(footerRecord["logo"]["filename_disk"]),
|
||||
width: footerRecord["logo"]["width"],
|
||||
height: footerRecord["logo"]["height"]
|
||||
},
|
||||
copyright: footerRecord['copyright'],
|
||||
copyright: footerRecord["copyright"],
|
||||
columns: [],
|
||||
socials: null,
|
||||
secondaryLinks: null,
|
||||
lastModified: new Date()
|
||||
};
|
||||
|
||||
if (footerRecord['columns'] !== null) {
|
||||
footerRecord['columns'].forEach((footerColumn: any) => {
|
||||
if (footerRecord["columns"] !== null) {
|
||||
footerRecord["columns"].forEach((footerColumn: any) => {
|
||||
const column: FooterColumn = {
|
||||
id: footerColumn['id'],
|
||||
title: footerColumn['title'],
|
||||
id: footerColumn["id"],
|
||||
title: footerColumn["title"],
|
||||
links: []
|
||||
};
|
||||
|
||||
footerColumn['links'].forEach((columnLink: any) => {
|
||||
footerColumn["links"].forEach((columnLink: any) => {
|
||||
column.links.push({
|
||||
id: columnLink['id'],
|
||||
text: columnLink['text'],
|
||||
url: columnLink['url']
|
||||
id: columnLink["id"],
|
||||
text: columnLink["text"],
|
||||
url: columnLink["url"]
|
||||
});
|
||||
|
||||
dates.push(columnLink['date_created']);
|
||||
dates.push(columnLink['date_updated']);
|
||||
dates.push(columnLink["date_created"]);
|
||||
dates.push(columnLink["date_updated"]);
|
||||
});
|
||||
|
||||
footer.columns.push(column);
|
||||
|
||||
dates.push(footerColumn['date_created']);
|
||||
dates.push(footerColumn['date_updated']);
|
||||
dates.push(footerColumn["date_created"]);
|
||||
dates.push(footerColumn["date_updated"]);
|
||||
});
|
||||
}
|
||||
|
||||
if (footerRecord['socials'] !== null) {
|
||||
if (footerRecord["socials"] !== null) {
|
||||
let socials: FooterSocial[] = [];
|
||||
|
||||
footerRecord['socials'].forEach((footerSocial: any) => {
|
||||
footerRecord["socials"].forEach((footerSocial: any) => {
|
||||
socials.push({
|
||||
id: footerSocial['id'],
|
||||
name: footerSocial['name'],
|
||||
url: footerSocial['url'],
|
||||
id: footerSocial["id"],
|
||||
name: footerSocial["name"],
|
||||
url: footerSocial["url"],
|
||||
icon: {
|
||||
url: getImageUrl(footerSocial['icon']['filename_disk']),
|
||||
width: footerSocial['icon']['width'],
|
||||
height: footerSocial['icon']['height']
|
||||
url: getImageUrl(footerSocial["icon"]["filename_disk"]),
|
||||
width: footerSocial["icon"]["width"],
|
||||
height: footerSocial["icon"]["height"]
|
||||
}
|
||||
});
|
||||
|
||||
dates.push(footerSocial['date_created']);
|
||||
dates.push(footerSocial['date_updated']);
|
||||
dates.push(footerSocial["date_created"]);
|
||||
dates.push(footerSocial["date_updated"]);
|
||||
});
|
||||
|
||||
footer.socials = socials;
|
||||
}
|
||||
|
||||
if (footerRecord['secondary_links'] !== null) {
|
||||
if (footerRecord["secondary_links"] !== null) {
|
||||
let secondaryLinks: FooterSecondaryLink[] = [];
|
||||
|
||||
footerRecord['secondary_links'].forEach((footerSecondaryLink: any) => {
|
||||
footerRecord["secondary_links"].forEach((footerSecondaryLink: any) => {
|
||||
secondaryLinks.push({
|
||||
id: footerSecondaryLink['id'],
|
||||
text: footerSecondaryLink['text'],
|
||||
url: footerSecondaryLink['url']
|
||||
id: footerSecondaryLink["id"],
|
||||
text: footerSecondaryLink["text"],
|
||||
url: footerSecondaryLink["url"]
|
||||
});
|
||||
|
||||
dates.push(footerSecondaryLink['date_created']);
|
||||
dates.push(footerSecondaryLink['date_updated']);
|
||||
dates.push(footerSecondaryLink["date_created"]);
|
||||
dates.push(footerSecondaryLink["date_updated"]);
|
||||
});
|
||||
|
||||
footer.secondaryLinks = secondaryLinks;
|
||||
|
||||
@@ -6,28 +6,28 @@ export async function getMenu(): Promise<Menu> {
|
||||
const client = await createDirectusConnection();
|
||||
const result = await client.query(print(getMenuQuery));
|
||||
|
||||
const menuRecord = result['Menu'];
|
||||
const menuRecord = result["Menu"];
|
||||
|
||||
let menu: Menu = {
|
||||
id: menuRecord['id'],
|
||||
id: menuRecord["id"],
|
||||
items: []
|
||||
};
|
||||
|
||||
menuRecord['items'].forEach((menuItem: any) => {
|
||||
if (menuItem['collection'] === "Menu_Column") {
|
||||
menuRecord["items"].forEach((menuItem: any) => {
|
||||
if (menuItem["collection"] === "Menu_Column") {
|
||||
let menuColumnItem: MenuColumn = {
|
||||
id: menuItem['item']['id'],
|
||||
id: menuItem["item"]["id"],
|
||||
type: "Column",
|
||||
title: menuItem['item']['title'],
|
||||
title: menuItem["item"]["title"],
|
||||
links: []
|
||||
};
|
||||
|
||||
menuItem['item']['links'].forEach((menuItemLink: any) => {
|
||||
menuItem["item"]["links"].forEach((menuItemLink: any) => {
|
||||
menuColumnItem.links.push({
|
||||
id: menuItemLink['id'],
|
||||
id: menuItemLink["id"],
|
||||
type: "Link",
|
||||
text: menuItemLink['text'],
|
||||
url: menuItemLink['url']
|
||||
text: menuItemLink["text"],
|
||||
url: menuItemLink["url"]
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { createDirectusConnection } from "@/lib/directus";
|
||||
import { print } from 'graphql';
|
||||
import { print } from "graphql";
|
||||
import { formatDate } from "@/lib/dates";
|
||||
import getAllPages from "@/graphql/pages/getAllPages.graphql";
|
||||
import getPage from "@/graphql/pages/getPage.graphql";
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import { createDirectusConnection } from "@/lib/directus";
|
||||
import { print } from "graphql";
|
||||
import getAlbums from '@/graphql/photos/getAlbums.graphql';
|
||||
import getAlbumItem from '@/graphql/photos/getAlbum.graphql';
|
||||
import getLastAlbumsQuery from '@/graphql/photos/getLastAlbums.graphql';
|
||||
import getCategoryAlbumQuery from '@/graphql/photos/getCategoryAlbum.graphql';
|
||||
import getAlbums from "@/graphql/photos/getAlbums.graphql";
|
||||
import getAlbumItem from "@/graphql/photos/getAlbum.graphql";
|
||||
import getLastAlbumsQuery from "@/graphql/photos/getLastAlbums.graphql";
|
||||
import getCategoryAlbumQuery from "@/graphql/photos/getCategoryAlbum.graphql";
|
||||
import { formatDate } from "@/lib/dates";
|
||||
import { getImageSize } from "@/lib/images";
|
||||
|
||||
@@ -135,7 +135,7 @@ export async function getAlbum(settings: GlobalSettings, route: string): Promise
|
||||
}
|
||||
},
|
||||
thumbnail: {
|
||||
url: albumRecord["thumbnail"]["filename_download"],
|
||||
url: albumRecord["thumbnail"]["filename_disk"],
|
||||
width: thumbnailImage.width,
|
||||
height: thumbnailImage.height
|
||||
},
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { createDirectusConnection } from "@/lib/directus";
|
||||
import { print } from "graphql";
|
||||
import getCategories from '@/graphql/photos/getCategories.graphql';
|
||||
import getCategory from '@/graphql/photos/getCategory.graphql';
|
||||
import { getImageSize } from "@/lib/images";
|
||||
import getCategories from "@/graphql/photos/getCategories.graphql";
|
||||
import getCategory from "@/graphql/photos/getCategory.graphql";
|
||||
import { getImageSize, getImageUrl } from "@/lib/images";
|
||||
|
||||
export async function getAllCategories(settings: GlobalSettings): Promise<PhotoAlbumCategory[]> {
|
||||
const client = await createDirectusConnection();
|
||||
@@ -11,15 +11,15 @@ export async function getAllCategories(settings: GlobalSettings): Promise<PhotoA
|
||||
let categories: PhotoAlbumCategory[] = [];
|
||||
|
||||
result["Photo_Categories"].forEach((photoCategoryRecord: any) => {
|
||||
const imageSize =
|
||||
getImageSize(photoCategoryRecord["thumbnail"]["width"], photoCategoryRecord["thumbnail"]["height"], 1.5);
|
||||
const imageSize = getImageSize(photoCategoryRecord["thumbnail"]["width"],
|
||||
photoCategoryRecord["thumbnail"]["height"], 1.5);
|
||||
|
||||
categories.push({
|
||||
id: photoCategoryRecord["id"],
|
||||
title: photoCategoryRecord["title"],
|
||||
url: photoCategoryRecord["url"],
|
||||
thumbnail: {
|
||||
url: photoCategoryRecord["thumbnail"]["filename_disk"],
|
||||
url: getImageUrl(photoCategoryRecord["thumbnail"]["filename_disk"]),
|
||||
width: imageSize.width,
|
||||
height: imageSize.height
|
||||
}
|
||||
@@ -37,15 +37,15 @@ export async function getPhotoCategory(url: string): Promise<PhotoAlbumCategory>
|
||||
|
||||
const item = result["Photo_Categories"][0];
|
||||
|
||||
const imageSize =
|
||||
getImageSize(item["thumbnail"]["width"], item["thumbnail"]["height"], 1.5);
|
||||
const imageSize = getImageSize(item["thumbnail"]["width"],
|
||||
item["thumbnail"]["height"], 1.5);
|
||||
|
||||
let categories: PhotoAlbumCategory = {
|
||||
id: item["id"],
|
||||
title: item["title"],
|
||||
url: item["url"],
|
||||
thumbnail: {
|
||||
url: item["thumbnail"]["filename_disk"],
|
||||
url: getImageUrl(item["thumbnail"]["filename_disk"]),
|
||||
width: imageSize.width,
|
||||
height: imageSize.height
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { createDirectusConnection } from "@/lib/directus";
|
||||
import { print } from "graphql";
|
||||
import getPhotos from '@/graphql/photos/getPhotos.graphql';
|
||||
import getPhotos from "@/graphql/photos/getPhotos.graphql";
|
||||
import md5 from "md5";
|
||||
|
||||
export async function getPhotoFromHash(albumUrl: string, hash: string): Promise<PhotoAlbumItem | null> {
|
||||
@@ -14,7 +14,7 @@ export async function getPhotoFromHash(albumUrl: string, hash: string): Promise<
|
||||
result["Photo_Albums"][0]["photos"].forEach((photo: any) => {
|
||||
/*
|
||||
* I have decided to not put the getImageSize here, it can mess up the
|
||||
* hashing, or anything else. It seems smarter to do this in the photo's and galleries.
|
||||
* hashing, or anything else. It seems smarter to do this in the photo"s and galleries.
|
||||
*/
|
||||
|
||||
const hashObject = md5(JSON.stringify({
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
import { formatDate } from "@/lib/dates";
|
||||
import { createDirectusConnection } from "@/lib/directus";
|
||||
import { print } from "graphql";
|
||||
import getProjects from '@/graphql/projects/getProjects.graphql';
|
||||
import getProjectPost from '@/graphql/projects/getProject.graphql';
|
||||
import getLastProjectsQuery from '@/graphql/projects/getLastProjects.graphql';
|
||||
import { getImageSize } from "@/lib/images";
|
||||
import getProjects from "@/graphql/projects/getProjects.graphql";
|
||||
import getProjectPost from "@/graphql/projects/getProject.graphql";
|
||||
import getLastProjectsQuery from "@/graphql/projects/getLastProjects.graphql";
|
||||
import { getImageSize, getImageUrl } from "@/lib/images";
|
||||
import { getImage } from "astro:assets";
|
||||
|
||||
export async function getAllProjects(settings: GlobalSettings): Promise<ProjectPost[]> {
|
||||
const client = await createDirectusConnection();
|
||||
@@ -25,8 +26,8 @@ export async function getAllProjects(settings: GlobalSettings): Promise<ProjectP
|
||||
projectRecord["search_engine"][0]["thumbnail"]["created_on"]
|
||||
];
|
||||
|
||||
const projectThumbnailImage =
|
||||
getImageSize(projectRecord["search_engine"][0]["thumbnail"]["width"], projectRecord["search_engine"][0]["thumbnail"]["height"], 0.756)
|
||||
const projectThumbnailImage = getImageSize(projectRecord["search_engine"][0]["thumbnail"]["width"],
|
||||
projectRecord["search_engine"][0]["thumbnail"]["height"], 0.756);
|
||||
|
||||
const project: ProjectPost = {
|
||||
exists: true,
|
||||
@@ -37,6 +38,11 @@ export async function getAllProjects(settings: GlobalSettings): Promise<ProjectP
|
||||
content: projectRecord["content"],
|
||||
date: projectRecord["date"],
|
||||
url: projectRecord["url"],
|
||||
thumbnail: {
|
||||
url: getImageUrl(projectRecord["search_engine"][0]["thumbnail"]["filename_disk"]),
|
||||
width: projectRecord["search_engine"][0]["thumbnail"]["width"],
|
||||
height: projectRecord["search_engine"][0]["thumbnail"]["height"]
|
||||
},
|
||||
searchEngine: {
|
||||
title: projectRecord["search_engine"][0]["title"],
|
||||
description: projectRecord["search_engine"][0]["description"],
|
||||
@@ -44,7 +50,7 @@ export async function getAllProjects(settings: GlobalSettings): Promise<ProjectP
|
||||
canonical: projectRecord["search_engine"][0]["canonical"],
|
||||
priority: projectRecord["search_engine"][0]["priority"],
|
||||
thumbnail: {
|
||||
url: projectRecord["search_engine"][0]["thumbnail"]["filename_disk"],
|
||||
url: getImageUrl(projectRecord["search_engine"][0]["thumbnail"]["filename_disk"]),
|
||||
width: projectThumbnailImage.width,
|
||||
height: projectThumbnailImage.height
|
||||
}
|
||||
@@ -98,8 +104,15 @@ export async function getProject(settings: GlobalSettings, route: string): Promi
|
||||
projectRecord["search_engine"][0]["thumbnail"]["created_on"]
|
||||
];
|
||||
|
||||
const projectThumbnailImage =
|
||||
getImageSize(projectRecord["search_engine"][0]["thumbnail"]["width"], projectRecord["search_engine"][0]["thumbnail"]["height"], 0.756)
|
||||
const projectThumbnailImage = getImageSize(projectRecord["search_engine"][0]["thumbnail"]["width"],
|
||||
projectRecord["search_engine"][0]["thumbnail"]["height"], 0.756);
|
||||
|
||||
const thumbnail = await getImage({
|
||||
src: getImageUrl(projectRecord["search_engine"][0]["thumbnail"]["filename_disk"]),
|
||||
width: projectThumbnailImage.width,
|
||||
height: projectThumbnailImage.height,
|
||||
format: "jpeg"
|
||||
});
|
||||
|
||||
const project: ProjectPost = {
|
||||
type: "ProjectPost",
|
||||
@@ -111,6 +124,11 @@ export async function getProject(settings: GlobalSettings, route: string): Promi
|
||||
content: projectRecord["content"],
|
||||
date: projectRecord["date"],
|
||||
url: projectRecord["url"],
|
||||
thumbnail: {
|
||||
url: projectRecord["search_engine"][0]["thumbnail"]["filename_disk"],
|
||||
width: projectRecord["search_engine"][0]["thumbnail"]["width"],
|
||||
height: projectRecord["search_engine"][0]["thumbnail"]["height"]
|
||||
},
|
||||
searchEngine: {
|
||||
title: projectRecord["search_engine"][0]["title"],
|
||||
description: projectRecord["search_engine"][0]["description"],
|
||||
@@ -118,7 +136,7 @@ export async function getProject(settings: GlobalSettings, route: string): Promi
|
||||
canonical: projectRecord["search_engine"][0]["canonical"],
|
||||
priority: projectRecord["search_engine"][0]["priority"],
|
||||
thumbnail: {
|
||||
url: projectRecord["search_engine"][0]["thumbnail"]["filename_disk"],
|
||||
url: `${settings.website.domainName}${thumbnail.src}`,
|
||||
width: projectThumbnailImage.width,
|
||||
height: projectThumbnailImage.height
|
||||
}
|
||||
@@ -181,6 +199,11 @@ export async function getLastProjects(amount: number): Promise<ProjectPost[]> {
|
||||
content: projectRecord["content"],
|
||||
date: projectRecord["date"],
|
||||
url: projectRecord["url"],
|
||||
thumbnail: {
|
||||
url: projectRecord["search_engine"][0]["thumbnail"]["filename_disk"],
|
||||
width: projectRecord["search_engine"][0]["thumbnail"]["width"],
|
||||
height: projectRecord["search_engine"][0]["thumbnail"]["height"]
|
||||
},
|
||||
searchEngine: {
|
||||
title: projectRecord["search_engine"][0]["title"],
|
||||
description: projectRecord["search_engine"][0]["description"],
|
||||
@@ -257,6 +280,11 @@ export async function getAllPaginatedProjects(settings: GlobalSettings, page: nu
|
||||
content: projectRecord["content"],
|
||||
date: projectRecord["date"],
|
||||
url: projectRecord["url"],
|
||||
thumbnail: {
|
||||
url: projectRecord["search_engine"][0]["thumbnail"]["filename_disk"],
|
||||
width: projectRecord["search_engine"][0]["thumbnail"]["width"],
|
||||
height: projectRecord["search_engine"][0]["thumbnail"]["height"]
|
||||
},
|
||||
searchEngine: {
|
||||
title: projectRecord["search_engine"][0]["title"],
|
||||
description: projectRecord["search_engine"][0]["description"],
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { createDirectusConnection } from "@/lib/directus";
|
||||
import { print } from 'graphql';
|
||||
import getRobotsQuery from '@/graphql/settings/robots.graphql';
|
||||
import { print } from "graphql";
|
||||
import getRobotsQuery from "@/graphql/settings/robots.graphql";
|
||||
|
||||
export async function getRobotsSettings(): Promise<RobotsSettings> {
|
||||
const client = await createDirectusConnection();
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { print } from 'graphql';
|
||||
import { print } from "graphql";
|
||||
import { createDirectusConnection } from "@/lib/directus";
|
||||
import getSettingsQuery from '@/graphql/settings/settings.graphql';
|
||||
import getSettingsQuery from "@/graphql/settings/settings.graphql";
|
||||
|
||||
export async function getSettings(): Promise<GlobalSettings> {
|
||||
const client = await createDirectusConnection();
|
||||
|
||||
@@ -1,13 +1,14 @@
|
||||
---
|
||||
import '@/styles/global.css';
|
||||
import "@/styles/global.css";
|
||||
import { getSettings } from "@/content/settings/settings";
|
||||
import { getTextColor } from '@/lib/colors';
|
||||
import Footer from '@/components/footer/Footer.astro';
|
||||
import { getTextColor } from "@/lib/colors";
|
||||
import Footer from "@/components/footer/Footer.astro";
|
||||
|
||||
interface Props {
|
||||
settings: BlogLayoutProps;
|
||||
}
|
||||
|
||||
const tags = Astro.props.settings.tags ?? [];
|
||||
const pageSettings = Astro.props.settings.searchEngine;
|
||||
const settings = await getSettings();
|
||||
|
||||
@@ -42,7 +43,7 @@ const css = {
|
||||
<link rel="alternate" type="application/rss+xml" href="/rss.xml" title="RSS" />
|
||||
<link rel="canonical" href={`${settings.website.domainName}/`} />
|
||||
<meta name="robots" content="index,follow" />
|
||||
<meta name="keywords" content={[].join(',')} />
|
||||
<meta name="keywords" content={tags.join(",")} />
|
||||
|
||||
<!-- Low Priority Page Metadata -->
|
||||
<meta name="description" content={pageSettings.description} />
|
||||
@@ -55,7 +56,7 @@ const css = {
|
||||
<meta property="og:url" content={`${settings.website.domainName}${Astro.url.pathname}`} />
|
||||
<meta property="og:site_name" content={settings.website.applicationName} />
|
||||
<meta property="article:author" content={settings.website.author.name} />
|
||||
<meta property="article:tags" content={[].join(',')} />
|
||||
<meta property="article:tags" content={[].join(",")} />
|
||||
|
||||
<meta name="twitter:card" content="summary_large_image" />
|
||||
<meta name="twitter:title" content={settings.website.titleTemplate.replaceAll("%T", pageSettings.title)} />
|
||||
|
||||
@@ -2,7 +2,8 @@
|
||||
import '@/styles/global.css';
|
||||
import { getSettings } from "@/content/settings/settings";
|
||||
import { getTextColor } from '@/lib/colors';
|
||||
import Footer from '@/components/footer/Footer.astro';
|
||||
import { getImageSize } from '@/lib/images';
|
||||
import { getImage } from 'astro:assets';
|
||||
|
||||
interface Props {
|
||||
settings: WebpageLayoutProps;
|
||||
@@ -19,6 +20,21 @@ const css = {
|
||||
? getTextColor(settings.website.colors.secondary)
|
||||
: getTextColor(settings.website.colors.primary)
|
||||
};
|
||||
|
||||
const searchengine = Astro.props.settings.searchEngine;
|
||||
|
||||
// Changing the thumbnail here is okay, as we now have two images: a new thumbnail, and the original image.
|
||||
// Might have to make it prettier down the line?
|
||||
// TODO: See comment above.
|
||||
const resizedThumbnail = getImageSize(searchengine.thumbnail.width,
|
||||
searchengine.thumbnail.height, 0.756);
|
||||
|
||||
const thumbnail = await getImage({
|
||||
src: searchengine.thumbnail.url,
|
||||
width: resizedThumbnail.width,
|
||||
height: resizedThumbnail.height,
|
||||
format: "jpeg"
|
||||
});
|
||||
---
|
||||
|
||||
<!DOCTYPE html>
|
||||
@@ -50,14 +66,14 @@ const css = {
|
||||
<meta property="og:locale" content="en-GB" />
|
||||
<meta property="og:title" content={settings.website.titleTemplate.replaceAll("%T", pageSettings.title)} />
|
||||
<meta property="og:description" content={pageSettings.description} />
|
||||
<meta property="og:image:url" content={pageSettings.thumbnail.url} />
|
||||
<meta property="og:image:url" content={`${settings.website.domainName}${thumbnail.src}`} />
|
||||
<meta property="og:url" content={`${settings.website.domainName}${Astro.url.pathname}`} />
|
||||
<meta property="og:site_name" content={settings.website.applicationName} />
|
||||
|
||||
<meta name="twitter:card" content="summary_large_image" />
|
||||
<meta name="twitter:title" content={settings.website.titleTemplate.replaceAll("%T", pageSettings.title)} />
|
||||
<meta name="twitter:description" content={pageSettings.description} />
|
||||
<meta name="twitter:image" content={pageSettings.thumbnail.url} />
|
||||
<meta name="twitter:image" content={`${settings.website.domainName}${thumbnail.src}`} />
|
||||
<meta name="twitter:url" content={`${settings.website.domainName}${Astro.url.pathname}`} />
|
||||
<meta name="twitter:site" content={settings.website.twitter.handle} />
|
||||
<meta name="twitter:creator" content={settings.website.twitter.handle} />
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
---
|
||||
import '@/styles/global.css';
|
||||
import "@/styles/global.css";
|
||||
import { getSettings } from "@/content/settings/settings";
|
||||
import { getTextColor } from '@/lib/colors';
|
||||
import Footer from '@/components/footer/Footer.astro';
|
||||
import { getTextColor } from "@/lib/colors";
|
||||
import Footer from "@/components/footer/Footer.astro";
|
||||
|
||||
interface Props {
|
||||
settings: BlogLayoutProps;
|
||||
@@ -42,7 +42,7 @@ const css = {
|
||||
<link rel="alternate" type="application/rss+xml" href="/rss.xml" title="RSS" />
|
||||
<link rel="canonical" href={`${settings.website.domainName}/`} />
|
||||
<meta name="robots" content="index,follow" />
|
||||
<meta name="keywords" content={[].join(',')} />
|
||||
<meta name="keywords" content={[].join(",")} />
|
||||
|
||||
<!-- Low Priority Page Metadata -->
|
||||
<meta name="description" content={pageSettings.description} />
|
||||
@@ -55,7 +55,7 @@ const css = {
|
||||
<meta property="og:url" content={`${settings.website.domainName}${Astro.url.pathname}`} />
|
||||
<meta property="og:site_name" content={settings.website.applicationName} />
|
||||
<meta property="article:author" content={settings.website.author.name} />
|
||||
<meta property="article:tags" content={[].join(',')} />
|
||||
<meta property="article:tags" content={[].join(",")} />
|
||||
|
||||
<meta name="twitter:card" content="summary_large_image" />
|
||||
<meta name="twitter:title" content={settings.website.titleTemplate.replaceAll("%T", pageSettings.title)} />
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
---
|
||||
import '@/styles/global.css';
|
||||
import "@/styles/global.css";
|
||||
import { getSettings } from "@/content/settings/settings";
|
||||
import { getTextColor } from '@/lib/colors';
|
||||
import Footer from '@/components/footer/Footer.astro';
|
||||
import { getTextColor } from "@/lib/colors";
|
||||
import Footer from "@/components/footer/Footer.astro";
|
||||
|
||||
interface Props {
|
||||
settings: WebpageLayoutProps;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
export function getTextColor(bgColor: string) {
|
||||
// Remove # if present
|
||||
const hex = bgColor.replace('#', '');
|
||||
const hex = bgColor.replace("#", "");
|
||||
|
||||
// Convert hex to RGB
|
||||
const r = parseInt(hex.substring(0, 2), 16) / 255;
|
||||
@@ -19,5 +19,5 @@ export function getTextColor(bgColor: string) {
|
||||
const luminance = 0.2126 * R + 0.7152 * G + 0.0722 * B;
|
||||
|
||||
// Return white for dark backgrounds, black for light backgrounds
|
||||
return luminance > 0.179 ? '#000000' : '#fcfcfc';
|
||||
return luminance > 0.179 ? "#000000" : "#fcfcfc";
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
export function formatDate(date: Date, format: string) {
|
||||
return format
|
||||
.replaceAll("%Y", date.getFullYear().toString())
|
||||
.replaceAll("%M", (date.getMonth() + 1).toString().padStart(2, '0'))
|
||||
.replaceAll("%D", date.getDate().toString().padStart(2, '0'));
|
||||
.replaceAll("%M", (date.getMonth() + 1).toString().padStart(2, "0"))
|
||||
.replaceAll("%D", date.getDate().toString().padStart(2, "0"));
|
||||
}
|
||||
|
||||
@@ -4,6 +4,8 @@ import { getAlbum } from "@/content/photos/albums";
|
||||
import { getAllCategories, getPhotoCategory } from "@/content/photos/categories";
|
||||
import { getPhotoFromHash } from "@/content/photos/photos";
|
||||
import { getProject } from "@/content/projects/projects";
|
||||
import { getImageSize, getImageUrl } from "./images";
|
||||
import { getImage } from "astro:assets";
|
||||
|
||||
export async function getPage(settings: GlobalSettings, route: string): Promise<PageType | null> {
|
||||
// Blog Index
|
||||
@@ -95,6 +97,24 @@ export async function getPage(settings: GlobalSettings, route: string): Promise<
|
||||
const allCategories = await getAllCategories(settings);
|
||||
const lastCategory = allCategories[0];
|
||||
|
||||
// Changing the thumbnail here is okay, as it gets everything again in the CategoryIndex.astro file.
|
||||
// Might have to make it prettier down the line?
|
||||
// TODO: See comment above.
|
||||
const resizedThumbnail = getImageSize(lastCategory.thumbnail.width, lastCategory.thumbnail.height, 0.756);
|
||||
|
||||
const thumbnail = await getImage({
|
||||
src: lastCategory.thumbnail.url,
|
||||
width: resizedThumbnail.width,
|
||||
height: resizedThumbnail.height,
|
||||
format: "jpeg"
|
||||
});
|
||||
|
||||
lastCategory.thumbnail = {
|
||||
url: `${settings.website.domainName}${thumbnail.src}`,
|
||||
width: resizedThumbnail.width,
|
||||
height: resizedThumbnail.height
|
||||
}
|
||||
|
||||
return {
|
||||
route: route,
|
||||
pageType: "PhotoCategoryIndex",
|
||||
@@ -119,6 +139,24 @@ export async function getPage(settings: GlobalSettings, route: string): Promise<
|
||||
|
||||
const category = await getPhotoCategory(`/${params["C"]}`);
|
||||
|
||||
// Changing the thumbnail here is okay, as it gets everything again in the Category.astro file.
|
||||
// Might have to make it prettier down the line?
|
||||
// TODO: See comment above.
|
||||
const resizedThumbnail = getImageSize(category.thumbnail.width, category.thumbnail.height, 0.756);
|
||||
|
||||
const thumbnail = await getImage({
|
||||
src: category.thumbnail.url,
|
||||
width: resizedThumbnail.width,
|
||||
height: resizedThumbnail.height,
|
||||
format: "jpeg"
|
||||
});
|
||||
|
||||
category.thumbnail = {
|
||||
url: `${settings.website.domainName}${thumbnail.src}`,
|
||||
width: resizedThumbnail.width,
|
||||
height: resizedThumbnail.height
|
||||
};
|
||||
|
||||
return {
|
||||
route: route,
|
||||
pageType: "PhotoCategory",
|
||||
@@ -143,13 +181,30 @@ export async function getPage(settings: GlobalSettings, route: string): Promise<
|
||||
});
|
||||
|
||||
const photoAlbum = await getAlbum(settings, `/${params["R"]}`);
|
||||
|
||||
// Changing the thumbnail here is okay, as the thumbnail is unused in the Album.astro file.
|
||||
// Might have to make it prettier down the line?
|
||||
// TODO: See comment above.
|
||||
const resizedThumbnail = getImageSize(photoAlbum.thumbnail.width, photoAlbum.thumbnail.height, 0.756);
|
||||
|
||||
const thumbnail = await getImage({
|
||||
src: getImageUrl(photoAlbum.thumbnail.url),
|
||||
width: resizedThumbnail.width,
|
||||
height: resizedThumbnail.height,
|
||||
format: "jpeg"
|
||||
});
|
||||
|
||||
return {
|
||||
route: route,
|
||||
pageType: "PhotoAlbum",
|
||||
page: {
|
||||
...photoAlbum,
|
||||
pageNumber: params["page"] !== undefined ? Number(params['page']) : 1
|
||||
thumbnail: {
|
||||
url: `${settings.website.domainName}${thumbnail.src}`,
|
||||
width: resizedThumbnail.width,
|
||||
height: resizedThumbnail.height
|
||||
},
|
||||
pageNumber: params["page"] !== undefined ? Number(params["page"]) : 1
|
||||
}
|
||||
};
|
||||
}
|
||||
@@ -198,7 +253,17 @@ export async function getPage(settings: GlobalSettings, route: string): Promise<
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const resizedImage = getImageSize(webpageContent.searchEngine.thumbnail.width,
|
||||
webpageContent.searchEngine.thumbnail.height, 0.756);
|
||||
|
||||
const thumbnail = await getImage({
|
||||
src: webpageContent.searchEngine.thumbnail.url,
|
||||
width: resizedImage.width,
|
||||
height: resizedImage.height,
|
||||
format: "jpeg"
|
||||
});
|
||||
|
||||
return {
|
||||
route: route,
|
||||
pageType: "Webpage",
|
||||
@@ -208,7 +273,14 @@ export async function getPage(settings: GlobalSettings, route: string): Promise<
|
||||
id: webpageContent.id,
|
||||
lastModified: webpageContent.lastModified,
|
||||
url: webpageContent.url,
|
||||
searchEngine: webpageContent.searchEngine,
|
||||
searchEngine: {
|
||||
...webpageContent.searchEngine,
|
||||
thumbnail: {
|
||||
url: `${settings.website.domainName}${thumbnail.src}`,
|
||||
width: resizedImage.width,
|
||||
height: resizedImage.height
|
||||
}
|
||||
},
|
||||
components: webpageContent.components
|
||||
}
|
||||
};
|
||||
|
||||
@@ -2,7 +2,7 @@ import { getAllBlogs } from "@/content/blogs/blogs";
|
||||
import { getAllWebpages } from "@/content/pages/pages";
|
||||
import { getAllAlbums } from "@/content/photos/albums";
|
||||
import { getAllProjects } from "@/content/projects/projects";
|
||||
import { getPhotoHash } from "./hash";
|
||||
import { getPhotoHash } from "@/lib/hash";
|
||||
import { getAllCategories } from "@/content/photos/categories";
|
||||
|
||||
export async function getAllRoutesList(settings: GlobalSettings): Promise<string[]> {
|
||||
@@ -99,10 +99,10 @@ export function getBlogRoute(blogSettings: BlogSettings, blog: BlogPost) {
|
||||
|
||||
return blogSettings.blogRouteTemplate
|
||||
.replaceAll("%Y", date.getFullYear().toString())
|
||||
.replaceAll("%M", (date.getMonth() + 1).toString().padStart(2, '0'))
|
||||
.replaceAll("%D", date.getDate().toString().padStart(2, '0'))
|
||||
.replaceAll("%M", (date.getMonth() + 1).toString().padStart(2, "0"))
|
||||
.replaceAll("%D", date.getDate().toString().padStart(2, "0"))
|
||||
.replaceAll("%R", blog.url)
|
||||
.replace(/\/+/g, '/');
|
||||
.replace(/\/+/g, "/");
|
||||
}
|
||||
|
||||
export function getProjectRoute(projectSettings: ProjectSettings, project: ProjectPost) {
|
||||
@@ -110,16 +110,16 @@ export function getProjectRoute(projectSettings: ProjectSettings, project: Proje
|
||||
|
||||
return projectSettings.projectRouteTemplate
|
||||
.replaceAll("%Y", date.getFullYear().toString())
|
||||
.replaceAll("%M", (date.getMonth() + 1).toString().padStart(2, '0'))
|
||||
.replaceAll("%D", date.getDate().toString().padStart(2, '0'))
|
||||
.replaceAll("%M", (date.getMonth() + 1).toString().padStart(2, "0"))
|
||||
.replaceAll("%D", date.getDate().toString().padStart(2, "0"))
|
||||
.replaceAll("%R", project.url)
|
||||
.replace(/\/+/g, '/');
|
||||
.replace(/\/+/g, "/");
|
||||
}
|
||||
|
||||
export function getCategoryRoute(photoSettings: WebsitePhotoSettings, category: PhotoAlbumCategory) {
|
||||
return photoSettings.category.routeTemplate
|
||||
.replaceAll("%C", category.url)
|
||||
.replace(/\/+/g, '/');
|
||||
.replace(/\/+/g, "/");
|
||||
}
|
||||
|
||||
export function getAlbumRoute(photoSettings: WebsitePhotoSettings, album: PhotoAlbum) {
|
||||
@@ -127,11 +127,11 @@ export function getAlbumRoute(photoSettings: WebsitePhotoSettings, album: PhotoA
|
||||
|
||||
return photoSettings.album.routeTemplate
|
||||
.replaceAll("%Y", date.getFullYear().toString())
|
||||
.replaceAll("%M", (date.getMonth() + 1).toString().padStart(2, '0'))
|
||||
.replaceAll("%D", date.getDate().toString().padStart(2, '0'))
|
||||
.replaceAll("%M", (date.getMonth() + 1).toString().padStart(2, "0"))
|
||||
.replaceAll("%D", date.getDate().toString().padStart(2, "0"))
|
||||
.replaceAll("%C", album.category.url)
|
||||
.replaceAll("%R", album.url)
|
||||
.replace(/\/+/g, '/');
|
||||
.replace(/\/+/g, "/");
|
||||
}
|
||||
|
||||
export function getPhotoRoute(photoSettings: WebsitePhotoSettings, album: PhotoAlbum, photo: PhotoAlbumPhoto) {
|
||||
@@ -139,10 +139,10 @@ export function getPhotoRoute(photoSettings: WebsitePhotoSettings, album: PhotoA
|
||||
|
||||
return photoSettings.photo.routeTemplate
|
||||
.replaceAll("%Y", date.getFullYear().toString())
|
||||
.replaceAll("%M", (date.getMonth() + 1).toString().padStart(2, '0'))
|
||||
.replaceAll("%D", date.getDate().toString().padStart(2, '0'))
|
||||
.replaceAll("%M", (date.getMonth() + 1).toString().padStart(2, "0"))
|
||||
.replaceAll("%D", date.getDate().toString().padStart(2, "0"))
|
||||
.replaceAll("%C", album.category.url)
|
||||
.replaceAll("%R", album.url)
|
||||
.replaceAll("%H", getPhotoHash(photo))
|
||||
.replace(/\/+/g, '/');
|
||||
.replace(/\/+/g, "/");
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@ import { getSettings } from "@/content/settings/settings"
|
||||
import WebpageLayout from "@/layouts/WebpageLayout.astro";
|
||||
import BlogLayout from "@/layouts/BlogLayout.astro";
|
||||
import ProjectLayout from "@/layouts/ProjectLayout.astro";
|
||||
import PhotoLayout from '@/layouts/PhotoLayout.astro';
|
||||
import PhotoLayout from "@/layouts/PhotoLayout.astro";
|
||||
import BlogIndex from "@/components/blogs/BlogIndex.astro";
|
||||
import ProjectIndex from "@/components/projects/ProjectIndex.astro";
|
||||
import Webpage from "@/components/webpage/Webpage.astro";
|
||||
@@ -154,7 +154,7 @@ if (page === null || page.page === null || !page.page.exists) {
|
||||
allowCrawlers: true,
|
||||
canonical: null,
|
||||
priority: 65,
|
||||
thumbnail: page.page.category.thumbnail
|
||||
thumbnail: page.page.thumbnail
|
||||
}}}>
|
||||
<Fragment slot="content">
|
||||
<AlbumPage page={page.page} />
|
||||
|
||||
@@ -7,8 +7,8 @@ export const GET = (async () => {
|
||||
const robots = await getRobotsSettings();
|
||||
|
||||
let crawlers = [
|
||||
{ id: 'google', name: 'Googlebot' },
|
||||
{ id: 'bing', name: "Bingbot" },
|
||||
{ id: "google", name: "Googlebot" },
|
||||
{ id: "bing", name: "Bingbot" },
|
||||
{ id: "slurp", name: "Slurp" },
|
||||
{ id: "duckduckgo", name: "DuckDuckBot" },
|
||||
{ id: "baidu", name: "Baiduspider" },
|
||||
|
||||
@@ -39,7 +39,7 @@ export const GET = (async ({ params }) => {
|
||||
<loc>${settings.website.domainName}${page.url}</loc>
|
||||
<lastmod>${page.lastModified.toISOString()}</lastmod>
|
||||
</sitemap>
|
||||
`).join('')}
|
||||
`).join("")}
|
||||
</sitemapindex>
|
||||
`;
|
||||
|
||||
|
||||
@@ -54,7 +54,7 @@ export const GET = (async () => {
|
||||
<loc>${settings.website.domainName}${item.url}</loc>
|
||||
<lastmod>${item.lastModified.toISOString()}</lastmod>
|
||||
</sitemap>
|
||||
`).join('')}
|
||||
`).join("")}
|
||||
</sitemapindex>
|
||||
`;
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@ export const GET = (async ({ params }) => {
|
||||
<loc>${settings.website.domainName}${page.url}</loc>
|
||||
<lastmod>${page.lastModified.toISOString()}</lastmod>
|
||||
</sitemap>
|
||||
`).join('')}
|
||||
`).join("")}
|
||||
</sitemapindex>
|
||||
`;
|
||||
|
||||
|
||||
@@ -54,7 +54,7 @@ export const GET = (async () => {
|
||||
<loc>${settings.website.domainName}${item.url}</loc>
|
||||
<lastmod>${item.lastModified.toISOString()}</lastmod>
|
||||
</sitemap>
|
||||
`).join('')}
|
||||
`).join("")}
|
||||
</sitemapindex>
|
||||
`;
|
||||
|
||||
|
||||
@@ -90,7 +90,7 @@ export const GET = (async () => {
|
||||
<loc>${settings.website.domainName}${item.url}</loc>
|
||||
<lastmod>${item.lastModified.toISOString()}</lastmod>
|
||||
</sitemap>
|
||||
`).join('')}
|
||||
`).join("")}
|
||||
</sitemapindex>
|
||||
`;
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ export const GET = (async ({ params }) => {
|
||||
<loc>${settings.website.domainName}${page.url}</loc>
|
||||
<lastmod>${page.lastModified.toISOString()}</lastmod>
|
||||
</sitemap>
|
||||
`).join('')}
|
||||
`).join("")}
|
||||
</sitemapindex>
|
||||
`;
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ export const GET = (async () => {
|
||||
<loc>${settings.website.domainName}${item.url}</loc>
|
||||
<lastmod>${item.lastModified.toISOString()}</lastmod>
|
||||
</sitemap>
|
||||
`).join('')}
|
||||
`).join("")}
|
||||
</sitemapindex>
|
||||
`;
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@ export const GET = (async ({ params }) => {
|
||||
<loc>${settings.website.domainName}${page.url}</loc>
|
||||
<lastmod>${page.lastModified.toISOString()}</lastmod>
|
||||
</sitemap>
|
||||
`).join('')}
|
||||
`).join("")}
|
||||
</sitemapindex>
|
||||
`;
|
||||
|
||||
|
||||
@@ -54,7 +54,7 @@ export const GET = (async () => {
|
||||
<loc>${settings.website.domainName}${item.url}</loc>
|
||||
<lastmod>${item.lastModified.toISOString()}</lastmod>
|
||||
</sitemap>
|
||||
`).join('')}
|
||||
`).join("")}
|
||||
</sitemapindex>
|
||||
`;
|
||||
|
||||
|
||||
2
astro/src/types/blogs/blog.d.ts
vendored
2
astro/src/types/blogs/blog.d.ts
vendored
@@ -8,6 +8,8 @@ type BlogPost = {
|
||||
date: string;
|
||||
content: string;
|
||||
|
||||
thumbnail: PhotoProps;
|
||||
|
||||
tags: Tag[];
|
||||
|
||||
searchEngine: SearchEngine;
|
||||
|
||||
2
astro/src/types/projects/project.d.ts
vendored
2
astro/src/types/projects/project.d.ts
vendored
@@ -8,6 +8,8 @@ type ProjectPost = {
|
||||
date: string;
|
||||
content: string;
|
||||
|
||||
thumbnail: PhotoProps;
|
||||
|
||||
tags: Tag[];
|
||||
|
||||
searchEngine: SearchEngine;
|
||||
|
||||
Reference in New Issue
Block a user