aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkartofen <mladenovnasko0@gmail.com>2022-08-29 19:01:20 +0300
committerkartofen <mladenovnasko0@gmail.com>2022-08-29 19:01:20 +0300
commit8e4163e3f08e29f38fe87c59d8cfb91e0fa98063 (patch)
tree2b117f4bafa0a4d10252eef95ca868a247a081a1
parent9d952483f250a97cbeab4061fa1c4e68341b330f (diff)
everything works
-rw-r--r--astro.config.mjs5
-rw-r--r--package-lock.json726
-rw-r--r--package.json1
-rwxr-xr-xrun.sh6
-rw-r--r--src/components/Form.astro7
-rw-r--r--src/components/Image.astro21
-rw-r--r--src/components/Post.astro28
-rw-r--r--src/components/Thread.astro82
-rw-r--r--src/components/Thread.svelte105
-rw-r--r--src/layouts/Default.astro4
-rw-r--r--src/layouts/ThreadLayout.astro22
-rw-r--r--src/lib/api.ts2
-rw-r--r--src/lib/image.ts4
-rw-r--r--src/lib/thread.ts42
-rw-r--r--src/pages/board/[board].astro22
-rw-r--r--src/pages/board/[board]/[tid].astro28
-rw-r--r--src/pages/create/[board].astro5
-rw-r--r--src/pages/create/[board]/[tid].astro27
-rw-r--r--src/pages/create/comment.ts17
-rw-r--r--src/pages/create/thread.ts5
-rw-r--r--src/styles/blackbox.css4
-rw-r--r--src/styles/thread.css4
22 files changed, 278 insertions, 889 deletions
diff --git a/astro.config.mjs b/astro.config.mjs
index 7ea90a0..ad9948e 100644
--- a/astro.config.mjs
+++ b/astro.config.mjs
@@ -1,12 +1,11 @@
import { defineConfig } from 'astro/config';
-import deno from '@astrojs/deno';
+//import deno from '@astrojs/deno';
import node from '@astrojs/node';
-import svelte from "@astrojs/svelte";
// https://astro.build/config
export default defineConfig({
output: 'server',
adapter: node(),
- integrations: [svelte()]
+ integrations: []
}); \ No newline at end of file
diff --git a/package-lock.json b/package-lock.json
index 52b6d33..4f40a91 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -15,7 +15,6 @@
"uuid": "^8.3.2"
},
"devDependencies": {
- "@astrojs/svelte": "^1.0.0",
"astro": "^1.0.8",
"svelte": "^3.49.0"
}
@@ -134,25 +133,6 @@
"node": "^14.18.0 || >=16.12.0"
}
},
- "node_modules/@astrojs/svelte": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/@astrojs/svelte/-/svelte-1.0.0.tgz",
- "integrity": "sha512-WmvcEe86j/3wL2xWURo1Kxtgh+s0CVys2j7xQboHr0ZeH9TBlkQuacAT8mWccD1/MikhDVqL/1hnF/n+vRKuGw==",
- "dev": true,
- "dependencies": {
- "@sveltejs/vite-plugin-svelte": "^1.0.1",
- "postcss-load-config": "^3.1.4",
- "svelte-preprocess": "^4.10.7",
- "svelte2tsx": "^0.5.11",
- "vite": "^3.0.0"
- },
- "engines": {
- "node": "^14.18.0 || >=16.12.0"
- },
- "peerDependencies": {
- "svelte": "^3.46.4"
- }
- },
"node_modules/@astrojs/telemetry": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/@astrojs/telemetry/-/telemetry-1.0.0.tgz",
@@ -710,58 +690,6 @@
"@proload/core": "^0.3.2"
}
},
- "node_modules/@rollup/pluginutils": {
- "version": "4.2.1",
- "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-4.2.1.tgz",
- "integrity": "sha512-iKnFXr7NkdZAIHiIWE+BX5ULi/ucVFYWD6TbAV+rZctiRTY2PL6tsIKhoIOaoskiWAkgu+VsbXgUVDNLHf+InQ==",
- "dev": true,
- "dependencies": {
- "estree-walker": "^2.0.1",
- "picomatch": "^2.2.2"
- },
- "engines": {
- "node": ">= 8.0.0"
- }
- },
- "node_modules/@sveltejs/vite-plugin-svelte": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/@sveltejs/vite-plugin-svelte/-/vite-plugin-svelte-1.0.2.tgz",
- "integrity": "sha512-8tTVbNuraeDchBaArNbwaZLpO0feM7BRSdZU5yeM4Clasx2p1p1CYBoWh+VgxZlxiark49HXummkHqKztbl8lA==",
- "dev": true,
- "dependencies": {
- "@rollup/pluginutils": "^4.2.1",
- "debug": "^4.3.4",
- "deepmerge": "^4.2.2",
- "kleur": "^4.1.5",
- "magic-string": "^0.26.2",
- "svelte-hmr": "^0.14.12"
- },
- "engines": {
- "node": "^14.18.0 || >= 16"
- },
- "peerDependencies": {
- "diff-match-patch": "^1.0.5",
- "svelte": "^3.44.0",
- "vite": "^3.0.0"
- },
- "peerDependenciesMeta": {
- "diff-match-patch": {
- "optional": true
- }
- }
- },
- "node_modules/@sveltejs/vite-plugin-svelte/node_modules/magic-string": {
- "version": "0.26.2",
- "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.26.2.tgz",
- "integrity": "sha512-NzzlXpclt5zAbmo6h6jNc8zl2gNRGHvmsZW4IvZhTC4W7k4OlLP+S5YLussa/r3ixNT66KOQfNORlXHSOy/X4A==",
- "dev": true,
- "dependencies": {
- "sourcemap-codec": "^1.4.8"
- },
- "engines": {
- "node": ">=12"
- }
- },
"node_modules/@types/acorn": {
"version": "4.0.6",
"resolved": "https://registry.npmjs.org/@types/acorn/-/acorn-4.0.6.tgz",
@@ -840,39 +768,18 @@
"@types/unist": "*"
}
},
- "node_modules/@types/node": {
- "version": "18.7.13",
- "resolved": "https://registry.npmjs.org/@types/node/-/node-18.7.13.tgz",
- "integrity": "sha512-46yIhxSe5xEaJZXWdIBP7GU4HDTG8/eo0qd9atdiL+lFpA03y8KS+lkTN834TWJj5767GbWv4n/P6efyTFt1Dw==",
- "dev": true
- },
"node_modules/@types/parse5": {
"version": "6.0.3",
"resolved": "https://registry.npmjs.org/@types/parse5/-/parse5-6.0.3.tgz",
"integrity": "sha512-SuT16Q1K51EAVPz1K29DJ/sXjhSQ0zjvsypYJ6tlwVsRV9jwW5Adq2ch8Dq8kDBCkYnELS7N7VNCSB5nC56t/g==",
"dev": true
},
- "node_modules/@types/pug": {
- "version": "2.0.6",
- "resolved": "https://registry.npmjs.org/@types/pug/-/pug-2.0.6.tgz",
- "integrity": "sha512-SnHmG9wN1UVmagJOnyo/qkk0Z7gejYxOYYmaAwr5u2yFYfsupN3sg10kyzN8Hep/2zbHxCnsumxOoRIRMBwKCg==",
- "dev": true
- },
"node_modules/@types/resolve": {
"version": "1.20.2",
"resolved": "https://registry.npmjs.org/@types/resolve/-/resolve-1.20.2.tgz",
"integrity": "sha512-60BCwRFOZCQhDncwQdxxeOEEkbc5dIMccYLwbxsS4TUNeVECQ/pBJ0j09mrHOl/JJvpRPGwO9SvE4nR2Nb/a4Q==",
"dev": true
},
- "node_modules/@types/sass": {
- "version": "1.43.1",
- "resolved": "https://registry.npmjs.org/@types/sass/-/sass-1.43.1.tgz",
- "integrity": "sha512-BPdoIt1lfJ6B7rw35ncdwBZrAssjcwzI5LByIrYs+tpXlj/CAkuVdRsgZDdP4lq5EjyWzwxZCqAoFyHKFwp32g==",
- "dev": true,
- "dependencies": {
- "@types/node": "*"
- }
- },
"node_modules/@types/unist": {
"version": "2.0.6",
"resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.6.tgz",
@@ -1122,12 +1029,6 @@
"url": "https://github.com/sponsors/wooorm"
}
},
- "node_modules/balanced-match": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz",
- "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==",
- "dev": true
- },
"node_modules/base64-js": {
"version": "1.5.1",
"resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz",
@@ -1287,16 +1188,6 @@
"node": ">=8"
}
},
- "node_modules/brace-expansion": {
- "version": "1.1.11",
- "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
- "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
- "dev": true,
- "dependencies": {
- "balanced-match": "^1.0.0",
- "concat-map": "0.0.1"
- }
- },
"node_modules/braces": {
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz",
@@ -1361,15 +1252,6 @@
"ieee754": "^1.2.1"
}
},
- "node_modules/buffer-crc32": {
- "version": "0.2.13",
- "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz",
- "integrity": "sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ==",
- "dev": true,
- "engines": {
- "node": "*"
- }
- },
"node_modules/bytes": {
"version": "3.1.2",
"resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz",
@@ -1567,12 +1449,6 @@
"integrity": "sha512-L3sHRo1pXXEqX8VU28kfgUY+YGsk09hPqZiZmLacNib6XNTCM8ubYeT7ryXQw8asB1sKgcU5lkB7ONug08aB8w==",
"dev": true
},
- "node_modules/concat-map": {
- "version": "0.0.1",
- "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
- "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==",
- "dev": true
- },
"node_modules/content-disposition": {
"version": "0.5.4",
"resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz",
@@ -1685,12 +1561,6 @@
"url": "https://github.com/sponsors/wooorm"
}
},
- "node_modules/dedent-js": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/dedent-js/-/dedent-js-1.0.1.tgz",
- "integrity": "sha512-OUepMozQULMLUmhxS95Vudo0jb0UchLimi3+pQ2plj61Fcy8axbP9hbiD4Sz6DPqn6XG3kfmziVfQ1rSys5AJQ==",
- "dev": true
- },
"node_modules/deepmerge": {
"version": "4.2.2",
"resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.2.2.tgz",
@@ -1735,15 +1605,6 @@
"npm": "1.2.8000 || >= 1.4.16"
}
},
- "node_modules/detect-indent": {
- "version": "6.1.0",
- "resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-6.1.0.tgz",
- "integrity": "sha512-reYkTUJAZb9gUuZ2RvVCNhVHdg62RHnJ7WJl8ftMi4diZ6NWlciOzQN88pUhSELEwflJht4oQDv0F0BMlwaYtA==",
- "dev": true,
- "engines": {
- "node": ">=8"
- }
- },
"node_modules/diff": {
"version": "5.1.0",
"resolved": "https://registry.npmjs.org/diff/-/diff-5.1.0.tgz",
@@ -1821,12 +1682,6 @@
"integrity": "sha512-+7IwY/kiGAacQfY+YBhKMvEmyAJnw5grTUgjG85Pe7vcUI/6b7pZjZG8nQ7+48YhzEAEqrEgD2dCz/JIK+AYvw==",
"dev": true
},
- "node_modules/es6-promise": {
- "version": "3.3.1",
- "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-3.3.1.tgz",
- "integrity": "sha512-SOp9Phqvqn7jtEUxPWdWfWoLmyt2VaJ6MpvP9Comy1MceMXqE6bxvaTu4iaxpYYPzhny28Lc+M87/c2cPK6lDg==",
- "dev": true
- },
"node_modules/esbuild": {
"version": "0.14.54",
"resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.14.54.tgz",
@@ -2222,12 +2077,6 @@
"url": "https://opencollective.com/unified"
}
},
- "node_modules/estree-walker": {
- "version": "2.0.2",
- "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz",
- "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==",
- "dev": true
- },
"node_modules/etag": {
"version": "1.8.1",
"resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz",
@@ -2497,12 +2346,6 @@
"node": ">= 0.6"
}
},
- "node_modules/fs.realpath": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
- "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==",
- "dev": true
- },
"node_modules/fsevents": {
"version": "2.3.2",
"resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz",
@@ -2562,26 +2405,6 @@
"integrity": "sha512-w0dzqw/nt51xMVmlaV1+JRzN+oCa1KfcgGEWhxUG16wbdA+Xnt/yoFO8Z8x/V82ZcZ0wy6ln9QDup5avbhiDhQ==",
"dev": true
},
- "node_modules/glob": {
- "version": "7.2.3",
- "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz",
- "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==",
- "dev": true,
- "dependencies": {
- "fs.realpath": "^1.0.0",
- "inflight": "^1.0.4",
- "inherits": "2",
- "minimatch": "^3.1.1",
- "once": "^1.3.0",
- "path-is-absolute": "^1.0.0"
- },
- "engines": {
- "node": "*"
- },
- "funding": {
- "url": "https://github.com/sponsors/isaacs"
- }
- },
"node_modules/glob-parent": {
"version": "5.1.2",
"resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz",
@@ -2900,16 +2723,6 @@
}
]
},
- "node_modules/inflight": {
- "version": "1.0.6",
- "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
- "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==",
- "dev": true,
- "dependencies": {
- "once": "^1.3.0",
- "wrappy": "1"
- }
- },
"node_modules/inherits": {
"version": "2.0.4",
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
@@ -3310,15 +3123,6 @@
"url": "https://github.com/sponsors/wooorm"
}
},
- "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==",
- "dev": true,
- "dependencies": {
- "tslib": "^2.0.3"
- }
- },
"node_modules/lru-cache": {
"version": "6.0.0",
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz",
@@ -4359,45 +4163,6 @@
"url": "https://github.com/sponsors/sindresorhus"
}
},
- "node_modules/min-indent": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/min-indent/-/min-indent-1.0.1.tgz",
- "integrity": "sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg==",
- "dev": true,
- "engines": {
- "node": ">=4"
- }
- },
- "node_modules/minimatch": {
- "version": "3.1.2",
- "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",
- "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",
- "dev": true,
- "dependencies": {
- "brace-expansion": "^1.1.7"
- },
- "engines": {
- "node": "*"
- }
- },
- "node_modules/minimist": {
- "version": "1.2.6",
- "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz",
- "integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==",
- "dev": true
- },
- "node_modules/mkdirp": {
- "version": "0.5.6",
- "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz",
- "integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==",
- "dev": true,
- "dependencies": {
- "minimist": "^1.2.6"
- },
- "bin": {
- "mkdirp": "bin/cmd.js"
- }
- },
"node_modules/mri": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/mri/-/mri-1.2.0.tgz",
@@ -4452,16 +4217,6 @@
"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==",
- "dev": true,
- "dependencies": {
- "lower-case": "^2.0.2",
- "tslib": "^2.0.3"
- }
- },
"node_modules/node-domexception": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/node-domexception/-/node-domexception-1.0.0.tgz",
@@ -4549,15 +4304,6 @@
"node": ">= 0.8"
}
},
- "node_modules/once": {
- "version": "1.4.0",
- "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
- "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==",
- "dev": true,
- "dependencies": {
- "wrappy": "1"
- }
- },
"node_modules/onetime": {
"version": "6.0.0",
"resolved": "https://registry.npmjs.org/onetime/-/onetime-6.0.0.tgz",
@@ -4696,16 +4442,6 @@
"node": ">= 0.8"
}
},
- "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==",
- "dev": true,
- "dependencies": {
- "no-case": "^3.0.4",
- "tslib": "^2.0.3"
- }
- },
"node_modules/path-browserify": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-1.0.1.tgz",
@@ -4721,15 +4457,6 @@
"node": ">=8"
}
},
- "node_modules/path-is-absolute": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
- "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==",
- "dev": true,
- "engines": {
- "node": ">=0.10.0"
- }
- },
"node_modules/path-key": {
"version": "3.1.1",
"resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz",
@@ -5336,18 +5063,6 @@
"node": ">=0.10.0"
}
},
- "node_modules/rimraf": {
- "version": "2.7.1",
- "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz",
- "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==",
- "dev": true,
- "dependencies": {
- "glob": "^7.1.3"
- },
- "bin": {
- "rimraf": "bin.js"
- }
- },
"node_modules/rollup": {
"version": "2.78.1",
"resolved": "https://registry.npmjs.org/rollup/-/rollup-2.78.1.tgz",
@@ -5409,18 +5124,6 @@
"resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",
"integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg=="
},
- "node_modules/sander": {
- "version": "0.5.1",
- "resolved": "https://registry.npmjs.org/sander/-/sander-0.5.1.tgz",
- "integrity": "sha512-3lVqBir7WuKDHGrKRDn/1Ye3kwpXaDOMsiRP1wd6wpZW56gJhsbp5RqQpA6JG/P+pkXizygnr1dKR8vzWaVsfA==",
- "dev": true,
- "dependencies": {
- "es6-promise": "^3.1.2",
- "graceful-fs": "^4.1.3",
- "mkdirp": "^0.5.1",
- "rimraf": "^2.5.2"
- }
- },
"node_modules/section-matter": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/section-matter/-/section-matter-1.0.0.tgz",
@@ -5609,21 +5312,6 @@
"url": "https://github.com/sponsors/sindresorhus"
}
},
- "node_modules/sorcery": {
- "version": "0.10.0",
- "resolved": "https://registry.npmjs.org/sorcery/-/sorcery-0.10.0.tgz",
- "integrity": "sha512-R5ocFmKZQFfSTstfOtHjJuAwbpGyf9qjQa1egyhvXSbM7emjrtLXtGdZsDJDABC85YBfVvrOiGWKSYXPKdvP1g==",
- "dev": true,
- "dependencies": {
- "buffer-crc32": "^0.2.5",
- "minimist": "^1.2.0",
- "sander": "^0.5.0",
- "sourcemap-codec": "^1.3.0"
- },
- "bin": {
- "sorcery": "bin/index.js"
- }
- },
"node_modules/source-map": {
"version": "0.7.4",
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.4.tgz",
@@ -5777,18 +5465,6 @@
"url": "https://github.com/sponsors/sindresorhus"
}
},
- "node_modules/strip-indent": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-3.0.0.tgz",
- "integrity": "sha512-laJTa3Jb+VQpaC6DseHhF7dXVqHTfJPCRDaEbid/drOhgitgYku/letMUqOXFoWV0zIIUbjpdH2t+tYj4bQMRQ==",
- "dev": true,
- "dependencies": {
- "min-indent": "^1.0.0"
- },
- "engines": {
- "node": ">=8"
- }
- },
"node_modules/style-to-object": {
"version": "0.3.0",
"resolved": "https://registry.npmjs.org/style-to-object/-/style-to-object-0.3.0.tgz",
@@ -5840,98 +5516,6 @@
"node": ">= 8"
}
},
- "node_modules/svelte-hmr": {
- "version": "0.14.12",
- "resolved": "https://registry.npmjs.org/svelte-hmr/-/svelte-hmr-0.14.12.tgz",
- "integrity": "sha512-4QSW/VvXuqVcFZ+RhxiR8/newmwOCTlbYIezvkeN6302YFRE8cXy0naamHcjz8Y9Ce3ITTZtrHrIL0AGfyo61w==",
- "dev": true,
- "engines": {
- "node": "^12.20 || ^14.13.1 || >= 16"
- },
- "peerDependencies": {
- "svelte": ">=3.19.0"
- }
- },
- "node_modules/svelte-preprocess": {
- "version": "4.10.7",
- "resolved": "https://registry.npmjs.org/svelte-preprocess/-/svelte-preprocess-4.10.7.tgz",
- "integrity": "sha512-sNPBnqYD6FnmdBrUmBCaqS00RyCsCpj2BG58A1JBswNF7b0OKviwxqVrOL/CKyJrLSClrSeqQv5BXNg2RUbPOw==",
- "dev": true,
- "hasInstallScript": true,
- "dependencies": {
- "@types/pug": "^2.0.4",
- "@types/sass": "^1.16.0",
- "detect-indent": "^6.0.0",
- "magic-string": "^0.25.7",
- "sorcery": "^0.10.0",
- "strip-indent": "^3.0.0"
- },
- "engines": {
- "node": ">= 9.11.2"
- },
- "peerDependencies": {
- "@babel/core": "^7.10.2",
- "coffeescript": "^2.5.1",
- "less": "^3.11.3 || ^4.0.0",
- "postcss": "^7 || ^8",
- "postcss-load-config": "^2.1.0 || ^3.0.0 || ^4.0.0",
- "pug": "^3.0.0",
- "sass": "^1.26.8",
- "stylus": "^0.55.0",
- "sugarss": "^2.0.0",
- "svelte": "^3.23.0",
- "typescript": "^3.9.5 || ^4.0.0"
- },
- "peerDependenciesMeta": {
- "@babel/core": {
- "optional": true
- },
- "coffeescript": {
- "optional": true
- },
- "less": {
- "optional": true
- },
- "node-sass": {
- "optional": true
- },
- "postcss": {
- "optional": true
- },
- "postcss-load-config": {
- "optional": true
- },
- "pug": {
- "optional": true
- },
- "sass": {
- "optional": true
- },
- "stylus": {
- "optional": true
- },
- "sugarss": {
- "optional": true
- },
- "typescript": {
- "optional": true
- }
- }
- },
- "node_modules/svelte2tsx": {
- "version": "0.5.14",
- "resolved": "https://registry.npmjs.org/svelte2tsx/-/svelte2tsx-0.5.14.tgz",
- "integrity": "sha512-/9hGkIUMVwZDJoERS6k1x+y6Ir+PpkxbL/UWQ2+RhK/PwUoIaDTCfw79/H1bgYNUTr/7ZaYanJGPuaWARNbbyQ==",
- "dev": true,
- "dependencies": {
- "dedent-js": "^1.0.1",
- "pascal-case": "^3.1.1"
- },
- "peerDependencies": {
- "svelte": "^3.24",
- "typescript": "^4.1.2"
- }
- },
"node_modules/to-fast-properties": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz",
@@ -6638,12 +6222,6 @@
"url": "https://github.com/chalk/ansi-styles?sponsor=1"
}
},
- "node_modules/wrappy": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
- "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==",
- "dev": true
- },
"node_modules/yallist": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz",
@@ -6806,19 +6384,6 @@
"prismjs": "^1.28.0"
}
},
- "@astrojs/svelte": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/@astrojs/svelte/-/svelte-1.0.0.tgz",
- "integrity": "sha512-WmvcEe86j/3wL2xWURo1Kxtgh+s0CVys2j7xQboHr0ZeH9TBlkQuacAT8mWccD1/MikhDVqL/1hnF/n+vRKuGw==",
- "dev": true,
- "requires": {
- "@sveltejs/vite-plugin-svelte": "^1.0.1",
- "postcss-load-config": "^3.1.4",
- "svelte-preprocess": "^4.10.7",
- "svelte2tsx": "^0.5.11",
- "vite": "^3.0.0"
- }
- },
"@astrojs/telemetry": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/@astrojs/telemetry/-/telemetry-1.0.0.tgz",
@@ -7249,41 +6814,6 @@
"tsm": "^2.1.4"
}
},
- "@rollup/pluginutils": {
- "version": "4.2.1",
- "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-4.2.1.tgz",
- "integrity": "sha512-iKnFXr7NkdZAIHiIWE+BX5ULi/ucVFYWD6TbAV+rZctiRTY2PL6tsIKhoIOaoskiWAkgu+VsbXgUVDNLHf+InQ==",
- "dev": true,
- "requires": {
- "estree-walker": "^2.0.1",
- "picomatch": "^2.2.2"
- }
- },
- "@sveltejs/vite-plugin-svelte": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/@sveltejs/vite-plugin-svelte/-/vite-plugin-svelte-1.0.2.tgz",
- "integrity": "sha512-8tTVbNuraeDchBaArNbwaZLpO0feM7BRSdZU5yeM4Clasx2p1p1CYBoWh+VgxZlxiark49HXummkHqKztbl8lA==",
- "dev": true,
- "requires": {
- "@rollup/pluginutils": "^4.2.1",
- "debug": "^4.3.4",
- "deepmerge": "^4.2.2",
- "kleur": "^4.1.5",
- "magic-string": "^0.26.2",
- "svelte-hmr": "^0.14.12"
- },
- "dependencies": {
- "magic-string": {
- "version": "0.26.2",
- "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.26.2.tgz",
- "integrity": "sha512-NzzlXpclt5zAbmo6h6jNc8zl2gNRGHvmsZW4IvZhTC4W7k4OlLP+S5YLussa/r3ixNT66KOQfNORlXHSOy/X4A==",
- "dev": true,
- "requires": {
- "sourcemap-codec": "^1.4.8"
- }
- }
- }
- },
"@types/acorn": {
"version": "4.0.6",
"resolved": "https://registry.npmjs.org/@types/acorn/-/acorn-4.0.6.tgz",
@@ -7362,39 +6892,18 @@
"@types/unist": "*"
}
},
- "@types/node": {
- "version": "18.7.13",
- "resolved": "https://registry.npmjs.org/@types/node/-/node-18.7.13.tgz",
- "integrity": "sha512-46yIhxSe5xEaJZXWdIBP7GU4HDTG8/eo0qd9atdiL+lFpA03y8KS+lkTN834TWJj5767GbWv4n/P6efyTFt1Dw==",
- "dev": true
- },
"@types/parse5": {
"version": "6.0.3",
"resolved": "https://registry.npmjs.org/@types/parse5/-/parse5-6.0.3.tgz",
"integrity": "sha512-SuT16Q1K51EAVPz1K29DJ/sXjhSQ0zjvsypYJ6tlwVsRV9jwW5Adq2ch8Dq8kDBCkYnELS7N7VNCSB5nC56t/g==",
"dev": true
},
- "@types/pug": {
- "version": "2.0.6",
- "resolved": "https://registry.npmjs.org/@types/pug/-/pug-2.0.6.tgz",
- "integrity": "sha512-SnHmG9wN1UVmagJOnyo/qkk0Z7gejYxOYYmaAwr5u2yFYfsupN3sg10kyzN8Hep/2zbHxCnsumxOoRIRMBwKCg==",
- "dev": true
- },
"@types/resolve": {
"version": "1.20.2",
"resolved": "https://registry.npmjs.org/@types/resolve/-/resolve-1.20.2.tgz",
"integrity": "sha512-60BCwRFOZCQhDncwQdxxeOEEkbc5dIMccYLwbxsS4TUNeVECQ/pBJ0j09mrHOl/JJvpRPGwO9SvE4nR2Nb/a4Q==",
"dev": true
},
- "@types/sass": {
- "version": "1.43.1",
- "resolved": "https://registry.npmjs.org/@types/sass/-/sass-1.43.1.tgz",
- "integrity": "sha512-BPdoIt1lfJ6B7rw35ncdwBZrAssjcwzI5LByIrYs+tpXlj/CAkuVdRsgZDdP4lq5EjyWzwxZCqAoFyHKFwp32g==",
- "dev": true,
- "requires": {
- "@types/node": "*"
- }
- },
"@types/unist": {
"version": "2.0.6",
"resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.6.tgz",
@@ -7601,12 +7110,6 @@
"integrity": "sha512-0xO6mYd7JB2YesxDKplafRpsiOzPt9V02ddPCLbY1xYGPOX24NTyN50qnUxgCPcSoYMhKpAuBTjQoRZCAkUDRw==",
"dev": true
},
- "balanced-match": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz",
- "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==",
- "dev": true
- },
"base64-js": {
"version": "1.5.1",
"resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz",
@@ -7725,16 +7228,6 @@
}
}
},
- "brace-expansion": {
- "version": "1.1.11",
- "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
- "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
- "dev": true,
- "requires": {
- "balanced-match": "^1.0.0",
- "concat-map": "0.0.1"
- }
- },
"braces": {
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz",
@@ -7766,12 +7259,6 @@
"ieee754": "^1.2.1"
}
},
- "buffer-crc32": {
- "version": "0.2.13",
- "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz",
- "integrity": "sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ==",
- "dev": true
- },
"bytes": {
"version": "3.1.2",
"resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz",
@@ -7899,12 +7386,6 @@
"integrity": "sha512-L3sHRo1pXXEqX8VU28kfgUY+YGsk09hPqZiZmLacNib6XNTCM8ubYeT7ryXQw8asB1sKgcU5lkB7ONug08aB8w==",
"dev": true
},
- "concat-map": {
- "version": "0.0.1",
- "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
- "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==",
- "dev": true
- },
"content-disposition": {
"version": "0.5.4",
"resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz",
@@ -7978,12 +7459,6 @@
"character-entities": "^2.0.0"
}
},
- "dedent-js": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/dedent-js/-/dedent-js-1.0.1.tgz",
- "integrity": "sha512-OUepMozQULMLUmhxS95Vudo0jb0UchLimi3+pQ2plj61Fcy8axbP9hbiD4Sz6DPqn6XG3kfmziVfQ1rSys5AJQ==",
- "dev": true
- },
"deepmerge": {
"version": "4.2.2",
"resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.2.2.tgz",
@@ -8015,12 +7490,6 @@
"resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz",
"integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg=="
},
- "detect-indent": {
- "version": "6.1.0",
- "resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-6.1.0.tgz",
- "integrity": "sha512-reYkTUJAZb9gUuZ2RvVCNhVHdg62RHnJ7WJl8ftMi4diZ6NWlciOzQN88pUhSELEwflJht4oQDv0F0BMlwaYtA==",
- "dev": true
- },
"diff": {
"version": "5.1.0",
"resolved": "https://registry.npmjs.org/diff/-/diff-5.1.0.tgz",
@@ -8089,12 +7558,6 @@
"integrity": "sha512-+7IwY/kiGAacQfY+YBhKMvEmyAJnw5grTUgjG85Pe7vcUI/6b7pZjZG8nQ7+48YhzEAEqrEgD2dCz/JIK+AYvw==",
"dev": true
},
- "es6-promise": {
- "version": "3.3.1",
- "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-3.3.1.tgz",
- "integrity": "sha512-SOp9Phqvqn7jtEUxPWdWfWoLmyt2VaJ6MpvP9Comy1MceMXqE6bxvaTu4iaxpYYPzhny28Lc+M87/c2cPK6lDg==",
- "dev": true
- },
"esbuild": {
"version": "0.14.54",
"resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.14.54.tgz",
@@ -8282,12 +7745,6 @@
"@types/unist": "^2.0.0"
}
},
- "estree-walker": {
- "version": "2.0.2",
- "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz",
- "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==",
- "dev": true
- },
"etag": {
"version": "1.8.1",
"resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz",
@@ -8495,12 +7952,6 @@
"resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz",
"integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q=="
},
- "fs.realpath": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
- "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==",
- "dev": true
- },
"fsevents": {
"version": "2.3.2",
"resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz",
@@ -8541,20 +7992,6 @@
"integrity": "sha512-w0dzqw/nt51xMVmlaV1+JRzN+oCa1KfcgGEWhxUG16wbdA+Xnt/yoFO8Z8x/V82ZcZ0wy6ln9QDup5avbhiDhQ==",
"dev": true
},
- "glob": {
- "version": "7.2.3",
- "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz",
- "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==",
- "dev": true,
- "requires": {
- "fs.realpath": "^1.0.0",
- "inflight": "^1.0.4",
- "inherits": "2",
- "minimatch": "^3.1.1",
- "once": "^1.3.0",
- "path-is-absolute": "^1.0.0"
- }
- },
"glob-parent": {
"version": "5.1.2",
"resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz",
@@ -8786,16 +8223,6 @@
"integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==",
"dev": true
},
- "inflight": {
- "version": "1.0.6",
- "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
- "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==",
- "dev": true,
- "requires": {
- "once": "^1.3.0",
- "wrappy": "1"
- }
- },
"inherits": {
"version": "2.0.4",
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
@@ -9051,15 +8478,6 @@
"integrity": "sha512-cHlYSUpL2s7Fb3394mYxwTYj8niTaNHUCLr0qdiCXQfSjfuA7CKofpX2uSwEfFDQ0EB7JcnMnm+GjbqqoinYYg==",
"dev": true
},
- "lower-case": {
- "version": "2.0.2",
- "resolved": "https://registry.npmjs.org/lower-case/-/lower-case-2.0.2.tgz",
- "integrity": "sha512-7fm3l3NAF9WfN6W3JOmf5drwpVqX78JtoGJ3A6W0a6ZnldM41w2fV5D490psKFTpMds8TJse/eHLFFsNHHjHgg==",
- "dev": true,
- "requires": {
- "tslib": "^2.0.3"
- }
- },
"lru-cache": {
"version": "6.0.0",
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz",
@@ -9733,36 +9151,6 @@
"integrity": "sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw==",
"dev": true
},
- "min-indent": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/min-indent/-/min-indent-1.0.1.tgz",
- "integrity": "sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg==",
- "dev": true
- },
- "minimatch": {
- "version": "3.1.2",
- "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",
- "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",
- "dev": true,
- "requires": {
- "brace-expansion": "^1.1.7"
- }
- },
- "minimist": {
- "version": "1.2.6",
- "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz",
- "integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==",
- "dev": true
- },
- "mkdirp": {
- "version": "0.5.6",
- "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz",
- "integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==",
- "dev": true,
- "requires": {
- "minimist": "^1.2.6"
- }
- },
"mri": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/mri/-/mri-1.2.0.tgz",
@@ -9798,16 +9186,6 @@
"integrity": "sha512-3x3jwTd6UPG7vi5k4GEzvxJ5rDA7hVUIRNHPblKuMVP9Z3xmlsd9cgLcpAMkc5uPOBna82EeshROFhsPkbnTZg==",
"dev": true
},
- "no-case": {
- "version": "3.0.4",
- "resolved": "https://registry.npmjs.org/no-case/-/no-case-3.0.4.tgz",
- "integrity": "sha512-fgAN3jGAh+RoxUGZHTSOLJIqUc2wmoBwGR4tbpNAKmmovFoWq0OdRkb0VkldReO2a2iBT/OEulG9XSUc10r3zg==",
- "dev": true,
- "requires": {
- "lower-case": "^2.0.2",
- "tslib": "^2.0.3"
- }
- },
"node-domexception": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/node-domexception/-/node-domexception-1.0.0.tgz",
@@ -9859,15 +9237,6 @@
"ee-first": "1.1.1"
}
},
- "once": {
- "version": "1.4.0",
- "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
- "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==",
- "dev": true,
- "requires": {
- "wrappy": "1"
- }
- },
"onetime": {
"version": "6.0.0",
"resolved": "https://registry.npmjs.org/onetime/-/onetime-6.0.0.tgz",
@@ -9964,16 +9333,6 @@
"resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz",
"integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ=="
},
- "pascal-case": {
- "version": "3.1.2",
- "resolved": "https://registry.npmjs.org/pascal-case/-/pascal-case-3.1.2.tgz",
- "integrity": "sha512-uWlGT3YSnK9x3BQJaOdcZwrnV6hPpd8jFH1/ucpiLRPh/2zCVJKS19E4GvYHvaCcACn3foXZ0cLB9Wrx1KGe5g==",
- "dev": true,
- "requires": {
- "no-case": "^3.0.4",
- "tslib": "^2.0.3"
- }
- },
"path-browserify": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-1.0.1.tgz",
@@ -9986,12 +9345,6 @@
"integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==",
"dev": true
},
- "path-is-absolute": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
- "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==",
- "dev": true
- },
"path-key": {
"version": "3.1.1",
"resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz",
@@ -10414,15 +9767,6 @@
"integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==",
"dev": true
},
- "rimraf": {
- "version": "2.7.1",
- "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz",
- "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==",
- "dev": true,
- "requires": {
- "glob": "^7.1.3"
- }
- },
"rollup": {
"version": "2.78.1",
"resolved": "https://registry.npmjs.org/rollup/-/rollup-2.78.1.tgz",
@@ -10461,18 +9805,6 @@
"resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",
"integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg=="
},
- "sander": {
- "version": "0.5.1",
- "resolved": "https://registry.npmjs.org/sander/-/sander-0.5.1.tgz",
- "integrity": "sha512-3lVqBir7WuKDHGrKRDn/1Ye3kwpXaDOMsiRP1wd6wpZW56gJhsbp5RqQpA6JG/P+pkXizygnr1dKR8vzWaVsfA==",
- "dev": true,
- "requires": {
- "es6-promise": "^3.1.2",
- "graceful-fs": "^4.1.3",
- "mkdirp": "^0.5.1",
- "rimraf": "^2.5.2"
- }
- },
"section-matter": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/section-matter/-/section-matter-1.0.0.tgz",
@@ -10628,18 +9960,6 @@
"integrity": "sha512-3dOsAHXXUkQTpOYcoAxLIorMTp4gIQr5IW3iVb7A7lFIp0VHhnynm9izx6TssdrIcVIESAlVjtnO2K8bg+Coew==",
"dev": true
},
- "sorcery": {
- "version": "0.10.0",
- "resolved": "https://registry.npmjs.org/sorcery/-/sorcery-0.10.0.tgz",
- "integrity": "sha512-R5ocFmKZQFfSTstfOtHjJuAwbpGyf9qjQa1egyhvXSbM7emjrtLXtGdZsDJDABC85YBfVvrOiGWKSYXPKdvP1g==",
- "dev": true,
- "requires": {
- "buffer-crc32": "^0.2.5",
- "minimist": "^1.2.0",
- "sander": "^0.5.0",
- "sourcemap-codec": "^1.3.0"
- }
- },
"source-map": {
"version": "0.7.4",
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.4.tgz",
@@ -10740,15 +10060,6 @@
"integrity": "sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw==",
"dev": true
},
- "strip-indent": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-3.0.0.tgz",
- "integrity": "sha512-laJTa3Jb+VQpaC6DseHhF7dXVqHTfJPCRDaEbid/drOhgitgYku/letMUqOXFoWV0zIIUbjpdH2t+tYj4bQMRQ==",
- "dev": true,
- "requires": {
- "min-indent": "^1.0.0"
- }
- },
"style-to-object": {
"version": "0.3.0",
"resolved": "https://registry.npmjs.org/style-to-object/-/style-to-object-0.3.0.tgz",
@@ -10788,37 +10099,6 @@
"integrity": "sha512-+lmjic1pApJWDfPCpUUTc1m8azDqYCG1JN9YEngrx/hUyIcFJo6VZhj0A1Ai0wqoHcEIuQy+e9tk+4uDgdtsFA==",
"dev": true
},
- "svelte-hmr": {
- "version": "0.14.12",
- "resolved": "https://registry.npmjs.org/svelte-hmr/-/svelte-hmr-0.14.12.tgz",
- "integrity": "sha512-4QSW/VvXuqVcFZ+RhxiR8/newmwOCTlbYIezvkeN6302YFRE8cXy0naamHcjz8Y9Ce3ITTZtrHrIL0AGfyo61w==",
- "dev": true,
- "requires": {}
- },
- "svelte-preprocess": {
- "version": "4.10.7",
- "resolved": "https://registry.npmjs.org/svelte-preprocess/-/svelte-preprocess-4.10.7.tgz",
- "integrity": "sha512-sNPBnqYD6FnmdBrUmBCaqS00RyCsCpj2BG58A1JBswNF7b0OKviwxqVrOL/CKyJrLSClrSeqQv5BXNg2RUbPOw==",
- "dev": true,
- "requires": {
- "@types/pug": "^2.0.4",
- "@types/sass": "^1.16.0",
- "detect-indent": "^6.0.0",
- "magic-string": "^0.25.7",
- "sorcery": "^0.10.0",
- "strip-indent": "^3.0.0"
- }
- },
- "svelte2tsx": {
- "version": "0.5.14",
- "resolved": "https://registry.npmjs.org/svelte2tsx/-/svelte2tsx-0.5.14.tgz",
- "integrity": "sha512-/9hGkIUMVwZDJoERS6k1x+y6Ir+PpkxbL/UWQ2+RhK/PwUoIaDTCfw79/H1bgYNUTr/7ZaYanJGPuaWARNbbyQ==",
- "dev": true,
- "requires": {
- "dedent-js": "^1.0.1",
- "pascal-case": "^3.1.1"
- }
- },
"to-fast-properties": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz",
@@ -11301,12 +10581,6 @@
}
}
},
- "wrappy": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
- "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==",
- "dev": true
- },
"yallist": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz",
diff --git a/package.json b/package.json
index 5270003..c50c4f2 100644
--- a/package.json
+++ b/package.json
@@ -10,7 +10,6 @@
"astro": "astro"
},
"devDependencies": {
- "@astrojs/svelte": "^1.0.0",
"astro": "^1.0.8",
"svelte": "^3.49.0"
},
diff --git a/run.sh b/run.sh
index b10db49..c1a87f7 100755
--- a/run.sh
+++ b/run.sh
@@ -3,9 +3,9 @@
cd ${0%/*} # go to project root
set -xe
-# NODE_TLS_REJECT_UNAUTHORIZED=0 npm run dev -- --host
+NODE_TLS_REJECT_UNAUTHORIZED=0 npm run dev -- --host
-npm run build
-NODE_TLS_REJECT_UNAUTHORIZED=0 node server.mjs
+# npm run build
+# NODE_TLS_REJECT_UNAUTHORIZED=0 node server.mjs
# deno run --allow-net --allow-read --allow-env --unsafely-ignore-certificate-errors=localhost ./dist/server/entry.mjs
diff --git a/src/components/Form.astro b/src/components/Form.astro
index 417b569..540a4d4 100644
--- a/src/components/Form.astro
+++ b/src/components/Form.astro
@@ -1,7 +1,11 @@
---
-import '../styles/blackbox.css';
import { sha256 } from 'js-sha256';
+export interface Props {
+ board: string;
+ tid?: string
+}
+
const { board, tid } = Astro.props;
const iphash = sha256(Astro.clientAddress);
---
@@ -31,6 +35,7 @@ const iphash = sha256(Astro.clientAddress);
if(r.status == 200) {
alert('Thread Successfuly Posted');
let id = await r.text();
+ if(id == 'close') window.top.close();
window.location.assign(`/board/${board}/${id}`);
}
else alert('An Error has Accured');
diff --git a/src/components/Image.astro b/src/components/Image.astro
new file mode 100644
index 0000000..07dbadf
--- /dev/null
+++ b/src/components/Image.astro
@@ -0,0 +1,21 @@
+---
+export interface Props {
+ image: string;
+ fileType: string;
+}
+
+const { image, fileType } = Astro.props;
+---
+
+{(image!= null) && (
+ (fileType == 'image') ? (
+ <a href={image} target="_blank" rel="noopener noreferrer">
+ <img src={image} alt={image} height="300px" width="300px"> <br>
+ </a>
+ ) : (
+ (fileType == 'image') && (
+ <video width="320" height="240" controls muted>
+ <source src={image}>
+ </video>
+ ))
+)} \ No newline at end of file
diff --git a/src/components/Post.astro b/src/components/Post.astro
new file mode 100644
index 0000000..6805846
--- /dev/null
+++ b/src/components/Post.astro
@@ -0,0 +1,28 @@
+---
+import { creatorColor, formatTime } from '../lib/util';
+
+export interface Props {
+ id: string;
+ date: number;
+ creator: string;
+ box: string;
+ board: string
+}
+
+const { id, date, creator, box, board = '' } = Astro.props;
+---
+<div class={box} id={id}>
+ <span style="line-height: 2rem;">
+ {(board != '') ? (
+ <a href=`/board/${board}/${id}` style="font-family: mono">{id}</a>
+ ) : (
+ <span style="font=family: mono">{id}</span>
+ )}
+
+ at {formatTime(date)} <br>
+ -> <span style=`${creatorColor(creator)}; font-family: mono`>
+ {creator}
+ </span> <br>
+ </span> <hr>
+ <slot />
+</div>
diff --git a/src/components/Thread.astro b/src/components/Thread.astro
new file mode 100644
index 0000000..6fae3de
--- /dev/null
+++ b/src/components/Thread.astro
@@ -0,0 +1,82 @@
+---
+import type Thread from '../models/Thread';
+import Post from './Post.astro';
+import Image from './Image.astro';
+
+export interface Props {
+ thread: Thread;
+ board: string;
+ comments: boolean;
+}
+
+const { thread, board, comments = false } = Astro.props;
+
+let replies: string[] = [];
+const listReplies = (id: string, getReplies: boolean = false): any => {
+ if(getReplies) return replies;
+
+ replies = [];
+ thread.comments.forEach(comment => {
+ if(comment.commentText.includes(id))
+ replies.push(comment.id);
+ })
+
+ if(replies.length <= 0) return false;
+ return true;
+}
+---
+
+{(thread.id != "rules") && ( <>
+ <Post id={thread.id} date={thread.creationDate} creator={thread.threadCreator} box="threadbox" board={(!comments) ? board : ''}>
+
+ {comments && (listReplies(thread.id) && (
+ <span class="small-mono">
+ {listReplies(thread.id, true).map((id) => ( <>
+ <a href=`/board/${board}/${thread.id}#${id}` onmouseover=`onMouseOver('${id}')` onmouseleave=`onMouseLeave('${id}')`>>>{id}</a>&#65279;
+ </> ))}
+ </span> <hr>
+ ))}
+
+
+ <h3>{thread.threadName}</h3>
+ <Image image={thread.imageId} fileType={thread.fileType} />
+ <p set:html={thread.threadText} />
+
+ {comments && ( <>
+ {thread.comments.map((comment) => ( <>
+ <Post id={comment.id} date={comment.creationDate} creator={comment.commentCreator} box="commentbox">
+
+ {listReplies(comment.id) && (
+ <span class="small-mono">
+ {listReplies(comment.id, true).map((id) => ( <>
+ <a href=`/board/${board}/${thread.id}#${id}` onmouseover=`onMouseOver('${id}')` onmouseleave=`onMouseLeave('${id}')`>>>{id}</a>&#65279;
+ </> ))}
+ </span> <hr>
+ )}
+
+ <Image image={comment.imageId} fileType={comment.fileType} />
+ <p set:html={comment.commentText} />
+
+ </Post>
+ </> ))}
+ </> )}
+
+ </Post>
+</> )}
+
+{comments && ( <>
+ <script is:inline>
+ function onMouseOver(id) {
+ document.getElementById(id).classList.add('targeted');
+ }
+ function onMouseLeave(id) {
+ document.getElementById(id).classList.remove('targeted');
+ }
+ </script>
+
+ <style is:inline>
+ .small-mono {
+ display:inline-block; line-height: 2ch; font-size: 0.8rem; font-family: monospace;
+ }
+ </style>
+</> )}
diff --git a/src/components/Thread.svelte b/src/components/Thread.svelte
deleted file mode 100644
index 0321b8d..0000000
--- a/src/components/Thread.svelte
+++ /dev/null
@@ -1,105 +0,0 @@
-<script lang="ts">
- import { creatorColor, formatTime} from '../lib/util';
- import type Thread from '../models/Thread';
-
- export let thread: Thread;
- export let board: string;
- export let comments: boolean = false;
-
- let replies: string[] = [];
- const listReplies = (id: string, getReplies: boolean = false): any => {
- if(getReplies) return replies;
-
- replies = [];
- thread.comments.forEach(comment => {
- if(comment.commentText.includes(id))
- replies.push(comment.id);
- })
-
- if(replies.length <= 0) return false;
- return true
- }
-
-</script>
-
-{#if thread.id != "rules"}
- <div class="threadbox" id="{thread.id}">
- <span style="line-height: 2rem;">
- <a href="/board/{board}/{thread.id}" style="font-family: mono">{thread.id}</a>
- at {formatTime(thread.creationDate)} <br>
-
- -> <span style="{creatorColor(thread.threadCreator )}; font-family: mono">
- {thread.threadCreator}
- </span > <br>
- <hr>
-
- {#if comments}
- {#if listReplies(thread.id) }
- <span style=" display:inline-block; line-height: 2ch; font-size: 0.8rem; font-family: monospace;">
- {#each listReplies(thread.id, true) as id}
- <a href="/board/{board}/{thread.id}#{id}" onmouseover="document.getElementById('{id}').classList.add('targeted')" onmouseleave="document.getElementById('{id}').classList.remove('targeted')">>>{id}</a> &#xfeff
- {/each}
- </span> <hr>
- {/if}
- {/if}
-
- </span>
-
- <h3>{thread.threadName}</h3>
-
- {#if thread.imageId!= null && thread.imageId != undefined}
- {#if thread.fileType == 'image'}
- <a href="{thread.imageId}" target="_blank" rel="noopener noreferrer">
- <img src="{thread.imageId}" alt="{thread.imageId}" height="300px" width="300px"> <br>
- </a>
- {:else if thread.fileType == 'video'}
- <video width="320" height="240" controls muted>
- <source src="{thread.imageId}">
- </video>
- {/if}
- {/if}
-
-<p>{@html thread.threadText}</p>
-
-{#if comments}
- {#each thread.comments as comment}
- <div class="commentbox" id="{comment.id}">
- <span style="line-height: 2rem;">
- <span style="font-family: mono">{comment.id}</span>
- at {formatTime(comment.creationDate)} <br>
-
- -> <span style="{creatorColor(comment.commentCreator)}; font-family: mono">
- {comment.commentCreator}
- </span> <br>
- <hr>
-
- {#if listReplies(comment.id)}
- <span style=" display:inline-block; line-height: 2ch; font-size: 0.8rem; font-family: monospace;">
- {#each listReplies(comment.id, true) as id}
- <a href="/board/{board}/{thread.id}#{id}" onmouseover="document.getElementById('{id}').classList.add('targeted')" onmouseleave="document.getElementById('{id}').classList.remove('targeted')">>>{id}</a> &#xfeff
- {/each}
- </span> <hr>
- {/if}
-
- </span>
-
- {#if comment.imageId!= null && comment.imageId != undefined}
- {#if comment.fileType == 'image'}
- <a href="{comment.imageId}" target="_blank" rel="noopener noreferrer">
- <img src="{comment.imageId}" alt="{comment.imageId}" height="300px" width="300px"> <br>
- </a>
- {:else if comment.fileType == 'video'}
- <video width="320" height="240" controls muted>
- <source src="{comment.imageId}">
- </video>
- {/if}
- {/if}
-
-<p>{@html comment.commentText}</p>
-
- </div>
- {/each}
-{/if}
-
- </div>
-{/if}
diff --git a/src/layouts/Default.astro b/src/layouts/Default.astro
index 3c0b6ff..ae59edb 100644
--- a/src/layouts/Default.astro
+++ b/src/layouts/Default.astro
@@ -2,13 +2,10 @@
const { title } = Astro.props as Props;
---
-<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width" />
- <link rel="icon" type="image/svg+xml" href="/favicon.svg" />
- <meta name="generator" content={Astro.generator} />
<title>{title}</title>
</head>
<body>
@@ -19,6 +16,5 @@ const { title } = Astro.props as Props;
<style>
html {
font-family: sans-serif;
- padding-left: 1em;
}
</style>
diff --git a/src/layouts/ThreadLayout.astro b/src/layouts/ThreadLayout.astro
new file mode 100644
index 0000000..24aba41
--- /dev/null
+++ b/src/layouts/ThreadLayout.astro
@@ -0,0 +1,22 @@
+---
+const { title } = Astro.props as Props;
+---
+
+<html lang="en">
+ <head>
+ <meta charset="UTF-8" />
+ <meta name="viewport" content="width=device-width" />
+ <title>{title}</title>
+ </head>
+ <body>
+ <div style="max-width: 70%;">
+ <slot />
+ </div>
+ </body>
+</html>
+
+<style>
+ html {
+ font-family: sans-serif;
+ }
+</style>
diff --git a/src/lib/api.ts b/src/lib/api.ts
index 645fc23..e6ac0f1 100644
--- a/src/lib/api.ts
+++ b/src/lib/api.ts
@@ -1,7 +1,7 @@
const base = 'https://localhost:5001/api'
export async function api(method: string, resource: string, data?: any) {
- console.log("API USED", method, resource, data);
+ // console.log("API USED", method, resource, data);
return await fetch(`${base}/${method}/${resource}`, {
method,
headers: {
diff --git a/src/lib/image.ts b/src/lib/image.ts
index c7d4d49..6ab20a5 100644
--- a/src/lib/image.ts
+++ b/src/lib/image.ts
@@ -20,8 +20,8 @@ export async function postImg(img: string) {
let filename = `${uuidV4()}.${fileExt}`;
//save file in this server
- writeFileSync(`dist/client/images/${filename}`, img_b64, "base64");
- // writeFileSync(`public/images/${filename}`, img_b64, "base64");
+ // writeFileSync(`dist/client/images/${filename}`, img_b64, "base64");
+ writeFileSync(`public/images/${filename}`, img_b64, "base64");
let data = {
'name': filename,
diff --git a/src/lib/thread.ts b/src/lib/thread.ts
index e0f0aa4..2199318 100644
--- a/src/lib/thread.ts
+++ b/src/lib/thread.ts
@@ -8,8 +8,8 @@ export async function processThreadIn(board: string, thread: Thread, comments =
if(!thread || !board) return;
let imageId: string = thread.imageId;
- if(existsSync(`dist/client/images/${imageId}`))
- // if(existsSync(`public/images/${imageId}`))
+ // if(existsSync(`dist/client/images/${imageId}`))
+ if(existsSync(`public/images/${imageId}`))
thread.imageId = `/images/${imageId}`;
else
thread.imageId = await getImg(imageId);
@@ -21,8 +21,8 @@ export async function processThreadIn(board: string, thread: Thread, comments =
for(let comment of thread.comments)
{
let cimageId = comment.imageId;
- if(existsSync(`dist/client/images/${cimageId}`))
- // if(existsSync(`public/images/${cimageId}`))
+ // if(existsSync(`dist/client/images/${cimageId}`))
+ if(existsSync(`public/images/${cimageId}`))
comment.imageId = `/images/${cimageId}`;
else
comment.imageId = await getImg(cimageId);
@@ -32,22 +32,34 @@ export async function processThreadIn(board: string, thread: Thread, comments =
}
export async function processThreadOut(form: any): Thread {
- let img = form.get('image').toString();
-
- let t: Thread = {};
- t.id = uuidV4();
- t.ThreadName = form.get('ThreadName').toString();
- t.ThreadCreator = uuidV5(form.get('iphash'), uuidNIL);
- t.ThreadText = form.get('ThreadText').toString();
- t.Comments = [];
- t.CreationDate = Date.now();
- t.ImageId = await postImg(img);
- t.FileType = getImgType(img);
+ let img = form.get('image');
+
+ let t: Thread = {
+ id: uuidV4(),
+ threadName: form.get('ThreadName'),
+ threadCreator: uuidV5(form.get('iphash'), uuidNIL),
+ threadText: form.get('ThreadText'),
+ comments: [],
+ creationDate: Date.now(),
+ imageId: await postImg(img),
+ fileType: getImgType(img),
+ }
return t;
}
export async function processCommentOut(form: any): Comment {
+ let img = form.get('image');
+
+ let c: Comment = {};
+ c.id = uuidV4();
+ c.commentCreator = uuidV5(form.get('iphash'), uuidNIL);
+ c.commentText = form.get('CommentText');
+ c.creationDate = Date.now();
+ c.imageId = await postImg(img);
+ c.fileType = getImgType(img);
+
+ return c;
}
function replaceURLs(text: string, board: string, OPtid?: string): string {
diff --git a/src/pages/board/[board].astro b/src/pages/board/[board].astro
index a529d3c..eaea03e 100644
--- a/src/pages/board/[board].astro
+++ b/src/pages/board/[board].astro
@@ -1,8 +1,9 @@
---
-import Default from '../../layouts/Default.astro';
-import Thread from '../../components/Thread.svelte'
import '../../styles/thread.css'
-import '../../styles/blackbox.css?'
+import '../../styles/blackbox.css'
+
+import ThreadLayout from '../../layouts/ThreadLayout.astro';
+import Thread from '../../components/Thread.astro'
import type Thread from '../../models/Thread';
import { api } from '../../lib/api.ts';
@@ -18,8 +19,11 @@ for(let thread of threads)
await processThreadIn(board, thread);
---
-<Default>
- <h1><a href="/boards"> {board} </a></h1>
+<ThreadLayout>
+ <h1 style="text-align:center">
+ <a href=`/boards`>{board}</a>
+ </h1>
+
<div class="blackbox">
<button style="left: 50%; position: relative; transform: translate(-50%, 0);" onclick=`window.location='/create/${board}'`>Create Thread</button>
</div>
@@ -27,10 +31,4 @@ for(let thread of threads)
{threads.map((thread) => (
<Thread thread={thread} board={board} />
))}
-</Default>
-
-<style is:inline>
- :root {
- --wdt: 600px;
- }
-</style>
+</ThreadLayout>
diff --git a/src/pages/board/[board]/[tid].astro b/src/pages/board/[board]/[tid].astro
index 4aa34ef..e9b345a 100644
--- a/src/pages/board/[board]/[tid].astro
+++ b/src/pages/board/[board]/[tid].astro
@@ -1,14 +1,16 @@
---
-import Default from '../../../layouts/Default.astro';
-import Thread from '../../../components/Thread.svelte'
-import '../../../styles/thread.css'
-import type Thread from '../../../models/Thread';
+import '../../../styles/thread.css';
+import '../../../styles/blackbox.css';
+
+import ThreadLayout from '../../../layouts/ThreadLayout.astro';
+import Thread from '../../../components/Thread.astro'
+import type Thread from '../../../models/Thread';;
import { api } from '../../../lib/api';
import { processThreadIn } from '../../../lib/thread';
-const { board } = Astro.params;
-const data = await api('get', `thread/${board}/${Astro.params.tid}`);
+const { board, tid } = Astro.params;
+const data = await api('get', `thread/${board}/${tid}`);
if(data.status === 404) return Astro.redirect('/404');
@@ -16,6 +18,16 @@ const thread: Thread = await data.json();
await processThreadIn(board, thread, true);
---
-<Default>
+<ThreadLayout>
+ <h1 style="text-align:center">
+ <a href=`/board/${board}`>{board}</a>
+ </h1>
+
+ <div class="blackbox">
+ <button style="left: 50%; position: relative; transform: translate(-50%, 0);" onclick=`window.open('/create/${board}/${tid}','popUpWindow','height=500,width=600')`>
+ Create Comment
+ </button>
+ </div>
+
<Thread thread={thread} board={board} comments=true />
-</Default> \ No newline at end of file
+</ThreadLayout> \ No newline at end of file
diff --git a/src/pages/create/[board].astro b/src/pages/create/[board].astro
index 9c2308f..152277c 100644
--- a/src/pages/create/[board].astro
+++ b/src/pages/create/[board].astro
@@ -1,4 +1,6 @@
---
+import '../../styles/blackbox.css';
+
import Default from '../../layouts/Default.astro';
import Form from '../../components/Form.astro';
@@ -8,7 +10,7 @@ const { board } = Astro.params;
<Default>
<h1>{board}</h1>
- <Form board={board} tid="niggers">
+ <Form board={board} tid="">
<form id="form" method="post" action="/create/thread" onsubmit="document.getElementById('submit-button').disabled = true">
<textarea name="ThreadName" placeholder="Thread Name" style="height: 1.5rem; width: 350px;"></textarea> <br>
<textarea name="ThreadText" placeholder="Thread Contents" style="height: 150px; width: 350px;"></textarea>
@@ -21,5 +23,6 @@ const { board } = Astro.params;
<style>
:root {
--wdt: 360px;
+ --ml: 0px;
}
</style>
diff --git a/src/pages/create/[board]/[tid].astro b/src/pages/create/[board]/[tid].astro
new file mode 100644
index 0000000..ccc95ca
--- /dev/null
+++ b/src/pages/create/[board]/[tid].astro
@@ -0,0 +1,27 @@
+---
+import '../../../styles/blackbox.css';
+
+import Default from '../../../layouts/Default.astro';
+import Form from '../../../components/Form.astro';
+
+const { board, tid } = Astro.params;
+---
+
+<Default>
+ <h1>Comment</h1>
+
+ <Form board={board} tid={tid}>
+ <form id="form" method="post" action="/create/comment" onsubmit="document.getElementById('submit-button').disabled = true">
+ <textarea name="CommentText" placeholder="Comment Contents" style="height: 150px; width: 350px;"></textarea>
+ <br> <input id="submit-button" type="submit" value="Create Thread" />
+ <input id="image" type="file" accept=".png,.jpg,.gif,.bmp,.mp4" />
+ </form>
+ </Form>
+</Default>
+
+<style>
+ :root {
+ --wdt: 360px;
+ --ml: 0px;
+ }
+</style>
diff --git a/src/pages/create/comment.ts b/src/pages/create/comment.ts
new file mode 100644
index 0000000..f8d4c82
--- /dev/null
+++ b/src/pages/create/comment.ts
@@ -0,0 +1,17 @@
+import { api } from '../../lib/api';
+import { processCommentOut } from '../../lib/thread';
+import Comment from '../../models/Thread';
+
+export async function post({ request }) {
+ const form = await request.formData();
+
+ let c: Comment = await processCommentOut(form);
+
+ console.log(c);
+
+ await api('post', `comment/${form.get('board')}/${form.get('tid')}`, JSON.stringify(c));
+
+ return new Response('close', {
+ status: 200
+ });
+}
diff --git a/src/pages/create/thread.ts b/src/pages/create/thread.ts
index 0a0b7d1..b3a02be 100644
--- a/src/pages/create/thread.ts
+++ b/src/pages/create/thread.ts
@@ -1,13 +1,14 @@
import { api } from '../../lib/api';
import { processThreadOut } from '../../lib/thread';
+import Thread from '../../models/Thread';
export async function post({ request }) {
const form = await request.formData();
- console.log(form);
-
let t: Thread = await processThreadOut(form);
+ console.log(t);
+
await api('post', `thread/${form.get('board')}`, JSON.stringify(t));
return new Response(t.id, {
diff --git a/src/styles/blackbox.css b/src/styles/blackbox.css
index 4a0e63f..4ddcb85 100644
--- a/src/styles/blackbox.css
+++ b/src/styles/blackbox.css
@@ -1,8 +1,8 @@
.blackbox {
- width: var(--wdt);
+ max-width: var(--wdt, 100%);
border: 10px solid black;
padding: 10px;
margin: 10px;
- margin-left: 0px;
+ margin-left: var(--ml, 10px);
background-color: white;
}
diff --git a/src/styles/thread.css b/src/styles/thread.css
index 14997de..2667d6f 100644
--- a/src/styles/thread.css
+++ b/src/styles/thread.css
@@ -1,13 +1,11 @@
.threadbox {
- width: 600px;
border: 10px solid green;
padding: 10px;
margin: 10px;
- margin-left: 0px;
background-color: white;
}
.commentbox {
- width: 500px;
+ max-width: 90%;
border: 5px solid green;
padding: 10px;
margin: 10px;