From 4d9ec73f4079e7d8785809780112370067c11739 Mon Sep 17 00:00:00 2001 From: sergeyyarkov Date: Wed, 17 Dec 2025 11:47:36 +0300 Subject: [PATCH] incrementing article views --- astro.config.mjs | 18 +-- package-lock.json | 230 +++++++++++-------------------- package.json | 1 - schema.graphql | 99 +++++++++++++ src/components/BaseHead.astro | 17 +-- src/components/ContactForm.astro | 20 +-- src/graphql/gql.ts | 6 + src/graphql/graphql.ts | 213 ++++++++++++++++++++++++++++ src/pages/[blog]/[...url].astro | 4 +- src/pages/[lang]/about.astro | 9 -- src/pages/[lang]/articles.astro | 8 -- src/pages/[lang]/contacts.astro | 8 -- src/pages/[lang]/index.astro | 8 -- src/pages/[lang]/projects.astro | 8 -- src/pages/api/appeal.ts | 6 + src/pages/sitemap.xml.ts | 80 +++++++++++ src/queries/article.ts | 26 ++-- 17 files changed, 516 insertions(+), 245 deletions(-) create mode 100644 src/pages/api/appeal.ts create mode 100644 src/pages/sitemap.xml.ts diff --git a/astro.config.mjs b/astro.config.mjs index a9f7513..37039a2 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -4,16 +4,9 @@ import { defineConfig, envField } from "astro/config"; * Integrations */ import node from "@astrojs/node"; -import sitemap from "@astrojs/sitemap"; import solidJs from "@astrojs/solid-js"; import icon from "astro-icon"; -/** - * Other required modules - */ -import languages from "./src/i18n/languages"; -import { DEFAULT_LANGUAGE } from "./src/constants"; - // https://astro.build/config export default defineConfig({ site: "https://yarkov.tech", @@ -28,16 +21,7 @@ export default defineConfig({ DIRECTUS_TOKEN: envField.string({ context: "server", access: "secret", default: "" }), }, }, - integrations: [ - sitemap({ - i18n: { - defaultLocale: DEFAULT_LANGUAGE, - locales: Object.fromEntries(Object.keys(languages).map((key) => [key, key])), - }, - }), - icon(), - solidJs(), - ], + integrations: [icon(), solidJs()], trailingSlash: "ignore", scopedStyleStrategy: "where", }); diff --git a/package-lock.json b/package-lock.json index 87edc3a..7f608c6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12,7 +12,6 @@ "@astrojs/check": "^0.9.5", "@astrojs/node": "^9.5.0", "@astrojs/rss": "^4.0.13", - "@astrojs/sitemap": "^3.6.0", "@astrojs/solid-js": "^5.1.3", "@iconify-json/mdi": "^1.2.3", "astro": "^5.15.8", @@ -346,17 +345,6 @@ "picocolors": "^1.1.1" } }, - "node_modules/@astrojs/sitemap": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/@astrojs/sitemap/-/sitemap-3.6.0.tgz", - "integrity": "sha512-4aHkvcOZBWJigRmMIAJwRQXBS+ayoP5z40OklTXYXhUDhwusz+DyDl+nSshY6y9DvkVEavwNcFO8FD81iGhXjg==", - "license": "MIT", - "dependencies": { - "sitemap": "^8.0.0", - "stream-replace-string": "^2.0.0", - "zod": "^3.25.76" - } - }, "node_modules/@astrojs/solid-js": { "version": "5.1.3", "resolved": "https://registry.npmjs.org/@astrojs/solid-js/-/solid-js-5.1.3.tgz", @@ -379,6 +367,17 @@ } } }, + "node_modules/@astrojs/solid-js/node_modules/@types/node": { + "version": "24.10.1", + "resolved": "https://registry.npmjs.org/@types/node/-/node-24.10.1.tgz", + "integrity": "sha512-GNWcUTRBgIRJD5zj+Tq0fKOJ5XZajIiBroOF0yvj2bSU1WvNdYS/dn9UxwsujGW4JX06dnHyjV2y9rRaybH0iQ==", + "license": "MIT", + "optional": true, + "peer": true, + "dependencies": { + "undici-types": "~7.16.0" + } + }, "node_modules/@astrojs/solid-js/node_modules/fdir": { "version": "6.5.0", "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz", @@ -401,7 +400,6 @@ "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.3.tgz", "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==", "license": "MIT", - "peer": true, "engines": { "node": ">=12" }, @@ -414,7 +412,6 @@ "resolved": "https://registry.npmjs.org/vite/-/vite-6.4.1.tgz", "integrity": "sha512-+Oxm7q9hDoLMyJOYfUYBuHQo+dkAloi33apOPP56pzj+vsdJDzr+j1NISE5pyaAuKL4A3UD34qd0lx5+kfKp2g==", "license": "MIT", - "peer": true, "dependencies": { "esbuild": "^0.25.0", "fdir": "^6.4.4", @@ -582,7 +579,6 @@ "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.28.5.tgz", "integrity": "sha512-e7jT4DxYvIDLk1ZHmU/m/mB19rex9sv0c2ftBtjSBv+kVM/902eh0fINUzD7UwLLNR+jU585GxUJ8/EBfAM5fw==", "license": "MIT", - "peer": true, "dependencies": { "@babel/code-frame": "^7.27.1", "@babel/generator": "^7.28.5", @@ -1826,6 +1822,18 @@ } } }, + "node_modules/@graphql-codegen/cli/node_modules/@types/node": { + "version": "24.10.1", + "resolved": "https://registry.npmjs.org/@types/node/-/node-24.10.1.tgz", + "integrity": "sha512-GNWcUTRBgIRJD5zj+Tq0fKOJ5XZajIiBroOF0yvj2bSU1WvNdYS/dn9UxwsujGW4JX06dnHyjV2y9rRaybH0iQ==", + "dev": true, + "license": "MIT", + "optional": true, + "peer": true, + "dependencies": { + "undici-types": "~7.16.0" + } + }, "node_modules/@graphql-codegen/cli/node_modules/ansi-regex": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", @@ -2374,7 +2382,6 @@ "integrity": "sha512-PEIGCY5tSlUt50cqyMXfCzX+oOPqN0vuGqWzbcJ2xvnkzkq46oOpz7dQaTDBdfICb4N14+GARUDw2XV2N4tvzg==", "dev": true, "license": "MIT", - "peer": true, "engines": { "node": ">=10.0.0" }, @@ -3473,7 +3480,6 @@ "dev": true, "hasInstallScript": true, "license": "MIT", - "peer": true, "dependencies": { "detect-libc": "^1.0.3", "is-glob": "^4.0.3", @@ -5086,15 +5092,6 @@ "url": "https://opencollective.com/unified" } }, - "node_modules/@types/sax": { - "version": "1.2.7", - "resolved": "https://registry.npmjs.org/@types/sax/-/sax-1.2.7.tgz", - "integrity": "sha512-rO73L89PJxeYM3s3pPPjiPgVVcymqU490g0YO5n5By0k2Erzj6tay/4lr1CHAAU4JyOWd1rpQ8bCf6cZfHU96A==", - "license": "MIT", - "dependencies": { - "@types/node": "*" - } - }, "node_modules/@types/tar": { "version": "6.1.13", "resolved": "https://registry.npmjs.org/@types/tar/-/tar-6.1.13.tgz", @@ -5477,12 +5474,6 @@ "node": ">= 8" } }, - "node_modules/arg": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/arg/-/arg-5.0.2.tgz", - "integrity": "sha512-PYjyFOLKQ9y57JvQ6QLo8dAgNqswh8M1RMJYdQduT6xbWSgK36P/Z/v+p888pM69jMMfS8Xd8F6I1kQ/I9HUGg==", - "license": "MIT" - }, "node_modules/argparse": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", @@ -5530,7 +5521,6 @@ "resolved": "https://registry.npmjs.org/astro/-/astro-5.15.8.tgz", "integrity": "sha512-QiiRnNPdxCcAGO2UlO07o+QeGgRfEC5Dlm0x35WPB/ixFK1T2bsNB6KaXri70cVkYY1GYgoRtrWv3HCR26o9aw==", "license": "MIT", - "peer": true, "dependencies": { "@astrojs/compiler": "^2.13.0", "@astrojs/internal-helpers": "0.7.4", @@ -5622,6 +5612,17 @@ "@iconify/utils": "^2.1.30" } }, + "node_modules/astro/node_modules/@types/node": { + "version": "24.10.1", + "resolved": "https://registry.npmjs.org/@types/node/-/node-24.10.1.tgz", + "integrity": "sha512-GNWcUTRBgIRJD5zj+Tq0fKOJ5XZajIiBroOF0yvj2bSU1WvNdYS/dn9UxwsujGW4JX06dnHyjV2y9rRaybH0iQ==", + "license": "MIT", + "optional": true, + "peer": true, + "dependencies": { + "undici-types": "~7.16.0" + } + }, "node_modules/astro/node_modules/chokidar": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-4.0.3.tgz", @@ -5665,7 +5666,6 @@ "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.3.tgz", "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==", "license": "MIT", - "peer": true, "engines": { "node": ">=12" }, @@ -5832,7 +5832,6 @@ "resolved": "https://registry.npmjs.org/vite/-/vite-6.4.1.tgz", "integrity": "sha512-+Oxm7q9hDoLMyJOYfUYBuHQo+dkAloi33apOPP56pzj+vsdJDzr+j1NISE5pyaAuKL4A3UD34qd0lx5+kfKp2g==", "license": "MIT", - "peer": true, "dependencies": { "esbuild": "^0.25.0", "fdir": "^6.4.4", @@ -6176,7 +6175,6 @@ } ], "license": "MIT", - "peer": true, "dependencies": { "baseline-browser-mapping": "^2.8.25", "caniuse-lite": "^1.0.30001754", @@ -8087,7 +8085,6 @@ "resolved": "https://registry.npmjs.org/graphql/-/graphql-16.12.0.tgz", "integrity": "sha512-DKKrynuQRne0PNpEbzuEdHlYOMksHSUI8Zc9Unei5gTsMNA2/vMpoMz/yKba50pejK56qj98qM0SjYxAKi13gQ==", "license": "MIT", - "peer": true, "engines": { "node": "^12.22.0 || ^14.16.0 || ^16.0.0 || >=17.0.0" } @@ -8368,7 +8365,6 @@ "integrity": "sha512-PEIGCY5tSlUt50cqyMXfCzX+oOPqN0vuGqWzbcJ2xvnkzkq46oOpz7dQaTDBdfICb4N14+GARUDw2XV2N4tvzg==", "dev": true, "license": "MIT", - "peer": true, "engines": { "node": ">=10.0.0" }, @@ -9266,7 +9262,6 @@ "integrity": "sha512-ekilCSN1jwRvIbgeg/57YFh8qQDNbwDb9xT/qu2DAHbFFZUicIl4ygVaAvzveMhMVr3LnpSKTNnwt8PoOfmKhQ==", "devOptional": true, "license": "MIT", - "peer": true, "bin": { "jiti": "lib/jiti-cli.mjs" } @@ -12075,7 +12070,6 @@ "resolved": "https://registry.npmjs.org/sass/-/sass-1.68.0.tgz", "integrity": "sha512-Lmj9lM/fef0nQswm1J2HJcEsBUba4wgNx2fea6yJHODREoMFnwRpZydBnX/RjyXw2REIwdkbqE4hrTo4qfDBUA==", "devOptional": true, - "peer": true, "dependencies": { "chokidar": ">=3.0.0 <4.0.0", "immutable": "^4.0.0", @@ -12095,12 +12089,6 @@ "devOptional": true, "license": "MIT" }, - "node_modules/sax": { - "version": "1.4.3", - "resolved": "https://registry.npmjs.org/sax/-/sax-1.4.3.tgz", - "integrity": "sha512-yqYn1JhPczigF94DMS+shiDMjDowYO6y9+wB/4WgO0Y19jWYk0lQ4tuG5KI7kj4FTp1wxPj5IFfcrz/s1c3jjQ==", - "license": "BlueOak-1.0.0" - }, "node_modules/saxes": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/saxes/-/saxes-5.0.1.tgz", @@ -12185,7 +12173,6 @@ "resolved": "https://registry.npmjs.org/seroval/-/seroval-1.3.2.tgz", "integrity": "sha512-RbcPH1n5cfwKrru7v7+zrZvjLurgHhGyso3HTyGtRivGWgYjbOmGuivCQaORNELjNONoK35nj28EoWul9sb1zQ==", "license": "MIT", - "peer": true, "engines": { "node": ">=10" } @@ -12385,25 +12372,6 @@ "resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz", "integrity": "sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==" }, - "node_modules/sitemap": { - "version": "8.0.2", - "resolved": "https://registry.npmjs.org/sitemap/-/sitemap-8.0.2.tgz", - "integrity": "sha512-LwktpJcyZDoa0IL6KT++lQ53pbSrx2c9ge41/SeLTyqy2XUNA6uR4+P9u5IVo5lPeL2arAcOKn1aZAxoYbCKlQ==", - "license": "MIT", - "dependencies": { - "@types/node": "^17.0.5", - "@types/sax": "^1.2.1", - "arg": "^5.0.0", - "sax": "^1.4.1" - }, - "bin": { - "sitemap": "dist/cli.js" - }, - "engines": { - "node": ">=14.0.0", - "npm": ">=6.0.0" - } - }, "node_modules/slash": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", @@ -12488,7 +12456,6 @@ "resolved": "https://registry.npmjs.org/solid-js/-/solid-js-1.9.10.tgz", "integrity": "sha512-Coz956cos/EPDlhs6+jsdTxKuJDPT7B5SVIWgABwROyxjY7Xbr8wkzD68Et+NxnV7DLJ3nJdAC2r9InuV/4Jew==", "license": "MIT", - "peer": true, "dependencies": { "csstype": "^3.1.0", "seroval": "~1.3.0", @@ -12556,12 +12523,6 @@ "node": ">= 0.8" } }, - "node_modules/stream-replace-string": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/stream-replace-string/-/stream-replace-string-2.0.0.tgz", - "integrity": "sha512-TlnjJ1C0QrmxRNrON00JvaFFlNh5TTG00APw23j74ET7gkQpTASi6/L2fuiav8pzK715HXtUeClpBTw2NPSn6w==", - "license": "MIT" - }, "node_modules/streamx": { "version": "2.15.1", "resolved": "https://registry.npmjs.org/streamx/-/streamx-2.15.1.tgz", @@ -12911,7 +12872,6 @@ "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.3.tgz", "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==", "license": "MIT", - "peer": true, "engines": { "node": ">=12" }, @@ -13063,7 +13023,6 @@ "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz", "integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==", "license": "Apache-2.0", - "peer": true, "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" @@ -13141,7 +13100,8 @@ "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.16.0.tgz", "integrity": "sha512-Zz+aZWSj8LE6zoxD+xrjh4VfkIG8Ya6LvYkZqtUQGJPZjYl53ypCaUwWqo7eI0x66KBGeRo+mlBEkMSeSZ38Nw==", "license": "MIT", - "optional": true + "optional": true, + "peer": true }, "node_modules/unicode-properties": { "version": "1.4.1", @@ -13910,7 +13870,6 @@ "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.10.tgz", "integrity": "sha512-+dbF1tHwZpXcbOJdVOkzLDxZP1ailvSxM6ZweXTegylPny803bFhA+vqBYw4s31NSAk4S2Qz+AKXK9a4wkdjcQ==", "license": "MIT", - "peer": true, "engines": { "node": ">=8.3.0" }, @@ -14198,7 +14157,6 @@ "resolved": "https://registry.npmjs.org/zod/-/zod-3.25.76.tgz", "integrity": "sha512-gzUt/qt81nXsFGKIFcC3YnfEAx5NkunCfnDlvuBSSFS02bcXu4Lmea0AFIUwbLWxWPx3d9p8S5QoaujKcNQxcQ==", "license": "MIT", - "peer": true, "funding": { "url": "https://github.com/sponsors/colinhacks" } @@ -14436,16 +14394,6 @@ "picocolors": "^1.1.1" } }, - "@astrojs/sitemap": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/@astrojs/sitemap/-/sitemap-3.6.0.tgz", - "integrity": "sha512-4aHkvcOZBWJigRmMIAJwRQXBS+ayoP5z40OklTXYXhUDhwusz+DyDl+nSshY6y9DvkVEavwNcFO8FD81iGhXjg==", - "requires": { - "sitemap": "^8.0.0", - "stream-replace-string": "^2.0.0", - "zod": "^3.25.76" - } - }, "@astrojs/solid-js": { "version": "5.1.3", "resolved": "https://registry.npmjs.org/@astrojs/solid-js/-/solid-js-5.1.3.tgz", @@ -14455,6 +14403,16 @@ "vite-plugin-solid": "^2.11.8" }, "dependencies": { + "@types/node": { + "version": "24.10.1", + "resolved": "https://registry.npmjs.org/@types/node/-/node-24.10.1.tgz", + "integrity": "sha512-GNWcUTRBgIRJD5zj+Tq0fKOJ5XZajIiBroOF0yvj2bSU1WvNdYS/dn9UxwsujGW4JX06dnHyjV2y9rRaybH0iQ==", + "optional": true, + "peer": true, + "requires": { + "undici-types": "~7.16.0" + } + }, "fdir": { "version": "6.5.0", "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz", @@ -14464,14 +14422,12 @@ "picomatch": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.3.tgz", - "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==", - "peer": true + "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==" }, "vite": { "version": "6.4.1", "resolved": "https://registry.npmjs.org/vite/-/vite-6.4.1.tgz", "integrity": "sha512-+Oxm7q9hDoLMyJOYfUYBuHQo+dkAloi33apOPP56pzj+vsdJDzr+j1NISE5pyaAuKL4A3UD34qd0lx5+kfKp2g==", - "peer": true, "requires": { "esbuild": "^0.25.0", "fdir": "^6.4.4", @@ -14544,7 +14500,6 @@ "version": "7.28.5", "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.28.5.tgz", "integrity": "sha512-e7jT4DxYvIDLk1ZHmU/m/mB19rex9sv0c2ftBtjSBv+kVM/902eh0fINUzD7UwLLNR+jU585GxUJ8/EBfAM5fw==", - "peer": true, "requires": { "@babel/code-frame": "^7.27.1", "@babel/generator": "^7.28.5", @@ -15214,6 +15169,17 @@ "dev": true, "requires": {} }, + "@types/node": { + "version": "24.10.1", + "resolved": "https://registry.npmjs.org/@types/node/-/node-24.10.1.tgz", + "integrity": "sha512-GNWcUTRBgIRJD5zj+Tq0fKOJ5XZajIiBroOF0yvj2bSU1WvNdYS/dn9UxwsujGW4JX06dnHyjV2y9rRaybH0iQ==", + "dev": true, + "optional": true, + "peer": true, + "requires": { + "undici-types": "~7.16.0" + } + }, "ansi-regex": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", @@ -15588,7 +15554,6 @@ "resolved": "https://registry.npmjs.org/ws/-/ws-8.18.3.tgz", "integrity": "sha512-PEIGCY5tSlUt50cqyMXfCzX+oOPqN0vuGqWzbcJ2xvnkzkq46oOpz7dQaTDBdfICb4N14+GARUDw2XV2N4tvzg==", "dev": true, - "peer": true, "requires": {} } } @@ -16192,7 +16157,6 @@ "resolved": "https://registry.npmjs.org/@parcel/watcher/-/watcher-2.5.1.tgz", "integrity": "sha512-dfUnCxiN9H4ap84DvD2ubjw+3vUNpstxa0TneY/Paat8a3R4uQZDLSvWjmznAY/DoahqTHl9V46HF/Zs3F29pg==", "dev": true, - "peer": true, "requires": { "@parcel/watcher-android-arm64": "2.5.1", "@parcel/watcher-darwin-arm64": "2.5.1", @@ -17097,14 +17061,6 @@ } } }, - "@types/sax": { - "version": "1.2.7", - "resolved": "https://registry.npmjs.org/@types/sax/-/sax-1.2.7.tgz", - "integrity": "sha512-rO73L89PJxeYM3s3pPPjiPgVVcymqU490g0YO5n5By0k2Erzj6tay/4lr1CHAAU4JyOWd1rpQ8bCf6cZfHU96A==", - "requires": { - "@types/node": "*" - } - }, "@types/tar": { "version": "6.1.13", "resolved": "https://registry.npmjs.org/@types/tar/-/tar-6.1.13.tgz", @@ -17393,11 +17349,6 @@ "picomatch": "^2.0.4" } }, - "arg": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/arg/-/arg-5.0.2.tgz", - "integrity": "sha512-PYjyFOLKQ9y57JvQ6QLo8dAgNqswh8M1RMJYdQduT6xbWSgK36P/Z/v+p888pM69jMMfS8Xd8F6I1kQ/I9HUGg==" - }, "argparse": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", @@ -17429,7 +17380,6 @@ "version": "5.15.8", "resolved": "https://registry.npmjs.org/astro/-/astro-5.15.8.tgz", "integrity": "sha512-QiiRnNPdxCcAGO2UlO07o+QeGgRfEC5Dlm0x35WPB/ixFK1T2bsNB6KaXri70cVkYY1GYgoRtrWv3HCR26o9aw==", - "peer": true, "requires": { "@astrojs/compiler": "^2.13.0", "@astrojs/internal-helpers": "0.7.4", @@ -17496,6 +17446,16 @@ "zod-to-ts": "^1.2.0" }, "dependencies": { + "@types/node": { + "version": "24.10.1", + "resolved": "https://registry.npmjs.org/@types/node/-/node-24.10.1.tgz", + "integrity": "sha512-GNWcUTRBgIRJD5zj+Tq0fKOJ5XZajIiBroOF0yvj2bSU1WvNdYS/dn9UxwsujGW4JX06dnHyjV2y9rRaybH0iQ==", + "optional": true, + "peer": true, + "requires": { + "undici-types": "~7.16.0" + } + }, "chokidar": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-4.0.3.tgz", @@ -17518,8 +17478,7 @@ "picomatch": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.3.tgz", - "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==", - "peer": true + "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==" }, "readdirp": { "version": "4.1.2", @@ -17580,7 +17539,6 @@ "version": "6.4.1", "resolved": "https://registry.npmjs.org/vite/-/vite-6.4.1.tgz", "integrity": "sha512-+Oxm7q9hDoLMyJOYfUYBuHQo+dkAloi33apOPP56pzj+vsdJDzr+j1NISE5pyaAuKL4A3UD34qd0lx5+kfKp2g==", - "peer": true, "requires": { "esbuild": "^0.25.0", "fdir": "^6.4.4", @@ -17768,7 +17726,6 @@ "version": "4.28.0", "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.28.0.tgz", "integrity": "sha512-tbydkR/CxfMwelN0vwdP/pLkDwyAASZ+VfWm4EOwlB6SWhx1sYnWLqo8N5j0rAzPfzfRaxt0mM/4wPU/Su84RQ==", - "peer": true, "requires": { "baseline-browser-mapping": "^2.8.25", "caniuse-lite": "^1.0.30001754", @@ -19041,8 +18998,7 @@ "graphql": { "version": "16.12.0", "resolved": "https://registry.npmjs.org/graphql/-/graphql-16.12.0.tgz", - "integrity": "sha512-DKKrynuQRne0PNpEbzuEdHlYOMksHSUI8Zc9Unei5gTsMNA2/vMpoMz/yKba50pejK56qj98qM0SjYxAKi13gQ==", - "peer": true + "integrity": "sha512-DKKrynuQRne0PNpEbzuEdHlYOMksHSUI8Zc9Unei5gTsMNA2/vMpoMz/yKba50pejK56qj98qM0SjYxAKi13gQ==" }, "graphql-config": { "version": "5.1.5", @@ -19209,7 +19165,6 @@ "resolved": "https://registry.npmjs.org/ws/-/ws-8.18.3.tgz", "integrity": "sha512-PEIGCY5tSlUt50cqyMXfCzX+oOPqN0vuGqWzbcJ2xvnkzkq46oOpz7dQaTDBdfICb4N14+GARUDw2XV2N4tvzg==", "dev": true, - "peer": true, "requires": {} } } @@ -19784,8 +19739,7 @@ "version": "2.6.1", "resolved": "https://registry.npmjs.org/jiti/-/jiti-2.6.1.tgz", "integrity": "sha512-ekilCSN1jwRvIbgeg/57YFh8qQDNbwDb9xT/qu2DAHbFFZUicIl4ygVaAvzveMhMVr3LnpSKTNnwt8PoOfmKhQ==", - "devOptional": true, - "peer": true + "devOptional": true }, "js-tokens": { "version": "4.0.0", @@ -21634,7 +21588,6 @@ "resolved": "https://registry.npmjs.org/sass/-/sass-1.68.0.tgz", "integrity": "sha512-Lmj9lM/fef0nQswm1J2HJcEsBUba4wgNx2fea6yJHODREoMFnwRpZydBnX/RjyXw2REIwdkbqE4hrTo4qfDBUA==", "devOptional": true, - "peer": true, "requires": { "chokidar": ">=3.0.0 <4.0.0", "immutable": "^4.0.0", @@ -21649,11 +21602,6 @@ } } }, - "sax": { - "version": "1.4.3", - "resolved": "https://registry.npmjs.org/sax/-/sax-1.4.3.tgz", - "integrity": "sha512-yqYn1JhPczigF94DMS+shiDMjDowYO6y9+wB/4WgO0Y19jWYk0lQ4tuG5KI7kj4FTp1wxPj5IFfcrz/s1c3jjQ==" - }, "saxes": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/saxes/-/saxes-5.0.1.tgz", @@ -21714,8 +21662,7 @@ "seroval": { "version": "1.3.2", "resolved": "https://registry.npmjs.org/seroval/-/seroval-1.3.2.tgz", - "integrity": "sha512-RbcPH1n5cfwKrru7v7+zrZvjLurgHhGyso3HTyGtRivGWgYjbOmGuivCQaORNELjNONoK35nj28EoWul9sb1zQ==", - "peer": true + "integrity": "sha512-RbcPH1n5cfwKrru7v7+zrZvjLurgHhGyso3HTyGtRivGWgYjbOmGuivCQaORNELjNONoK35nj28EoWul9sb1zQ==" }, "seroval-plugins": { "version": "1.3.3", @@ -21853,17 +21800,6 @@ "resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz", "integrity": "sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==" }, - "sitemap": { - "version": "8.0.2", - "resolved": "https://registry.npmjs.org/sitemap/-/sitemap-8.0.2.tgz", - "integrity": "sha512-LwktpJcyZDoa0IL6KT++lQ53pbSrx2c9ge41/SeLTyqy2XUNA6uR4+P9u5IVo5lPeL2arAcOKn1aZAxoYbCKlQ==", - "requires": { - "@types/node": "^17.0.5", - "@types/sax": "^1.2.1", - "arg": "^5.0.0", - "sax": "^1.4.1" - } - }, "slash": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", @@ -21916,7 +21852,6 @@ "version": "1.9.10", "resolved": "https://registry.npmjs.org/solid-js/-/solid-js-1.9.10.tgz", "integrity": "sha512-Coz956cos/EPDlhs6+jsdTxKuJDPT7B5SVIWgABwROyxjY7Xbr8wkzD68Et+NxnV7DLJ3nJdAC2r9InuV/4Jew==", - "peer": true, "requires": { "csstype": "^3.1.0", "seroval": "~1.3.0", @@ -21963,11 +21898,6 @@ "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.2.tgz", "integrity": "sha512-DvEy55V3DB7uknRo+4iOGT5fP1slR8wQohVdknigZPMpMstaKJQWhwiYBACJE3Ul2pTnATihhBYnRhZQHGBiRw==" }, - "stream-replace-string": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/stream-replace-string/-/stream-replace-string-2.0.0.tgz", - "integrity": "sha512-TlnjJ1C0QrmxRNrON00JvaFFlNh5TTG00APw23j74ET7gkQpTASi6/L2fuiav8pzK715HXtUeClpBTw2NPSn6w==" - }, "streamx": { "version": "2.15.1", "resolved": "https://registry.npmjs.org/streamx/-/streamx-2.15.1.tgz", @@ -22202,8 +22132,7 @@ "picomatch": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.3.tgz", - "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==", - "peer": true + "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==" } } }, @@ -22296,8 +22225,7 @@ "typescript": { "version": "5.9.3", "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz", - "integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==", - "peer": true + "integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==" }, "typescript-auto-import-cache": { "version": "0.3.6", @@ -22335,9 +22263,11 @@ "integrity": "sha512-Ql87qFHB3s/De2ClA9e0gsnS6zXG27SkTiSJwjCc9MebbfapQfuPzumMIUMi38ezPZVNFcHI9sUIepeQfw8J8Q==" }, "undici-types": { - "version": "https://registry.npmjs.org/undici-types/-/undici-types-7.16.0.tgz", + "version": "7.16.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.16.0.tgz", "integrity": "sha512-Zz+aZWSj8LE6zoxD+xrjh4VfkIG8Ya6LvYkZqtUQGJPZjYl53ypCaUwWqo7eI0x66KBGeRo+mlBEkMSeSZ38Nw==", - "optional": true + "optional": true, + "peer": true }, "unicode-properties": { "version": "1.4.1", @@ -22856,7 +22786,6 @@ "version": "7.5.10", "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.10.tgz", "integrity": "sha512-+dbF1tHwZpXcbOJdVOkzLDxZP1ailvSxM6ZweXTegylPny803bFhA+vqBYw4s31NSAk4S2Qz+AKXK9a4wkdjcQ==", - "peer": true, "requires": {} }, "xml-name-validator": { @@ -23037,8 +22966,7 @@ "zod": { "version": "3.25.76", "resolved": "https://registry.npmjs.org/zod/-/zod-3.25.76.tgz", - "integrity": "sha512-gzUt/qt81nXsFGKIFcC3YnfEAx5NkunCfnDlvuBSSFS02bcXu4Lmea0AFIUwbLWxWPx3d9p8S5QoaujKcNQxcQ==", - "peer": true + "integrity": "sha512-gzUt/qt81nXsFGKIFcC3YnfEAx5NkunCfnDlvuBSSFS02bcXu4Lmea0AFIUwbLWxWPx3d9p8S5QoaujKcNQxcQ==" }, "zod-to-json-schema": { "version": "3.24.6", diff --git a/package.json b/package.json index db5a600..d20b1da 100644 --- a/package.json +++ b/package.json @@ -22,7 +22,6 @@ "@astrojs/check": "^0.9.5", "@astrojs/node": "^9.5.0", "@astrojs/rss": "^4.0.13", - "@astrojs/sitemap": "^3.6.0", "@astrojs/solid-js": "^5.1.3", "@iconify-json/mdi": "^1.2.3", "astro": "^5.15.8", diff --git a/schema.graphql b/schema.graphql index 515dbef..b6582de 100644 --- a/schema.graphql +++ b/schema.graphql @@ -28,6 +28,8 @@ The `JSON` scalar type represents JSON values as specified by [ECMA-404](http:// scalar JSON type Mutation { + create_appeal_item(data: create_appeal_input!): appeal + create_appeal_items(data: [create_appeal_input!], filter: appeal_filter, limit: Int, offset: Int, page: Int, search: String, sort: [String]): [appeal!]! create_article_item(data: create_article_input!): article create_article_items(data: [create_article_input!], filter: article_filter, limit: Int, offset: Int, page: Int, search: String, sort: [String]): [article!]! create_article_tag_item(data: create_article_tag_input!): article_tag @@ -48,6 +50,8 @@ type Mutation { create_project_translations_items(data: [create_project_translations_input!], filter: project_translations_filter, limit: Int, offset: Int, page: Int, search: String, sort: [String]): [project_translations!]! create_tag_item(data: create_tag_input!): tag create_tag_items(data: [create_tag_input!], filter: tag_filter, limit: Int, offset: Int, page: Int, search: String, sort: [String]): [tag!]! + delete_appeal_item(id: ID!): delete_one + delete_appeal_items(ids: [ID]!): delete_many delete_article_item(id: ID!): delete_one delete_article_items(ids: [ID]!): delete_many delete_article_tag_item(id: ID!): delete_one @@ -68,6 +72,9 @@ type Mutation { delete_project_translations_items(ids: [ID]!): delete_many delete_tag_item(id: ID!): delete_one delete_tag_items(ids: [ID]!): delete_many + update_appeal_batch(data: [update_appeal_input!], filter: appeal_filter, limit: Int, offset: Int, page: Int, search: String, sort: [String]): [appeal!]! + update_appeal_item(data: update_appeal_input!, id: ID!): appeal + update_appeal_items(data: update_appeal_input!, filter: appeal_filter, ids: [ID]!, limit: Int, offset: Int, page: Int, search: String, sort: [String]): [appeal!]! update_article_batch(data: [update_article_input!], filter: article_filter, limit: Int, offset: Int, page: Int, search: String, sort: [String]): [article!]! update_article_item(data: update_article_input!, id: ID!): article update_article_items(data: update_article_input!, filter: article_filter, ids: [ID]!, limit: Int, offset: Int, page: Int, search: String, sort: [String]): [article!]! @@ -103,6 +110,10 @@ type Mutation { } type Query { + appeal(filter: appeal_filter, limit: Int, offset: Int, page: Int, search: String, sort: [String]): [appeal!]! + appeal_aggregated(filter: appeal_filter, groupBy: [String], limit: Int, offset: Int, page: Int, search: String, sort: [String]): [appeal_aggregated!]! + appeal_by_id(id: ID!, version: String): appeal + appeal_by_version(id: ID!, version: String!): version_appeal article(filter: article_filter, limit: Int, offset: Int, page: Int, search: String, sort: [String]): [article!]! article_aggregated(filter: article_filter, groupBy: [String], limit: Int, offset: Int, page: Int, search: String, sort: [String]): [article_aggregated!]! article_by_id(id: ID!, version: String): article @@ -150,6 +161,7 @@ type Query { } type Subscription { + appeal_mutated(event: EventEnum): appeal_mutated article_mutated(event: EventEnum): article_mutated article_tag_mutated(event: EventEnum): article_tag_mutated article_translations_mutated(event: EventEnum): article_translations_mutated @@ -185,6 +197,63 @@ type Subscription { tag_mutated(event: EventEnum): tag_mutated } +type appeal { + client_ip: String! + date_created: Date + date_created_func: datetime_functions + email: String! + id: ID! + message: String! + name: String! + subject: String! +} + +type appeal_aggregated { + avg: appeal_aggregated_fields + avgDistinct: appeal_aggregated_fields + count: appeal_aggregated_count + countAll: Int + countDistinct: appeal_aggregated_count + group: JSON + max: appeal_aggregated_fields + min: appeal_aggregated_fields + sum: appeal_aggregated_fields + sumDistinct: appeal_aggregated_fields +} + +type appeal_aggregated_count { + client_ip: Int + date_created: Int + email: Int + id: Int + message: Int + name: Int + subject: Int +} + +type appeal_aggregated_fields { + id: Float +} + +input appeal_filter { + _and: [appeal_filter] + _or: [appeal_filter] + client_ip: string_filter_operators + date_created: date_filter_operators + date_created_func: datetime_function_filter_operators + email: string_filter_operators + id: number_filter_operators + message: string_filter_operators + name: string_filter_operators + subject: string_filter_operators +} + +type appeal_mutated { + data: appeal + event: EventEnum + key: ID! +} + type article { id: ID! translations(filter: article_translations_filter, limit: Int, offset: Int, page: Int, search: String, sort: [String]): [article_translations] @@ -458,6 +527,16 @@ type count_functions { count: Int } +input create_appeal_input { + client_ip: String! + date_created: Date + email: String! + id: ID + message: String! + name: String! + subject: String! +} + input create_article_input { id: ID translations: [create_article_translations_input] @@ -2118,6 +2197,16 @@ type tag_mutated { key: ID! } +input update_appeal_input { + client_ip: String + date_created: Date + email: String + id: ID + message: String + name: String + subject: String +} + input update_article_input { id: ID translations: [update_article_translations_input] @@ -2327,6 +2416,16 @@ input update_tag_input { title: String } +type version_appeal { + client_ip: String + date_created: Date + email: String + id: ID + message: String + name: String + subject: String +} + type version_article { id: ID translations: JSON diff --git a/src/components/BaseHead.astro b/src/components/BaseHead.astro index 805d55f..a173eb6 100644 --- a/src/components/BaseHead.astro +++ b/src/components/BaseHead.astro @@ -59,22 +59,11 @@ const t = useTranslation(Astro); href="/favicon-light-16x16.png" media="(prefers-color-scheme: light)" /> - - + + + diff --git a/src/components/ContactForm.astro b/src/components/ContactForm.astro index 684db30..d1a2368 100644 --- a/src/components/ContactForm.astro +++ b/src/components/ContactForm.astro @@ -6,32 +6,32 @@ import { useTranslation } from "@i18n/utils"; const t = useTranslation(Astro); --- -
-
+ +
- +
- +
- + -