From 8b98f268510df512ac35a21e2c39dde64c6c0cab Mon Sep 17 00:00:00 2001 From: skuqre <74248935+skuqre@users.noreply.github.com> Date: Mon, 11 Dec 2023 20:56:43 +0800 Subject: [PATCH] qol --- package-lock.json | 247 ++++++++++++++++++++++++++++ package.json | 2 + public/images/blabla/pfp/nochat.png | Bin 0 -> 7328 bytes src/components/BlablaInput.astro | 85 ++++++++-- src/pages/credits.md | 2 +- src/pages/update-log.md | 19 +++ src/scripts/blabla.js | 72 +++++++- 7 files changed, 404 insertions(+), 23 deletions(-) create mode 100644 public/images/blabla/pfp/nochat.png diff --git a/package-lock.json b/package-lock.json index 07ae5ed..b8901d8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8,7 +8,9 @@ "version": "0.0.1", "dependencies": { "astro": "^3.6.4", + "boxicons": "^2.1.4", "buffer": "^6.0.3", + "fuzzysort": "^2.0.4", "gifencoder": "^2.0.1", "h264-mp4-encoder": "^1.0.12" } @@ -375,6 +377,17 @@ "@babel/core": "^7.0.0-0" } }, + "node_modules/@babel/runtime": { + "version": "7.23.5", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.23.5.tgz", + "integrity": "sha512-NdUTHcPe4C99WxPub+K9l9tK5/lV4UXIoaHSYgzco9BCyjKAAwzdBI+wWtYqHt7LJdbo74ZjRPJgzVweq1sz0w==", + "dependencies": { + "regenerator-runtime": "^0.14.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, "node_modules/@babel/template": { "version": "7.22.15", "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.22.15.tgz", @@ -949,6 +962,11 @@ "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.2.0.tgz", "integrity": "sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==" }, + "node_modules/@webcomponents/webcomponentsjs": { + "version": "2.8.0", + "resolved": "https://registry.npmjs.org/@webcomponents/webcomponentsjs/-/webcomponentsjs-2.8.0.tgz", + "integrity": "sha512-loGD63sacRzOzSJgQnB9ZAhaQGkN7wl2Zuw7tsphI5Isa0irijrRo6EnJii/GgjGefIFO8AIO7UivzRhFaEk9w==" + }, "node_modules/abbrev": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", @@ -1271,6 +1289,19 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/boxicons": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/boxicons/-/boxicons-2.1.4.tgz", + "integrity": "sha512-BvJNfYfnE4g9WQ7GL91fftxMOTwAleWlPFwvQJPYb/Ju7aLjlQ/Eu55AH9JLNk/OR82z+ZSq4TbKzbV/e5Rr0A==", + "dependencies": { + "@webcomponents/webcomponentsjs": "^2.0.2", + "prop-types": "^15.6.0", + "react": "^16.0.0", + "react-dom": "^16.0.0", + "react-interactive": "^0.8.1", + "react-router-dom": "^4.2.2" + } + }, "node_modules/brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", @@ -1703,6 +1734,22 @@ "node": ">=6" } }, + "node_modules/detect-hover": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/detect-hover/-/detect-hover-1.0.3.tgz", + "integrity": "sha512-HtLoY+tClgYucJNiovNICGWFp9nOGVmHY44s7L62iPqORXM9vujeWFaVcqtA7XRvp/2Y+4RBUfHbDKFGN+xxZQ==" + }, + "node_modules/detect-it": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/detect-it/-/detect-it-3.0.7.tgz", + "integrity": "sha512-RxpgcdbatUX6epJE09K16iJqF7x6iEcEdoL18FR2zpBO4JhnL7aMOAUoUEyexdtbWOSfTmoDWmeD6mwRBQyRXg==", + "dependencies": { + "detect-hover": "^1.0.3", + "detect-passive-events": "^1.0.5", + "detect-pointer": "^1.0.3", + "detect-touch-events": "^2.0.2" + } + }, "node_modules/detect-libc": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.0.2.tgz", @@ -1711,6 +1758,21 @@ "node": ">=8" } }, + "node_modules/detect-passive-events": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/detect-passive-events/-/detect-passive-events-1.0.5.tgz", + "integrity": "sha512-foW7Q35wwOCxVzW0xLf5XeB5Fhe7oyRgvkBYdiP9IWgLMzjqUqTvsJv9ymuEWGjY6AoDXD3OC294+Z9iuOw0QA==" + }, + "node_modules/detect-pointer": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/detect-pointer/-/detect-pointer-1.0.3.tgz", + "integrity": "sha512-d0o/Puo3fiGSCXy6H039h9Kwz+mmYCGKZ/qtPFnpN3WfsumjC1C9b5KKvRu+aYnfdI8peqN/iAe7dPd85qIt2g==" + }, + "node_modules/detect-touch-events": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/detect-touch-events/-/detect-touch-events-2.0.2.tgz", + "integrity": "sha512-g8GWBkJLiIDRJfRXEdrd1wMXpNyGId2DkbfuwFahSb4OCvn717hyRJtAcEDISfp3zkwEhZ4Y4woHPA6DeyB3Fw==" + }, "node_modules/deterministic-object-hash": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/deterministic-object-hash/-/deterministic-object-hash-1.3.1.tgz", @@ -2041,6 +2103,11 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/fuzzysort": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/fuzzysort/-/fuzzysort-2.0.4.tgz", + "integrity": "sha512-Api1mJL+Ad7W7vnDZnWq5pGaXJjyencT+iKGia2PlHUcSsSzWwIQ3S1isiMpwpavjYtGd2FzhUIhnnhOULZgDw==" + }, "node_modules/gauge": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/gauge/-/gauge-3.0.2.tgz", @@ -2372,6 +2439,24 @@ "url": "https://opencollective.com/unified" } }, + "node_modules/history": { + "version": "4.10.1", + "resolved": "https://registry.npmjs.org/history/-/history-4.10.1.tgz", + "integrity": "sha512-36nwAD620w12kuzPAsyINPWJqlNbij+hpK1k9XRloDtym8mxzGYl2c17LnV6IAGB2Dmg4tEa7G7DlawS0+qjew==", + "dependencies": { + "@babel/runtime": "^7.1.2", + "loose-envify": "^1.2.0", + "resolve-pathname": "^3.0.0", + "tiny-invariant": "^1.0.2", + "tiny-warning": "^1.0.0", + "value-equal": "^1.0.1" + } + }, + "node_modules/hoist-non-react-statics": { + "version": "2.5.5", + "resolved": "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-2.5.5.tgz", + "integrity": "sha512-rqcy4pJo55FTTLWt+bU8ukscqHeE/e9KWvsOW2b/a3afxQZhwkQdT1rPPCJ0rYXdj4vNcasY8zHTH+jF/qStxw==" + }, "node_modules/html-escaper": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-3.0.3.tgz", @@ -2470,6 +2555,14 @@ "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==", "optional": true }, + "node_modules/invariant": { + "version": "2.2.4", + "resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.4.tgz", + "integrity": "sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==", + "dependencies": { + "loose-envify": "^1.0.0" + } + }, "node_modules/is-arrayish": { "version": "0.3.2", "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.3.2.tgz", @@ -2652,6 +2745,11 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha512-D2S+3GLxWH+uhrNEcoh/fnmYeP8E8/zHl644d/jdA0g2uyXvy3sb0qxotE+ne0LtccHknQzWwZEzhak7oJ0COQ==" + }, "node_modules/isexe": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", @@ -2799,6 +2897,17 @@ "url": "https://github.com/sponsors/wooorm" } }, + "node_modules/loose-envify": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", + "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", + "dependencies": { + "js-tokens": "^3.0.0 || ^4.0.0" + }, + "bin": { + "loose-envify": "cli.js" + } + }, "node_modules/lru-cache": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", @@ -4626,6 +4735,16 @@ "node": ">=6" } }, + "node_modules/prop-types": { + "version": "15.8.1", + "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.8.1.tgz", + "integrity": "sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==", + "dependencies": { + "loose-envify": "^1.4.0", + "object-assign": "^4.1.1", + "react-is": "^16.13.1" + } + }, "node_modules/property-information": { "version": "6.4.0", "resolved": "https://registry.npmjs.org/property-information/-/property-information-6.4.0.tgz", @@ -4685,6 +4804,92 @@ "rc": "cli.js" } }, + "node_modules/react": { + "version": "16.14.0", + "resolved": "https://registry.npmjs.org/react/-/react-16.14.0.tgz", + "integrity": "sha512-0X2CImDkJGApiAlcf0ODKIneSwBPhqJawOa5wCtKbu7ZECrmS26NvtSILynQ66cgkT/RJ4LidJOc3bUESwmU8g==", + "dependencies": { + "loose-envify": "^1.1.0", + "object-assign": "^4.1.1", + "prop-types": "^15.6.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/react-dom": { + "version": "16.14.0", + "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-16.14.0.tgz", + "integrity": "sha512-1gCeQXDLoIqMgqD3IO2Ah9bnf0w9kzhwN5q4FGnHZ67hBm9yePzB5JJAIQCc8x3pFnNlwFq4RidZggNAAkzWWw==", + "dependencies": { + "loose-envify": "^1.1.0", + "object-assign": "^4.1.1", + "prop-types": "^15.6.2", + "scheduler": "^0.19.1" + }, + "peerDependencies": { + "react": "^16.14.0" + } + }, + "node_modules/react-interactive": { + "version": "0.8.3", + "resolved": "https://registry.npmjs.org/react-interactive/-/react-interactive-0.8.3.tgz", + "integrity": "sha512-mmRvA9aKP7zu9kVfP1AX1egX8tFlnE3DDXq92z0JTZezfOpmeQBzr77O1+mTV54OOmn+M2t6c5kFD5VnuFoM7A==", + "dependencies": { + "detect-it": "^3.0.3", + "object-assign": "^4.1.1", + "prop-types": "^15.6.0" + }, + "peerDependencies": { + "react": ">=15" + } + }, + "node_modules/react-is": { + "version": "16.13.1", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", + "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==" + }, + "node_modules/react-router": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/react-router/-/react-router-4.3.1.tgz", + "integrity": "sha512-yrvL8AogDh2X42Dt9iknk4wF4V8bWREPirFfS9gLU1huk6qK41sg7Z/1S81jjTrGHxa3B8R3J6xIkDAA6CVarg==", + "dependencies": { + "history": "^4.7.2", + "hoist-non-react-statics": "^2.5.0", + "invariant": "^2.2.4", + "loose-envify": "^1.3.1", + "path-to-regexp": "^1.7.0", + "prop-types": "^15.6.1", + "warning": "^4.0.1" + }, + "peerDependencies": { + "react": ">=15" + } + }, + "node_modules/react-router-dom": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-4.3.1.tgz", + "integrity": "sha512-c/MlywfxDdCp7EnB7YfPMOfMD3tOtIjrQlj/CKfNMBxdmpJP8xcz5P/UAFn3JbnQCNUxsHyVVqllF9LhgVyFCA==", + "dependencies": { + "history": "^4.7.2", + "invariant": "^2.2.4", + "loose-envify": "^1.3.1", + "prop-types": "^15.6.1", + "react-router": "^4.3.1", + "warning": "^4.0.1" + }, + "peerDependencies": { + "react": ">=15" + } + }, + "node_modules/react-router/node_modules/path-to-regexp": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-1.8.0.tgz", + "integrity": "sha512-n43JRhlUKUAlibEJhPeir1ncUID16QnEjNpwzNdO3Lm4ywrBpBZ5oLD0I6br9evr1Y9JTqwRtAh7JLoOzAQdVA==", + "dependencies": { + "isarray": "0.0.1" + } + }, "node_modules/readable-stream": { "version": "3.6.2", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", @@ -4709,6 +4914,11 @@ "node": ">=8.10.0" } }, + "node_modules/regenerator-runtime": { + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.14.0.tgz", + "integrity": "sha512-srw17NI0TUWHuGa5CFGGmhfNIeja30WMBfbslPNhf6JrqQlLN5gcrvig1oqPxiVaXb0oW0XRKtH6Nngs5lKCIA==" + }, "node_modules/rehype": { "version": "12.0.1", "resolved": "https://registry.npmjs.org/rehype/-/rehype-12.0.1.tgz", @@ -4879,6 +5089,11 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/resolve-pathname": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/resolve-pathname/-/resolve-pathname-3.0.0.tgz", + "integrity": "sha512-C7rARubxI8bXFNB/hqcp/4iUeIXJhJZvFPFPiSPRnhU5UPxzMFIl+2E6yY6c4k9giDJAhtV+enfA+G89N6Csng==" + }, "node_modules/restore-cursor": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-4.0.0.tgz", @@ -5080,6 +5295,15 @@ "resolved": "https://registry.npmjs.org/sax/-/sax-1.3.0.tgz", "integrity": "sha512-0s+oAmw9zLl1V1cS9BtZN7JAd0cW5e0QH4W3LWEK6a4LaLEA2OTpGYWDY+6XasBLtz6wkm3u1xRw95mRuJ59WA==" }, + "node_modules/scheduler": { + "version": "0.19.1", + "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.19.1.tgz", + "integrity": "sha512-n/zwRWRYSUj0/3g/otKDRPMh6qv2SYMWNq85IEa8iZyAv8od9zDYpGSnpBEjNgcMNq6Scbu5KfIPxNF72R/2EA==", + "dependencies": { + "loose-envify": "^1.1.0", + "object-assign": "^4.1.1" + } + }, "node_modules/section-matter": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/section-matter/-/section-matter-1.0.0.tgz", @@ -5865,6 +6089,16 @@ "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" }, + "node_modules/tiny-invariant": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/tiny-invariant/-/tiny-invariant-1.3.1.tgz", + "integrity": "sha512-AD5ih2NlSssTCwsMznbvwMZpJ1cbhkGd2uueNxzv2jDlEeZdU04JQfRnggJQ8DrcVBGjAsCKwFBbDlVNtEMlzw==" + }, + "node_modules/tiny-warning": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/tiny-warning/-/tiny-warning-1.0.3.tgz", + "integrity": "sha512-lBN9zLN/oAf68o3zNXYrdCt1kP8WsiGW8Oo2ka41b2IM5JL/S1CTyX1rW0mb/zSuJun0ZUrDxx4sqvYS2FWzPA==" + }, "node_modules/to-fast-properties": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", @@ -6164,6 +6398,11 @@ "node": ">=8" } }, + "node_modules/value-equal": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/value-equal/-/value-equal-1.0.1.tgz", + "integrity": "sha512-NOJ6JZCAWr0zlxZt+xqCHNTEKOsrks2HQd4MqhP1qy4z1SkbEP467eNx6TgDKXMvUOb+OENfJCZwM+16n7fRfw==" + }, "node_modules/vfile": { "version": "5.3.7", "resolved": "https://registry.npmjs.org/vfile/-/vfile-5.3.7.tgz", @@ -6653,6 +6892,14 @@ } } }, + "node_modules/warning": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/warning/-/warning-4.0.3.tgz", + "integrity": "sha512-rpJyN222KWIvHJ/F53XSZv0Zl/accqHR8et1kpaMTD/fLCRxtV8iX8czMzY7sVZupTI3zcUTg8eycS2kNF9l6w==", + "dependencies": { + "loose-envify": "^1.0.0" + } + }, "node_modules/web-namespaces": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/web-namespaces/-/web-namespaces-2.0.1.tgz", diff --git a/package.json b/package.json index 75d35ca..2d2783c 100644 --- a/package.json +++ b/package.json @@ -11,7 +11,9 @@ }, "dependencies": { "astro": "^3.6.4", + "boxicons": "^2.1.4", "buffer": "^6.0.3", + "fuzzysort": "^2.0.4", "gifencoder": "^2.0.1", "h264-mp4-encoder": "^1.0.12" } diff --git a/public/images/blabla/pfp/nochat.png b/public/images/blabla/pfp/nochat.png new file mode 100644 index 0000000000000000000000000000000000000000..29615b38e4f6919cafcde79ee8e7e92c2326b14e GIT binary patch literal 7328 zcmV;R9AD#!P) zaB^>EX>4U6ba`-PAZ2)IW&i+q+Rd41aveDig#Ysta|EscaU8A@bAvhld?+oJm+7`; z$3*LeT(3(kE0f^D-TiXr;G^rPLVV=)P;WpR8PSUb#H?deLlol~_`#q0~~-&04JN(n~HYpHjG+-}jQ9b?sSh zB|qj)jLeD25>Gsz@b=|*KR=x4-sK@moc=9V>?>zaL-HsV|CdoDB;7Y0wI{%DpKpIi zER$45d6+u~9C5x(F znzr7o4JlHkiHM5V;?Sa1n~JJ-H66Y5+FO^dy?5&)Shhl~HWO3pW;O$%qTX)~K$4Lh$oqF1lqo*G`;{vr?ZoT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+i@mGN_w02~36nK&Z2Qn+m%^o^70^4PDMI_AXFEPZM+?+xfc7 zy{*pKuz?2*VN$xZwA$-_%0tIVFFSEVw>0TpCed{OxSXY@bL?93Z?5*Vtj=BpwAW35 z*0%}p>JtnCJZ#m>mgpe!x~3hxYm#5S2B<0Ke^C7aKG5j0T?U)1vn1 zY0kkW58&EIukIkr?q9bLpzZgGivRB;XW-KJuv2+}akH&WXt!2(4fUx%z=5Q?8w16# zN79(pE_K|P?|N)bBLMK7i?4d_psk8_J?-3Qj>G5k`d;(MoV$Ui8?~hoM1$kgEoz2f zCZUf`VCX(NZEqB@>8#!=0J^Y~rio@sHrujv3n1{S$^Hi3A literal 0 HcmV?d00001 diff --git a/src/components/BlablaInput.astro b/src/components/BlablaInput.astro index 9f56e70..2d000a9 100644 --- a/src/components/BlablaInput.astro +++ b/src/components/BlablaInput.astro @@ -2,6 +2,9 @@ --- + + +
- + @@ -96,11 +103,20 @@ - + @@ -124,6 +140,15 @@ + @@ -148,11 +173,20 @@ - +
@@ -39,21 +42,25 @@ /> - + +
+ + + + Image preview (if empty, upload one!)
+ + + + Image preview (if empty, upload one!)
+ +
+ + +
@@ -218,7 +252,7 @@ outline: revert; } - input#color, input#color-edit { + input#color, input#color-edit, input#com-color, input#chat-theme { width: 40px; height: 90px; @@ -227,7 +261,7 @@ padding: 0px 2px; } - button#add, button#edit, button#arrow-toggle { + button#add, button#edit, button#arrow-toggle, button#set-com, button#set-oth { width: 90px; height: 40px; background-color: var(--darker); @@ -244,7 +278,7 @@ margin-right: 4px; } - button#add:hover, button#edit:hover, button#arrow-toggle:hover { + button#add:hover, button#edit:hover, button#arrow-toggle:hover, button#set-com:hover, button#set-oth:hover { background-color: #f4d2594b; color: white; text-decoration: none; @@ -254,6 +288,10 @@ transition-timing-function: ease-in-out; } + button#set-com, button#set-oth { + font-size: 24px; + } + input[type="file"] { display: none; } @@ -274,7 +312,7 @@ label.whole-row { width: calc(100% - 8px); - height: 30px; + height: 40px; background-color: var(--darker); border-radius: 4px; color: lightgray; @@ -299,13 +337,15 @@ transition-property: color, background-color, box-shadow; transition-duration: 0.1s; transition-timing-function: ease-in-out; + + height: 40px; } #del-late { user-select: none; } - #del-spec { + #del-spec, #res-color, #char-pre-img, #char-pre-edit { height: 40px; user-select: none; } @@ -315,4 +355,19 @@ padding-left: 8px; padding-top: 8px; } + + .image-preview { + width: 90px; + height: 90px; + border-radius: 4px; + background-color: var(--darker); + } + + .wholerow { + vertical-align: top; + } + + td.imgpre { + vertical-align: top; + } diff --git a/src/pages/credits.md b/src/pages/credits.md index 0d4be86..84786ab 100644 --- a/src/pages/credits.md +++ b/src/pages/credits.md @@ -10,7 +10,7 @@ embeddesc: The site's credits! | | | | --- | --- | | **skuqre** | Programming, some research, and all that jazz. | -| [**NIKKE-DB**](https://nikke-db.pages.dev) | This site uses some assets from NIKKE-DB.
Their work has been really helpful for the dialogue generator! | +| [**NIKKE-DB**](https://nikke-db.pages.dev) | This site uses some assets from NIKKE-DB.
Their work has been really helpful for the dialogue generator!
This site also uses their GitHub Database for character profile pictures for the BlaBla generator!!! | | [**GitHub Pages**](https://pages.github.com) | Site hosting. Where else can I tend to? | | [**Astro**](https://astro.build) | For being dope to work with. | diff --git a/src/pages/update-log.md b/src/pages/update-log.md index f744f9c..327d05b 100644 --- a/src/pages/update-log.md +++ b/src/pages/update-log.md @@ -9,6 +9,25 @@ embeddesc: the update log ---
+## qol `Dec 11, 2023` + +**blabla gen** +- added a way to quickly switch between "commander" and other chatters (it's the two buttons btw) +- added an image preview +- added a way to quickly get a nikke's pfp easily. SHOUTOUTS TO [NIKKE-DB](https://nikke-db.pages.dev) & [NIKKE.GG](https://nikke.gg) Y'ALL ROCK +- [the reddit post has reached a hefty ton of attraction. thank you all.](https://www.reddit.com/r/NikkeMobile/comments/18f3ned/nikke_font_generator_blabla_update/) + +HELLOO!!! the post got a lot of stuff goin on in it so im really happy rn...
NIKKE-DB is a glorious life-saver. some sort of personal blogpost may elaborate on this. + +some qol stuff to feast on to, as this week am busy! + +enjoy!! + +
+ +--- +
+ ## Blabla Generator (BETA) `Dec 10, 2023` **blabla generator!!** diff --git a/src/scripts/blabla.js b/src/scripts/blabla.js index d9022a5..38620ef 100644 --- a/src/scripts/blabla.js +++ b/src/scripts/blabla.js @@ -1,4 +1,5 @@ import { draw9slice } from "./util.js"; +import fuzzysort from "fuzzysort"; const canvas = document.getElementById("blabla-canvas"); const ctx = canvas.getContext("2d", { willReadFrequently: true }); @@ -38,6 +39,14 @@ var chats = [ } ]; +const nikkepfps = {} +const response = await fetch('https://api.dotgg.gg/nikke/characters/'); +response.json().then((e) => { + for (let i = 0; i < e.length; i++) { + nikkepfps[e[i].name.toLowerCase()] = e[i].img; + } +}); + let top = new Image(); top.crossOrigin = "anonymous" top.src = `/nikke-font-generator/images/blabla/top.png`; @@ -146,7 +155,7 @@ function generateBlabla() { let width = ctx.measureText(item.message).width > 418 ? 418 : ctx.measureText(item.message).width; let actualWidth = width + 22 * 2 > 418 ? 418 : width + 22 * 2; - let lines = getLinesForParagraphs(ctx, item.message, actualWidth - 22*2); + let lines = getLinesForParagraphs(ctx, item.message, actualWidth); let height = lines.length > 1 ? 19 + ((31) * (lines.length + 1)) : 81; let ass = curSpeaker.toLowerCase() != 'commander' ? 37 : 34; @@ -160,10 +169,10 @@ function generateBlabla() { if (lines.length > 1) { for (let j = 0; j < lines.length; j++) { - ctx.fillText(lines[j], curx - 6 + 21, cury + 19 + ((31) * j), actualWidth); + ctx.fillText(lines[j].trim(), curx - 6 + 21, cury + 19 + ((31) * j), actualWidth); } } else { - ctx.fillText(item.message, curx - 6 + 21, cury + 19, actualWidth); + ctx.fillText(item.message.trim(), curx - 6 + 21, cury + 19, actualWidth); } if (switchedSpeakers) { @@ -193,10 +202,10 @@ function generateBlabla() { if (lines.length > 1) { for (let j = 0; j < lines.length; j++) { - ctx.fillText(lines[j], curx - actualWidth + 17, cury + 14 + ((31) * j), actualWidth - 22 * 2); + ctx.fillText(lines[j].trim(), curx - actualWidth + 17, cury + 14 + ((31) * j), actualWidth - 22 * 2); } } else { - ctx.fillText(item.message, curx - actualWidth + 17, cury + 14, actualWidth - 22 * 2); + ctx.fillText(item.message.trim(), curx - actualWidth + 17, cury + 14, actualWidth - 22 * 2); } } @@ -234,6 +243,7 @@ document.getElementById("char-img-up").onchange = (e) => { const filer = new FileReader(); filer.onload = (e) => { currentImage = e.target.result.toString(); + document.getElementById("pfp-preview").src = currentImage; }; if (fileList.length > 0) { filer.readAsDataURL(fileList[0]); @@ -262,7 +272,7 @@ document.getElementById("del-spec").onclick = (e) => { } document.getElementById("res-color").onclick = (e) => { - document.getElementById("color").value = '#fea50a'; + document.getElementById("color").value = document.getElementById("com-color").value; generateBlabla(); } @@ -273,6 +283,16 @@ document.getElementById("arrow-toggle").onclick = (e) => { generateBlabla(); } +document.getElementById("set-oth").onclick = (e) => { + document.getElementById("charname").value = ''; + document.getElementById("color").value = '#ffffff'; +} + +document.getElementById("set-com").onclick = (e) => { + document.getElementById("charname").value = 'Commander'; + document.getElementById("color").value = document.getElementById("com-color").value; +} + document.getElementById("message-index-edit").onclick = (e) => { let item = chats[parseInt(document.getElementById("message-index-edit").value)]; document.getElementById("message-index-edit").setAttribute('max', chats.length - 1); @@ -280,6 +300,8 @@ document.getElementById("message-index-edit").onclick = (e) => { document.getElementById("charname-edit").value = item.name; document.getElementById("chatter-edit").value = item.message; document.getElementById("color-edit").value = item.color; + + document.getElementById("pfp-preview-edit").src = item.image.length > 0 ? item.image : '/nikke-font-generator/images/blabla/pfp/nochat.png'; } document.getElementById("charname-edit").oninput = (e) => { @@ -302,8 +324,43 @@ document.getElementById("ypos").oninput = (e) => { generateBlabla(); } +document.getElementById("char-pres-up").oninput = (e) => { + currentImage = ''; + if (Object.keys(nikkepfps).length > 0) { + if (document.getElementById("char-pres-up").value.trim().length > 0) { + const results = fuzzysort.go(document.getElementById("char-pres-up").value, Object.keys(nikkepfps)); + if (results.length > 0) { + currentImage = `https://raw.githubusercontent.com/Nikke-db/Nikke-db.github.io/main/images/sprite/${nikkepfps[results[0].target]}.png`; + document.getElementById("pfp-preview").src = currentImage; + } else { + document.getElementById("pfp-preview").src = '/nikke-font-generator/images/blabla/pfp/nochat.png'; + } + } else { + document.getElementById("pfp-preview").src = '/nikke-font-generator/images/blabla/pfp/nochat.png'; + } + } +} + +document.getElementById("char-pres-edit").oninput = (e) => { + currentImage = ''; + if (Object.keys(nikkepfps).length > 0) { + if (document.getElementById("char-pres-edit").value.trim().length > 0) { + const results = fuzzysort.go(document.getElementById("char-pres-edit").value, Object.keys(nikkepfps)); + if (results.length > 0) { + chats[parseInt(document.getElementById("message-index-edit").value)].image = `https://raw.githubusercontent.com/Nikke-db/Nikke-db.github.io/main/images/sprite/${nikkepfps[results[0].target]}.png`; + document.getElementById("pfp-preview-edit").src = chats[parseInt(document.getElementById("message-index-edit").value)].image; + } else { + document.getElementById("pfp-preview-edit").src = '/nikke-font-generator/images/blabla/pfp/nochat.png'; + } + } else { + document.getElementById("pfp-preview-edit").src = '/nikke-font-generator/images/blabla/pfp/nochat.png'; + } + + generateBlabla(); + } +} + document.getElementById("color-edit").onchange = (e) => { - console.log(chats[parseInt(document.getElementById("message-index-edit").value)].color) chats[parseInt(document.getElementById("message-index-edit").value)].color = document.getElementById("color-edit").value generateBlabla(); } @@ -314,6 +371,7 @@ document.getElementById("char-img-edit").onchange = (e) => { const filer = new FileReader(); filer.onload = (e) => { chats[parseInt(document.getElementById("message-index-edit").value)].image = e.target.result.toString(); + document.getElementById('pfp-preview-edit').src = e.target.result.toString(); generateBlabla(); }; if (fileList.length > 0) {