url scheme done, switch between apps and orgs mostly done

This commit is contained in:
metacryst
2026-01-12 14:10:17 -06:00
parent 434ecac47a
commit 419c8b1151
20 changed files with 406 additions and 215 deletions

View File

Before

Width:  |  Height:  |  Size: 554 KiB

After

Width:  |  Height:  |  Size: 554 KiB

38
db/images/hyperia.svg Normal file
View File

@@ -0,0 +1,38 @@
<svg width="64" height="90" viewBox="0 0 64 90" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M26.1239 0.570931C29.0573 0.570676 32.396 0.410984 40.1415 0.571653C41.7911 0.571653 41.0611 0.571461 44.5585 0.570931L57.647 0.569493C58.7578 0.569493 62.1339 0.581774 63.09 0.569493H63.0944C63.3274 0.569493 63.4247 0.756732 63.4417 0.792724C63.4679 0.848215 63.4775 0.901709 63.4819 0.928461C63.4922 0.98942 63.4963 1.06338 63.4981 1.13729C63.5022 1.29126 63.4992 1.52411 63.494 1.83975C63.4837 2.47691 63.4631 3.48782 63.4631 4.99379V5.00422C63.3842 7.81995 63.4048 10.6396 63.4163 13.4676C63.4277 16.293 63.4295 19.1256 63.3127 21.9554C63.2297 23.9673 63.0649 28.3358 62.8249 32.7158C62.5856 37.0848 62.27 41.5003 61.8807 43.5896C58.5462 61.4885 50.205 73.5428 40.9305 81.7045C40.0346 82.4931 35.2042 87.0623 32.4118 88.9238L32.2073 89.0603L32.0028 88.9238C30.6096 87.9951 28.4816 86.4219 26.5905 84.9689C24.7088 83.5233 23.0269 82.1702 22.545 81.6883C13.8332 72.9765 6.45283 61.6669 2.53599 43.6C2.16234 41.8763 1.70377 37.3097 1.32695 32.7694C0.94926 28.2189 0.650322 23.6484 0.599649 21.8967C0.429081 16 0.534793 10.0862 0.509995 4.20203C0.508074 3.74572 0.505323 2.95258 0.52656 2.27253C0.537126 1.9341 0.553891 1.61406 0.580927 1.37492C0.594126 1.25817 0.61158 1.14374 0.637093 1.05196C0.649057 1.00893 0.669254 0.946291 0.705504 0.886696C0.730903 0.844942 0.837591 0.684347 1.05295 0.684347C14.1416 0.684347 19.0709 0.656043 21.3958 0.62782C23.7111 0.599711 23.45 0.571163 26.1239 0.570931Z" fill="#AB2C19" stroke="#FFB700"/>
<path d="M39.2138 0.623047L24.6758 0.623065L24.8348 83.272L31.2869 88.2494L32.2087 88.9868L33.3147 88.2494L39.2138 83.272V0.623047Z" fill="#174228"/>
<path d="M24.6758 0.123065C24.6758 0.456398 24.6758 0.789731 24.6758 1.12306C27.9793 1.12306 31.2829 1.12306 34.5864 1.12305C36.1289 1.12305 37.6713 1.12305 39.2138 1.12305L38.7138 0.623047C38.7138 28.1727 38.7138 55.7224 38.7138 83.272L38.8914 82.8899C36.925 84.549 34.9587 86.2081 32.9923 87.8672L33.0374 87.8333C32.8248 87.9751 32.6122 88.1168 32.3996 88.2586C32.2435 88.3626 32.0874 88.4667 31.9313 88.5707L32.521 88.5963C32.2138 88.3505 31.9065 88.1047 31.5993 87.8589C30.3624 86.9047 29.1324 85.9558 27.9025 85.007C26.9817 84.2967 26.061 83.5864 25.1403 82.8762L25.3348 83.2711C25.2882 59.025 25.2415 34.7788 25.1949 10.5327C25.1885 7.2292 25.1821 3.92563 25.1758 0.622102C24.8424 0.622744 24.5091 0.623385 24.1758 0.624027C24.1821 3.92756 24.1885 7.23113 24.1949 10.5347C24.2415 34.7808 24.2882 59.0269 24.3349 83.273L24.3353 83.5182L24.5294 83.6679C25.4502 84.3782 26.3709 85.0885 27.2917 85.7988C28.5216 86.7476 29.7516 87.6964 30.9815 88.6453C31.2818 88.8856 31.5891 89.1314 31.8963 89.3772L32.1818 89.6056L32.486 89.4028C32.6421 89.2987 32.7982 89.1947 32.9543 89.0906C33.1669 88.9489 33.3795 88.8071 33.5921 88.6654L33.6372 88.6315C35.6035 86.9724 37.5699 85.3133 39.5362 83.6542L39.7138 83.5044V83.272C39.7138 55.7224 39.7138 28.1727 39.7138 0.623047V0.123046L39.2138 0.123047C37.6713 0.123049 36.1289 0.123051 34.5864 0.123053C31.2829 0.123057 27.9793 0.123061 24.6758 0.123065ZM24.6758 1.12306L24.6758 0.123065L24.1748 0.123065L24.1758 0.624027L25.1758 0.622102L24.6758 1.12306Z" fill="#170405"/>
<path d="M2.26625 41.793H62.0707L62.8081 34.6035L63.078 27.4141L0.965309 27.4141L1.42096 34.6035L2.26625 41.793Z" fill="#174228" stroke="#170405"/>
<path d="M27.0323 27.356C25.2747 27.1189 24.8903 26.2433 24.3044 25.605C23.7186 24.9666 23.4989 25.003 23.4989 24.0363C23.4989 23.179 24.6706 22.65 24.0664 21.9022C23.4622 21.1544 22.2997 21.8566 23.0595 22.6135C23.2151 22.7686 22.6567 23.0331 22.73 23.3614C22.4919 22.9966 22.1624 22.7047 22.1624 22.4494C22.1624 22.194 22.7116 21.6103 22.199 21.1361C21.6864 20.6619 20.6612 21.9569 21.0639 22.1028C21.4667 22.2488 21.5399 22.3035 21.5399 22.7048C21.5399 23.106 21.5033 23.3614 21.6681 23.6715C21.1555 23.2337 21.1921 23.2155 21.0273 22.8324C20.8625 22.4494 20.3499 22.3034 19.9105 22.9419C19.4711 23.5803 19.3247 23.7262 19.6542 24.018C19.9837 24.3099 20.3133 23.5985 20.771 24.2551C21.2287 24.9118 21.5948 26.0974 21.009 25.9515C20.4231 25.8056 20.057 26.0244 20.295 26.8088C20.533 27.5931 21.1921 27.3377 21.5399 27.1553C21.8878 26.9729 21.9061 26.9182 22.4553 27.1736C23.0046 27.4289 23.5721 27.9032 25.9887 31.9889C28.4054 36.0745 28.1491 27.6477 27.0323 27.356Z" fill="#FE9201"/>
<path d="M32.7512 39.8074C30.8471 41.4949 28.5313 38.8318 27.1763 39.7071C27.9361 39.9261 28.1523 40.5543 26.9743 40.5543C24.5535 40.5543 25.2784 41.6892 23.932 42.6437C24.7476 42.5534 24.9485 42.3395 25.1101 42.1408C25.3239 43.2543 24.4887 42.9663 24.8771 44.6169C25.1101 43.856 25.5114 43.8047 25.5114 43.8047C25.8351 46.6809 27.3308 47.0591 27.1296 48.7702C27.7122 48.2024 27.8028 49.6341 26.6766 49.8534C25.5503 50.0728 24.5017 50.047 23.8544 49.428C23.2071 48.8089 21.809 50.1244 22.767 50.2148C23.7249 50.3051 23.6602 50.6144 24.2169 50.6789C23.6214 50.8338 23.4337 51.2143 22.7993 50.7368C22.165 50.2597 21.3041 51.7496 22.0938 52.0073C22.8835 52.2654 23.1877 51.601 24.1069 51.4528C23.5178 51.8849 23.6473 52.3362 23.0842 52.2009C22.521 52.0656 21.7119 52.2717 22.3786 53.0264C23.0453 53.7807 23.5243 53.1812 23.8544 52.9361C24.1845 52.6909 24.3724 52.751 24.5535 52.4203C24.385 52.7609 23.4725 53.0843 24.0098 53.6067C24.547 54.1292 25.3108 54.1421 25.5438 53.2841C25.7768 52.4265 25.8545 51.917 27.0002 51.917C28.1459 51.917 29.0651 52.4203 29.0651 51.4849C29.0651 50.5499 29.268 50.2361 29.8355 50.5326C29.5655 49.8804 29.9133 49.5202 29.5929 49.1098C29.8401 49.2193 29.9774 49.4291 29.9774 49.4291C30.3985 48.5169 29.7211 47.4407 29.4648 47.2859C29.9133 46.9939 30.1697 47.0031 30.1697 47.0031C29.5106 46.839 28.7874 45.5803 28.6501 44.7504C28.5952 44.413 29.3824 44.7596 30.0049 45.2338C30.6273 45.7079 33.2271 46.3712 34.1072 45.0295C34.9876 43.6882 33.8545 39.0995 32.7512 39.8074Z" fill="#FE9201"/>
<path d="M37.8532 31.3344C36.48 34.1798 36.0223 34.6358 36.1138 36.1864C36.2054 37.7367 38.6404 38.9589 39.3726 40.8012C40.1048 42.6436 41.9907 43.0993 42.1006 40.8193C42.2104 38.5393 38.2924 37.208 38.2924 34.3806C38.2924 31.5534 40.9274 30.1779 41.4413 29.091C41.5505 29.7384 41.3565 29.9702 41.24 30.3313C41.24 30.3313 46.714 28.0148 46.0551 25.4248C46.4946 25.8352 46.6041 26.3551 46.6041 26.6105C46.815 26.346 48.0689 24.3487 46.641 22.689C45.213 21.0291 43.968 22.4519 43.968 23.4004C43.968 24.3489 45.6522 24.3853 45.6522 23.7652C45.6522 23.2933 45.0833 23.3307 44.9015 23.7652C44.5538 23.145 45.5792 22.1601 46.1831 22.8349C46.7874 23.5098 46.8058 24.8049 45.6157 24.8049C45.0342 24.8049 43.6251 24.7913 43.4736 22.9262C42.5747 24.7415 45.1397 24.9764 45.1397 26.2459C45.1397 27.7598 43.6019 28.2158 43.5104 26.8843C43.7847 27.1031 44.6272 26.5012 43.8581 25.6622C43.0894 24.8231 42.8173 24.3382 42.7229 23.7287C41.9074 24.8134 45.0663 27.2308 41.1121 29.0914C42.119 27.9787 42.3841 26.8289 42.2289 25.9905C42.2289 25.9905 41.7529 26.8478 41.167 26.7384C42.192 24.6225 41.4012 23.197 43.492 21.5399C42.6208 21.6038 42.1787 22.164 41.1302 21.777C41.9863 21.6178 42.7609 21.1082 43.5285 20.9015C41.2585 20.1536 40.8006 17.5635 43.3456 16.834C42.1739 18.2385 42.613 19.0958 43.071 19.6248C43.0894 18.4756 43.7847 18.4391 44.0594 18.4756C43.4736 19.2964 43.4186 19.8619 44.6637 20.4821C45.9088 21.1022 45.9818 21.3576 45.9818 21.3576C45.9818 21.3576 46.4762 20.555 46.9887 20.7739C46.8239 20.9928 46.5219 21.166 46.7324 21.5126C46.9429 21.8592 50.6686 26.3553 45.268 29.2922C46.1281 29.128 46.5676 29.4928 46.5676 29.4928C46.5676 29.4928 45.268 29.6387 44.389 30.2772C46.2015 30.6237 46.5779 30.2607 47.3732 29.6752C46.5529 31.6024 43.6933 30.9155 42.522 31.6451C44.0963 31.8458 44.4443 33.1408 45.744 32.5571C43.9333 35.0048 42.467 31.025 40.2335 32.5753C41.6983 32.5206 41.9177 33.0314 42.2657 33.1408C41.5881 33.4691 38.9335 32.8672 39.3365 34.8371C39.9223 34.2352 40.6181 34.1075 40.6181 34.1075C40.6181 34.1075 39.4464 35.3296 40.3069 36.1322C41.167 36.9347 42.7052 38.1021 42.8331 38.9593C43.1443 38.3576 43.5654 37.938 43.5654 37.938C43.5654 37.938 43.5654 39.3608 43.3641 41.1666C43.1628 42.9721 41.1213 45.015 38.9796 43.027C39.1352 42.3977 38.7871 41.3123 38.6043 41.1117C39.4279 42.5345 38.4395 44.2308 38.5678 45.1975C38.3296 44.9785 38.2382 44.3584 38.2382 44.3584C36.6577 46.607 38.706 46.9086 40.197 45.9268C40.0805 46.1849 39.6845 46.7479 40.1236 46.7114C40.5631 46.6749 41.6069 46.5654 41.6069 47.2766C41.6069 47.9881 39.4648 50.1041 39.4648 51.6363C39.4648 53.1686 40.0138 53.0772 39.5562 53.7522C39.0987 54.427 39.9773 55.3026 39.4648 55.6857C38.9519 56.0687 38 55.6307 38.1648 55.2842C38.3296 54.9376 38.5493 54.6095 38.4944 54.2994C38.4395 53.9893 38.7322 53.9344 38.6408 53.5878C38.3753 53.8525 38.2562 54.4815 37.9635 54.5365C37.6704 54.591 37.8901 55.7222 37.2128 55.7767C36.5354 55.8313 35.7298 54.7005 36.2974 54.573C36.865 54.445 36.7734 54.3359 37.0845 53.7884C37.3961 53.2412 37.048 53.7338 36.627 53.9163C36.2059 54.0984 36.3157 54.6095 35.9496 54.6095C35.5834 54.6095 34.8877 53.5513 35.4003 53.2232C35.913 52.8947 36.3157 53.0226 36.6453 52.7306C37.0524 52.6001 37.2136 52.5861 37.3043 52.3475C37.1295 52.3992 36.6636 52.7852 36.1692 52.8582C35.6749 52.9312 35.8763 51.2898 36.334 51.2898C36.7917 51.2898 36.7368 51.9464 37.2313 51.7639C37.7253 51.5814 38.6592 49.2649 38.5309 48.7723C38.403 48.2801 37.7987 48.7543 37.8171 49.0459C37.5789 48.9733 36.2791 48.7723 35.9679 48.5902C36.0594 48.9733 36.5354 49.1919 36.5354 49.1919C35.4186 49.3836 34.668 48.6267 34.6863 48.0611C34.4117 48.9368 34.1737 48.2252 33.4413 49.0094C33.5878 47.66 32.6541 46.9484 32.6541 46.9484C32.6541 46.9484 32.6907 48.1157 31.757 48.7543C31.6106 46.8574 29.8347 45.1426 31.6655 43.9388C30.8416 43.7747 30.8233 43.2276 30.8233 43.2276C30.8233 43.2276 34.4117 42.4795 33.8075 40.145C34.0455 41.2757 33.3132 41.9689 33.3132 41.9689C33.3132 41.9689 32.6724 40.2545 31.757 39.6708C30.8416 39.0868 30.2923 38.3211 30.2923 38.3211C30.2923 38.3211 30.2374 39.3423 30.4571 39.5429C29.5234 39.0507 29.5234 37.5914 29.5234 37.5914C29.5234 37.5914 29.56 38.9047 29.1023 39.1783C29.1023 38.1201 28.4066 36.9894 28.4066 36.9894C28.4066 36.9894 28.5347 38.0475 28.3333 38.2296C28.2601 37.4635 26.5758 35.4937 26.2646 34.7276C25.9533 33.9615 25.2027 31.6268 25.7336 31.189C26.2646 30.7513 30.1458 28.0335 31.4089 28.6354C32.6722 29.2373 38.97 28.7631 37.8536 31.335L37.8532 31.3344Z" fill="#FE9201"/>
<path d="M24.2398 34.9371C23.3702 34.8823 23.3061 34.8276 23.1413 34.6635C23.297 35.1195 22.7478 35.9402 21.8873 35.3566C21.0268 34.7729 20.5416 34.2348 20.148 35.1104C19.7544 35.9859 20.4684 36.2139 20.8528 36.1318C21.2373 36.0497 21.3929 36.4328 21.9147 36.3416C21.3747 36.6608 21.1183 36.8888 20.2304 36.6608C19.3425 36.4328 19.1044 38.2295 20.1297 38.3114C21.155 38.3936 20.6515 37.8007 21.2007 37.5821C21.7499 37.3631 22.1893 37.0073 22.1893 37.0073C22.1893 37.0073 21.695 37.2809 21.6859 37.9195C21.6767 38.5577 20.9077 38.6672 21.1915 39.0137C21.4753 39.3603 22.1985 39.6796 22.647 39.3695C23.0955 39.0594 22.8301 38.5304 22.7385 38.2295C22.647 37.9283 23.0406 37.5364 23.5075 37.5821C23.9743 37.6274 23.9286 37.9832 23.5166 38.2752C23.1047 38.5669 24.6975 38.968 25.0545 38.6399C25.4115 38.3114 24.6609 37.4907 25.503 37.2263C26.3452 36.9618 26.986 37.2355 26.986 37.2355C26.1604 36.6308 26.8892 36.6307 27.7458 36.3963C28.4389 36.2066 28.771 35.7123 30.016 36.2595C30.9863 36.6425 30.8764 36.4784 30.9497 35.8035C31.0229 35.1286 31.6637 35.1286 31.8102 34.3078C31.9566 33.487 32.4327 33.2499 32.4327 31.0428C32.4327 28.8358 29.6302 29.8102 28.4047 31.061C27.1795 32.3119 27.4711 33.3048 26.7021 33.8062C25.4847 34.5999 25.1095 34.9918 24.2398 34.9371Z" fill="#FE9201"/>
<path d="M32.5568 17.6998C32.738 17.0807 31.793 15.9844 31.793 15.9844C31.793 15.9844 33.1005 16.1004 33.9678 17.0807C34.8222 16.41 35.9356 16.2037 35.9356 16.2037C35.9356 16.2037 35.6508 16.6164 35.5602 16.8615C37.0231 16.8873 36.8418 17.1323 37.2691 17.1323C36.6347 17.4934 36.4664 17.5966 36.4664 17.5966C38.1882 18.0609 40.0394 20.2148 40.0394 20.2148C40.0394 20.2148 39.3145 19.9569 38.0717 20.1891C40.7513 20.9887 40.1688 22.2591 40.9843 23.0136C39.4827 22.6654 39.0295 22.2785 38.499 22.6138C39.5992 22.8718 40.0781 23.9165 40.0781 23.9165C40.0781 23.9165 39.8842 23.7746 39.7677 23.7488C39.9616 23.981 41.1399 27.386 39.7935 29.0883C39.91 27.6437 38.9389 27.2439 38.9389 27.2439C38.9389 27.2439 39.1851 30.0814 38.68 30.7779C38.6218 30.5522 38.4861 30.2684 38.3954 30.1846C38.3954 30.1846 38.4861 31.7581 37.6315 32.3257C37.567 30.5716 37.1913 30.4039 37.0102 30.3007C35.3854 32.6546 35.0554 32.7448 34.421 33.422C34.6929 32.1451 34.6282 31.5776 34.4857 31.3455C33.2559 32.5965 34.2915 32.9448 32.6345 34.3506C32.6992 32.8287 32.3497 32.4031 32.3497 32.4031C32.3497 32.4031 32.4532 33.3317 31.6895 33.9508C31.56 32.2225 31.314 31.8356 31.4823 30.7908C30.7833 31.655 30.6538 31.9903 30.6538 31.9903C30.5714 31.5617 30.848 30.6877 30.6926 30.3781C30.3561 31.6163 29.4499 31.8614 29.4499 31.8614C29.4499 31.8614 29.9159 30.3652 29.6311 29.8106C28.8155 30.8682 29.2022 31.7364 27.6735 32.311C27.9573 31.6908 27.9756 31.1436 27.9756 31.1436C27.9756 31.1436 26.9595 32.5754 26.7582 33.3598C26.5365 32.5959 26.8497 31.8641 26.8497 31.8641C26.6555 31.9995 25.9251 32.767 25.7695 33.4966C25.3759 32.2654 25.559 31.5905 25.559 31.5905C25.559 31.5905 25.3114 31.6968 25.0006 31.9644C25.3485 30.5964 25.7146 30.2316 25.9251 29.8759C25.3301 30.1951 25.1013 30.4869 24.8816 30.6693C24.7534 29.9488 25.2166 28.2887 26.7442 27.7857C26.0063 27.0118 25.9027 26.4959 25.9157 25.9671C26.6277 26.8828 27.3138 27.1279 27.7151 26.741C28.1164 26.354 28.453 26.3798 28.9579 25.8381C29.4628 25.2964 30.1748 25.3996 30.7056 24.9353C31.2363 24.471 32.2963 23.4736 32.1315 22.744C31.9829 23.084 31.7342 22.8902 31.7948 23.2786C31.5307 23.1835 31.4851 23.3029 31.5256 23.5528C31.2363 23.4484 31.3553 23.699 31.2252 23.6468C30.6577 23.4279 30.319 24.0573 30.1542 24.4403C29.9895 24.8233 29.7606 24.7869 29.2571 24.5862C28.7537 24.3855 28.9001 24.1849 29.0832 24.0755C29.2663 23.9661 28.9367 23.5556 28.9367 23.4188C29.1748 23.583 29.6141 23.4644 29.7332 23.3732C28.5889 22.6071 27.3989 22.8533 27.6735 23.9752C27.0602 23.811 27.1884 23.1999 27.1884 23.1999C27.1884 23.1999 25.3667 23.583 25.4217 21.6769C26.0258 22.7439 27.225 22.7713 27.8291 22.5524C28.4333 22.3335 29.3445 22.6287 30.056 23.0474C30.2445 23.1582 30.2825 22.9214 30.2427 22.8298C29.93 22.111 28.9648 21.2195 28.6853 22.2216C28.4068 21.6681 28.1587 22.0964 27.8932 21.8958C27.6278 21.6951 26.8771 21.0567 27.2525 20.473C27.6278 19.8894 27.8108 20.1265 28.6439 19.4516C29.4768 18.7767 29.7175 18.5497 30.5021 18.4484C30.7319 18.4187 30.7562 17.8954 30.6852 17.7553C31.1458 17.8334 31.6006 17.9742 31.6006 17.9742C31.6006 17.9742 31.5113 17.1156 30.724 17.3527C31.2584 16.7205 32.0575 17.179 32.5568 17.6998Z" fill="#FE9201"/>
<path d="M32.9805 18.5051C33.667 18.8425 34.7838 17.2374 35.6626 18.6145C36.5414 19.9917 34.8662 20.2197 34.5916 20.7486C34.738 20.2926 34.143 19.7089 33.8226 20.0008C34.1522 19.6998 34.4268 19.8002 34.4268 19.8002" fill="#FE9201"/>
<path d="M32.363 20.0176C32.5552 20.4097 31.8503 20.3733 31.7771 20.7745C31.7039 21.1759 32.7474 21.5406 32.7474 21.5406" fill="#FE9201"/>
<path d="M32.3203 21.7949C32.4851 21.9043 32.6773 22.2053 32.6773 22.2053Z" fill="#FE9201"/>
<path d="M30.4413 20.2004C30.1371 20.2455 29.8329 19.6522 29.6387 19.5297C29.7811 19.2847 29.7875 19.1041 30.0853 19.1105" fill="#FE9201"/>
<path d="M29.8359 19.7093C30.1725 19.4062 30.5788 19.3967 30.8118 19.616Z" fill="#FE9201"/>
<path d="M38.6214 56.6091C37.9353 56.035 38.2719 55.0034 38.6926 55.3968C39.1132 55.7902 38.0713 55.8868 38.6214 56.6091Z" fill="#FE9201"/>
<path d="M36.1497 56.1741C35.5866 55.3486 36.2856 54.4973 36.6157 54.9748C36.9459 55.4519 35.8972 55.7487 36.1497 56.1741Z" fill="#FE9201"/>
<path d="M34.7425 54.6252C34.4836 53.6449 35.2409 53.219 35.5258 53.6578C35.8106 54.0962 34.6001 54.2831 34.7425 54.6252Z" fill="#FE9201"/>
<path d="M34.9423 52.7162C34.4439 51.4586 36.3663 51.1039 36.1139 51.8262C35.8614 52.5485 35.0782 51.8712 34.9423 52.7162Z" fill="#FE9201"/>
<path d="M27.7217 20.0254C27.5244 20.5588 27.4921 21.1498 27.5342 21.5732C27.2582 21.281 27.0015 20.8642 27.2539 20.4717C27.4226 20.2094 27.5542 20.1134 27.7217 20.0254Z" fill="#FE9201"/>
<path d="M27.7217 20.0254C27.5244 20.5588 27.4921 21.1498 27.5342 21.5732C27.2582 21.281 27.0015 20.8642 27.2539 20.4717C27.4226 20.2094 27.5542 20.1134 27.7217 20.0254Z" stroke="#EFC88F"/>
<path d="M27.3797 20.6191C27.364 20.7201 27.3535 20.82 27.3458 20.9176C27.3238 20.8156 27.331 20.7168 27.3797 20.6191Z" fill="#FE9201"/>
<path d="M21.8897 49.9697C21.5791 49.0218 23.2749 48.7508 22.9901 49.5438C22.7053 50.3373 22.1616 49.17 21.8897 49.9697Z" fill="#FE9201"/>
<path d="M21.389 51.8071C20.3275 51.0203 22.1981 49.9176 22.3341 50.8592C22.47 51.8008 21.033 50.8721 21.389 51.8071Z" fill="#FE9201"/>
<path d="M22.0468 54.0084C21.255 53.2331 22.2757 52.2162 22.6784 52.6631C23.0812 53.1099 21.9873 53.3971 22.0468 54.0084Z" fill="#FE9201"/>
<path d="M24.004 54.4377C23.4822 53.7397 24.0132 52.9555 24.3564 53.3113C24.6997 53.6667 23.9491 53.9543 24.004 54.4377Z" fill="#FE9201"/>
<path d="M20.3711 21.4018C20.7007 20.327 22.2887 20.8815 21.7944 21.3831C21.3001 21.8848 21.314 20.7452 20.3711 21.4018Z" fill="#FE9201"/>
<path d="M22.8242 21.4763C23.465 21.1345 23.9375 21.8697 23.4974 22.0309C23.0572 22.1921 23.4197 21.6182 22.8242 21.4763Z" fill="#FE9201"/>
<path d="M18.9355 23.1036C19.1168 21.9105 20.5926 22.3297 20.2107 22.852C19.8288 23.3744 19.7123 22.349 18.9355 23.1036Z" fill="#FE9201"/>
<path d="M19.791 26.1992C19.9375 27.4396 20.917 27.0565 20.8163 26.6735C20.7156 26.2904 20.3952 26.7282 19.791 26.1992Z" fill="#FE9201"/>
<path d="M19.6192 36.1738C19.0425 35.1159 20.3699 34.5139 20.4797 34.9973C20.5895 35.4807 19.7382 35.1797 19.6192 36.1738Z" fill="#FE9201"/>
<path d="M19.7018 38.9021C18.8505 38.0265 19.6917 37.1741 20.0771 37.4156C20.6532 37.7762 19.7476 38.0538 19.7018 38.9021Z" fill="#FE9201"/>
<path d="M22.1387 40.2003C21.3881 40.1092 21.2952 38.9711 21.8184 38.9965C22.569 39.033 21.6993 39.5982 22.1387 40.2003Z" fill="#FE9201"/>
<path d="M23.2754 38.9215C24.0535 39.6327 24.6546 38.4647 24.2457 38.3105C23.6415 38.0823 24.1084 38.9034 23.2754 38.9215Z" fill="#FE9201"/>
<path d="M31.1973 18.6157C31.508 18.8478 31.8446 18.7317 32.0646 18.5898Z" fill="#FE9201"/>
<path d="M31.8965 19.3105C32.1166 19.5427 32.259 19.6072 32.492 19.5169Z" fill="#FE9201"/>
<path d="M33.2891 19.0358C33.582 19.1361 33.8474 19.1635 33.9207 19.3824C33.9573 19.1726 34.2411 18.9355 34.4699 19.1361C34.36 18.8625 34.7354 18.6801 35.1198 18.826" fill="#FE9201"/>
</svg>

After

Width:  |  Height:  |  Size: 18 KiB

62
notes.js Normal file
View File

@@ -0,0 +1,62 @@
img(`db/images/${networks[i].logo}`, "2.25em", "2.25em")
.marginTop(3, vh)
.paddingRight(0.5, em)
.onClick(function (finished) {
if(finished) {
this.setAttribute("selected", "")
}
})
.cursor("default")
.DEFAULT()
.opacity(0)
.borderLeft(0)
.paddingLeft(10, px)
.HOVERED()
.opacity(0.8)
.classStyle("selected")
.borderLeft("1px solid var(--accent)")
.paddingLeft(9, px)
quill gotchas
image width / height
forgetting to put a "/" at the beginning of the url for window.navigateTo (if you don't want to add to the existing url)
forgetting to define the event callback with or without the word "function", like so:
if you want "this" to be scoped to the element the listener is on:
.onClick(function (finished) {
if(finished) {
this.setAttribute("selected", "")
}
})
if you want "this" to be scoped to the parent shadow:
.onClick((finished) => {
if(finished) {
this.setAttribute("selected", "")
}
})
window.svg = async function svg(src, width, height) {
const res = await fetch(src);
const svgText = await res.text();
let container = document.createElement("div")
container.innerHTML = svgText;
const svg = container.querySelector("svg");
if(width)
svg.setAttribute("width", width);
if(height)
svg.setAttribute("height", height);
svg.style.display = "block";
svg.setAttribute("aria-hidden", "true");
quill.render(container)
return container
}
rendered 1 svg but gave an error on the attr() function

View File

@@ -12,7 +12,8 @@ export default class Network {
id: z.number(),
name: z.string(),
apps: z.array(z.string()),
logo: z.string()
logo: z.string(),
abbreviation: z.string()
})
.strict()

View File

@@ -97,9 +97,14 @@ class Server {
});
return match ? path.join(dir, match) : null;
}
let filePath = getFileByNumber(path.join(this.DBPath, "images"), path.basename(req.url))
let filePath = path.join(this.DBPath, "images", path.basename(req.url))
if(filePath) {
res.sendFile(filePath)
} else {
return res.status(404).json({error: "Can't find image"})
}
}
get = async (req, res) => {

View File

@@ -57,6 +57,11 @@ window.navigateTo = function(url) {
window.history.pushState({}, '', url);
}
window.setLocation = function(url) {
window.dispatchEvent(new Event('navigate'));
window.history.replaceState({}, '', url);
}
/* $ SELECTOR */
HTMLElement.prototype.$ = function(selector) {
@@ -91,8 +96,6 @@ console.green = function(message) {
}
/* GET CSS VARIABLES FOR DARK OR LIGHT MODE */
window.darkMode = window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches;
document.documentElement.classList.add(darkMode ? 'dark' : 'light');
window.getColor = function(name) {
const rootStyles = getComputedStyle(document.documentElement);
@@ -815,6 +818,20 @@ window.input = function(placeholder = "", width, height) {
return el
}
window.select = function(cb) {
let el = document.createElement("select")
el.render = cb
quill.render(el)
return el
}
window.option = function(placeholder = "") {
let el = document.createElement("option")
el.innerText = placeholder
quill.render(el)
return el
}
window.label = function(inside) {
let el = document.createElement("label")
if(typeof inside === "string") {
@@ -1034,7 +1051,7 @@ HTMLElement.prototype.onInput = function(cb) {
};
HTMLElement.prototype.onChange = function(cb) {
if(!this.matches('input, textarea, [contenteditable=""], [contenteditable="true"]'))
if(!this.matches('input, textarea, select, [contenteditable=""], [contenteditable="true"]'))
throw new Error("Can't put input event on non-input element!")
this._storeListener("change", cb);
return this;

View File

@@ -1,8 +1,10 @@
:root {
--main: var(--brown);
--accent: var(--gold);
--accent2: var(--green);
--main: var(--parchment);
--app: var(--parchment);
--accent: black;
--accent2: black;
--parchment: #FFEBCC;
--gold: #FEBA7D;
--divider: #bb7c36;
--green: #0857265c;
@@ -11,15 +13,15 @@
--brown: #812A18;
--darkbrown: #3f0808;
--house-src: "/_/icons/house.svg";
--nodes-src: "/_/icons/nodes.svg";
--forum-src: "/_/icons/forum.svg";
--people-src: "/_/icons/people.svg";
--house-src: /_/icons/house.svg;
--nodes-src: /_/icons/nodes.svg;
--forum-src: /_/icons/forum.svg;
--people-src: /_/icons/people.svg;
}
@media (prefers-color-scheme: dark) {
:root {
:root.dark {
--main: #000000;
--app: #180404;
--accent: #695b4d;
--accent2: var(--gold);
@@ -28,12 +30,23 @@
--forum-src: /_/icons/forumdark.svg;
--people-src: /_/icons/peopledark.svg;
}
}
:root.red {
--main: var(--red);
--accent: #6a0000;
--app: var(--red);
--accent: black;
--accent2: var(--green);
--house-src: /_/icons/house.svg;
--nodes-src: /_/icons/nodes.svg;
--forum-src: /_/icons/forum.svg;
--people-src: /_/icons/people.svg;
--quill-src: /_/icons/people.svg;
}
:root.public {
--accent: var(--gold);
}
@font-face {

View File

@@ -1,4 +1,4 @@
<svg width="24" height="27" viewBox="0 0 24 27" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M0.5 8.95052V25.6172H23.5V8.95052L12 0.617188L0.5 8.95052Z" stroke="#4C0B00"/>
<path d="M15.8385 25.6169V15.2002H8.17188V25.6169" stroke="#4C0B00"/>
<path d="M0.5 8.95052V25.6172H23.5V8.95052L12 0.617188L0.5 8.95052Z" stroke="black"/>
<path d="M15.8385 25.6169V15.2002H8.17188V25.6169" stroke="black"/>
</svg>

Before

Width:  |  Height:  |  Size: 261 B

After

Width:  |  Height:  |  Size: 257 B

View File

@@ -1,11 +0,0 @@
<svg width="30" height="28" viewBox="0 0 30 28" fill="none" xmlns="http://www.w3.org/2000/svg">
<circle cx="14.5" cy="14.5" r="6" stroke="#453C33"/>
<circle cx="26.5" cy="3.5" r="3" stroke="#453C33"/>
<circle cx="8.5" cy="3.5" r="3" stroke="#453C33"/>
<circle cx="3.5" cy="19.5" r="3" stroke="#453C33"/>
<circle cx="26.5" cy="24.5" r="3" stroke="#453C33"/>
<rect x="19.3531" y="10.04" width="6.20598" height="0.5" transform="rotate(-42 19.3531 10.04)" fill="black" stroke="#453C33" stroke-width="0.5"/>
<rect x="11.5018" y="8.76443" width="2.48193" height="0.5" transform="rotate(-118 11.5018 8.76443)" fill="black" stroke="#453C33" stroke-width="0.5"/>
<rect x="8.74289" y="17.7719" width="2.12617" height="0.5" transform="rotate(149 8.74289 17.7719)" fill="black" stroke="#453C33" stroke-width="0.5"/>
<rect x="19.692" y="18.3533" width="5.65271" height="0.5" transform="rotate(43 19.692 18.3533)" fill="black" stroke="#453C33" stroke-width="0.5"/>
</svg>

Before

Width:  |  Height:  |  Size: 958 B

View File

@@ -1,3 +1,3 @@
<svg width="26" height="23" viewBox="0 0 26 23" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M16.5208 15.1601C17.867 15.1601 18.9583 16.251 18.9583 17.5966V19.223L18.9498 19.3405C18.6131 21.6429 16.5442 22.75 13.0724 22.75C9.61308 22.75 7.51108 21.6555 7.05733 19.3796L7.04167 19.2209V17.5966C7.04167 16.251 8.13297 15.1601 9.47917 15.1601H16.5208ZM16.5208 16.7844H9.47917C9.03044 16.7844 8.66667 17.1481 8.66667 17.5966V19.1347C8.96977 20.4346 10.3465 21.1257 13.0724 21.1257C15.7981 21.1257 17.113 20.442 17.3333 19.1593V17.5966C17.3333 17.1481 16.9696 16.7844 16.5208 16.7844ZM17.5972 8.66176L23.5625 8.66294C24.9087 8.66294 26 9.75378 26 11.0994V12.7258L25.9915 12.8433C25.6548 15.1457 23.5858 16.2528 20.114 16.2528L19.7729 16.2492C19.4533 15.4764 18.8664 14.8437 18.1278 14.4644C18.6855 14.5737 19.3463 14.6285 20.114 14.6285C22.8398 14.6285 24.1547 13.9448 24.375 12.6621V11.0994C24.375 10.6509 24.0112 10.2872 23.5625 10.2872H17.875C17.875 9.71726 17.7771 9.17014 17.5972 8.66176ZM2.4375 8.66294L8.40282 8.66176C8.25289 9.08541 8.15991 9.53596 8.13309 10.0042L8.125 10.2872H2.4375C1.98877 10.2872 1.625 10.6509 1.625 11.0994V12.6375C1.92811 13.9374 3.30485 14.6285 6.03069 14.6285C6.7046 14.6285 7.29227 14.5867 7.79848 14.5044C7.09349 14.8871 6.53462 15.5039 6.22521 16.2501L6.03069 16.2528C2.57141 16.2528 0.46941 15.1583 0.0156679 12.8824L0 12.7237V11.0994C0 9.75378 1.09131 8.66294 2.4375 8.66294ZM13 6.4972C15.0941 6.4972 16.7917 8.19406 16.7917 10.2872C16.7917 12.3804 15.0941 14.0773 13 14.0773C10.9059 14.0773 9.20833 12.3804 9.20833 10.2872C9.20833 8.19406 10.9059 6.4972 13 6.4972ZM13 8.1215C11.8034 8.1215 10.8333 9.09114 10.8333 10.2872C10.8333 11.4833 11.8034 12.453 13 12.453C14.1966 12.453 15.1667 11.4833 15.1667 10.2872C15.1667 9.09114 14.1966 8.1215 13 8.1215ZM20.0417 0C22.1357 0 23.8333 1.69686 23.8333 3.79004C23.8333 5.88321 22.1357 7.58007 20.0417 7.58007C17.9476 7.58007 16.25 5.88321 16.25 3.79004C16.25 1.69686 17.9476 0 20.0417 0ZM5.95833 0C8.05241 0 9.75 1.69686 9.75 3.79004C9.75 5.88321 8.05241 7.58007 5.95833 7.58007C3.86425 7.58007 2.16667 5.88321 2.16667 3.79004C2.16667 1.69686 3.86425 0 5.95833 0ZM20.0417 1.6243C18.845 1.6243 17.875 2.59393 17.875 3.79004C17.875 4.98614 18.845 5.95577 20.0417 5.95577C21.2383 5.95577 22.2083 4.98614 22.2083 3.79004C22.2083 2.59393 21.2383 1.6243 20.0417 1.6243ZM5.95833 1.6243C4.76172 1.6243 3.79167 2.59393 3.79167 3.79004C3.79167 4.98614 4.76172 5.95577 5.95833 5.95577C7.15495 5.95577 8.125 4.98614 8.125 3.79004C8.125 2.59393 7.15495 1.6243 5.95833 1.6243Z" fill="black"/>
<svg width="34" height="32" viewBox="0 0 34 32" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M22.4912 0.5C24.6609 0.500107 26.4463 2.29218 26.4463 4.50195C26.4461 5.9638 25.6634 7.24788 24.502 7.94824L23.6514 8.46094L24.5693 8.83887C26.587 9.66866 28.0146 11.6745 28.0146 14.0195V14.5029L28.4541 14.5566C30.4025 14.7942 31.9307 16.4869 31.9307 18.5342C31.9306 19.9965 31.1509 21.2779 29.9912 21.9766L29.1406 22.4893L30.0596 22.8672C32.0762 23.6969 33.5 25.7015 33.5 28.0469V31.4609C33.4998 31.4881 33.4804 31.4983 33.4697 31.499C33.466 31.4988 33.4624 31.4985 33.459 31.4971C33.4553 31.4955 33.4524 31.4944 33.4512 31.4932L33.4482 31.4902L33.4365 31.458V28.0469C33.4365 24.9911 31.019 22.5352 27.9805 22.5352C24.9421 22.5352 22.5225 24.9924 22.5225 28.0469V31.4629C22.5225 31.4743 22.5176 31.4844 22.5117 31.4902C22.5051 31.4967 22.4976 31.4988 22.4902 31.499C22.485 31.4985 22.4784 31.4966 22.4727 31.4912L22.4609 31.4609V28.0469C22.4609 24.9905 20.0379 22.5352 17 22.5352C13.9614 22.5352 11.544 24.9925 11.5439 28.0469V31.4609C11.5439 31.4744 11.5382 31.4841 11.5312 31.4912C11.5246 31.498 11.5191 31.5 11.5137 31.5C11.5104 31.5 11.508 31.4997 11.5049 31.499C11.4948 31.4967 11.4805 31.4846 11.4805 31.4629V28.0488C11.4805 24.9931 9.0629 22.5373 6.02441 22.5371C2.98626 22.5371 0.563477 24.9939 0.563477 28.0488V31.4609C0.563297 31.4882 0.542917 31.4999 0.530273 31.5C0.524251 31.5 0.518186 31.4977 0.511719 31.4912C0.505432 31.4847 0.501504 31.4756 0.500977 31.4629V28.0488C0.500977 25.7039 1.92786 23.7001 3.94531 22.8701L4.86426 22.4912L4.0127 21.9795C2.85121 21.2805 2.06934 19.997 2.06934 18.5352C2.06949 16.4873 3.60107 14.7963 5.55176 14.5586L5.99121 14.5049V14.0205C5.99124 11.6755 7.41775 9.67071 9.43652 8.84082L10.3555 8.46289L9.50391 7.9502C8.34227 7.24961 7.55957 5.96483 7.55957 4.50293C7.55962 2.29286 9.34267 0.502076 11.5137 0.501953H11.5977C13.73 0.546093 15.4668 2.31921 15.4668 4.50195C15.4666 5.96451 14.6864 7.24824 13.5254 7.94824L12.6758 8.46094L13.5938 8.83887C14.9033 9.37789 15.9663 10.4144 16.5479 11.7168L17.0039 12.7393L17.4609 11.7168C18.0426 10.4142 19.1043 9.3778 20.415 8.83887L21.334 8.46094L20.4834 7.94824C19.322 7.24792 18.5402 5.96407 18.54 4.50195C18.54 2.29132 20.3205 0.5 22.4912 0.5ZM11.5127 8.50879C8.47454 8.50879 6.05176 10.9655 6.05176 14.0205V14.5039L6.49219 14.5566C8.44316 14.7921 9.97363 16.4858 9.97363 18.5342C9.9735 19.9963 9.19367 21.2769 8.03418 21.9756L7.18359 22.4883L8.10156 22.8662C9.41094 23.4051 10.4731 24.4415 11.0547 25.7441L11.1865 26.04H11.8369L11.9688 25.7441C12.552 24.4411 13.6128 23.405 14.9219 22.8662L15.8398 22.4883L14.9893 21.9756C13.8297 21.2769 13.0499 19.9963 13.0498 18.5342C13.0498 16.4857 14.5807 14.793 16.5322 14.5566L16.9717 14.5029V14.0205C16.9717 10.9645 14.5521 8.50879 11.5137 8.50879H11.5127ZM22.4902 8.50781C19.4517 8.50781 17.0344 10.9643 17.0342 14.0186V14.5029L17.4736 14.5566C19.4239 14.7945 20.9541 16.4876 20.9541 18.5342C20.954 19.9961 20.173 21.2768 19.0117 21.9756L18.1602 22.4883L19.0791 22.8662C20.3897 23.4051 21.452 24.4414 22.0352 25.7441L22.168 26.04H22.8174L22.9492 25.7441C23.5309 24.4415 24.5929 23.4051 25.9023 22.8662L26.8213 22.4883L25.9697 21.9756C24.8102 21.2769 24.0304 19.9962 24.0303 18.5342C24.0303 16.4856 25.5595 14.793 27.5107 14.5566L27.9512 14.5029V14.0205C27.9512 11.1335 25.7892 8.78398 22.9893 8.53223V8.50781H22.4902ZM6.02344 14.6074C3.8627 14.6074 2.13208 16.3662 2.13184 18.5332C2.13184 20.7012 3.86338 22.4561 6.02344 22.4561C8.18395 22.4559 9.91211 20.7006 9.91211 18.5332C9.91187 16.3669 8.18463 14.6075 6.02344 14.6074ZM16.999 14.6074C14.8379 14.6076 13.1106 16.3669 13.1104 18.5332C13.1104 20.7005 14.8386 22.4559 16.999 22.4561C19.1591 22.4561 20.8916 20.7012 20.8916 18.5332C20.8914 16.3662 19.1598 14.6074 16.999 14.6074ZM27.9795 14.6074C25.8182 14.6075 24.0911 16.3668 24.0908 18.5332C24.0908 20.7006 25.8189 22.456 27.9795 22.4561C30.1404 22.4561 31.8672 20.7004 31.8672 18.5332C31.8669 16.3671 30.1411 14.6074 27.9795 14.6074ZM11.5137 0.579102C9.35372 0.579223 7.62207 2.33401 7.62207 4.50195C7.62232 6.66883 9.35304 8.42761 11.5137 8.42773C13.675 8.42773 15.4031 6.66835 15.4033 4.50195C15.4033 2.3345 13.6743 0.579102 11.5137 0.579102ZM22.4902 0.579102C20.3293 0.579102 18.6025 2.33478 18.6025 4.50195C18.6028 6.66807 20.3287 8.42773 22.4902 8.42773C24.6506 8.42762 26.3835 6.66912 26.3838 4.50195C26.3838 2.33373 24.6499 0.579213 22.4902 0.579102Z" fill="black" stroke="#000000"/>
</svg>

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 4.3 KiB

View File

@@ -1,3 +0,0 @@
<svg width="34" height="32" viewBox="0 0 34 32" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M22.4912 0.5C24.6609 0.500107 26.4463 2.29218 26.4463 4.50195C26.4461 5.9638 25.6634 7.24788 24.502 7.94824L23.6514 8.46094L24.5693 8.83887C26.587 9.66866 28.0146 11.6745 28.0146 14.0195V14.5029L28.4541 14.5566C30.4025 14.7942 31.9307 16.4869 31.9307 18.5342C31.9306 19.9965 31.1509 21.2779 29.9912 21.9766L29.1406 22.4893L30.0596 22.8672C32.0762 23.6969 33.5 25.7015 33.5 28.0469V31.4609C33.4998 31.4881 33.4804 31.4983 33.4697 31.499C33.466 31.4988 33.4624 31.4985 33.459 31.4971C33.4553 31.4955 33.4524 31.4944 33.4512 31.4932L33.4482 31.4902L33.4365 31.458V28.0469C33.4365 24.9911 31.019 22.5352 27.9805 22.5352C24.9421 22.5352 22.5225 24.9924 22.5225 28.0469V31.4629C22.5225 31.4743 22.5176 31.4844 22.5117 31.4902C22.5051 31.4967 22.4976 31.4988 22.4902 31.499C22.485 31.4985 22.4784 31.4966 22.4727 31.4912L22.4609 31.4609V28.0469C22.4609 24.9905 20.0379 22.5352 17 22.5352C13.9614 22.5352 11.544 24.9925 11.5439 28.0469V31.4609C11.5439 31.4744 11.5382 31.4841 11.5312 31.4912C11.5246 31.498 11.5191 31.5 11.5137 31.5C11.5104 31.5 11.508 31.4997 11.5049 31.499C11.4948 31.4967 11.4805 31.4846 11.4805 31.4629V28.0488C11.4805 24.9931 9.0629 22.5373 6.02441 22.5371C2.98626 22.5371 0.563477 24.9939 0.563477 28.0488V31.4609C0.563297 31.4882 0.542917 31.4999 0.530273 31.5C0.524251 31.5 0.518186 31.4977 0.511719 31.4912C0.505432 31.4847 0.501504 31.4756 0.500977 31.4629V28.0488C0.500977 25.7039 1.92786 23.7001 3.94531 22.8701L4.86426 22.4912L4.0127 21.9795C2.85121 21.2805 2.06934 19.997 2.06934 18.5352C2.06949 16.4873 3.60107 14.7963 5.55176 14.5586L5.99121 14.5049V14.0205C5.99124 11.6755 7.41775 9.67071 9.43652 8.84082L10.3555 8.46289L9.50391 7.9502C8.34227 7.24961 7.55957 5.96483 7.55957 4.50293C7.55962 2.29286 9.34267 0.502076 11.5137 0.501953H11.5977C13.73 0.546093 15.4668 2.31921 15.4668 4.50195C15.4666 5.96451 14.6864 7.24824 13.5254 7.94824L12.6758 8.46094L13.5938 8.83887C14.9033 9.37789 15.9663 10.4144 16.5479 11.7168L17.0039 12.7393L17.4609 11.7168C18.0426 10.4142 19.1043 9.3778 20.415 8.83887L21.334 8.46094L20.4834 7.94824C19.322 7.24792 18.5402 5.96407 18.54 4.50195C18.54 2.29132 20.3205 0.5 22.4912 0.5ZM11.5127 8.50879C8.47454 8.50879 6.05176 10.9655 6.05176 14.0205V14.5039L6.49219 14.5566C8.44316 14.7921 9.97363 16.4858 9.97363 18.5342C9.9735 19.9963 9.19367 21.2769 8.03418 21.9756L7.18359 22.4883L8.10156 22.8662C9.41094 23.4051 10.4731 24.4415 11.0547 25.7441L11.1865 26.04H11.8369L11.9688 25.7441C12.552 24.4411 13.6128 23.405 14.9219 22.8662L15.8398 22.4883L14.9893 21.9756C13.8297 21.2769 13.0499 19.9963 13.0498 18.5342C13.0498 16.4857 14.5807 14.793 16.5322 14.5566L16.9717 14.5029V14.0205C16.9717 10.9645 14.5521 8.50879 11.5137 8.50879H11.5127ZM22.4902 8.50781C19.4517 8.50781 17.0344 10.9643 17.0342 14.0186V14.5029L17.4736 14.5566C19.4239 14.7945 20.9541 16.4876 20.9541 18.5342C20.954 19.9961 20.173 21.2768 19.0117 21.9756L18.1602 22.4883L19.0791 22.8662C20.3897 23.4051 21.452 24.4414 22.0352 25.7441L22.168 26.04H22.8174L22.9492 25.7441C23.5309 24.4415 24.5929 23.4051 25.9023 22.8662L26.8213 22.4883L25.9697 21.9756C24.8102 21.2769 24.0304 19.9962 24.0303 18.5342C24.0303 16.4856 25.5595 14.793 27.5107 14.5566L27.9512 14.5029V14.0205C27.9512 11.1335 25.7892 8.78398 22.9893 8.53223V8.50781H22.4902ZM6.02344 14.6074C3.8627 14.6074 2.13208 16.3662 2.13184 18.5332C2.13184 20.7012 3.86338 22.4561 6.02344 22.4561C8.18395 22.4559 9.91211 20.7006 9.91211 18.5332C9.91187 16.3669 8.18463 14.6075 6.02344 14.6074ZM16.999 14.6074C14.8379 14.6076 13.1106 16.3669 13.1104 18.5332C13.1104 20.7005 14.8386 22.4559 16.999 22.4561C19.1591 22.4561 20.8916 20.7012 20.8916 18.5332C20.8914 16.3662 19.1598 14.6074 16.999 14.6074ZM27.9795 14.6074C25.8182 14.6075 24.0911 16.3668 24.0908 18.5332C24.0908 20.7006 25.8189 22.456 27.9795 22.4561C30.1404 22.4561 31.8672 20.7004 31.8672 18.5332C31.8669 16.3671 30.1411 14.6074 27.9795 14.6074ZM11.5137 0.579102C9.35372 0.579223 7.62207 2.33401 7.62207 4.50195C7.62232 6.66883 9.35304 8.42761 11.5137 8.42773C13.675 8.42773 15.4031 6.66835 15.4033 4.50195C15.4033 2.3345 13.6743 0.579102 11.5137 0.579102ZM22.4902 0.579102C20.3293 0.579102 18.6025 2.33478 18.6025 4.50195C18.6028 6.66807 20.3287 8.42773 22.4902 8.42773C24.6506 8.42762 26.3835 6.66912 26.3838 4.50195C26.3838 2.33373 24.6499 0.579213 22.4902 0.579102Z" fill="black" stroke="#453C33"/>
</svg>

Before

Width:  |  Height:  |  Size: 4.3 KiB

View File

@@ -10,42 +10,48 @@ class Home extends Shadow {
Sidebar()
switch(window.location.pathname) {
case "/":
AppWindow()
AppMenu()
break
case "/app/jobs":
AppWindow("Jobs")
AppMenu("Jobs")
break;
case "/app/messages":
AppWindow("Messages")
AppMenu("Messages")
break;
case "/app/market":
AppWindow("Market")
AppMenu("Market")
break;
case "/app/forum":
AppWindow("Forum")
AppMenu("Forum")
break;
default:
throw new Error("Unknown route!")
}
AppWindow()
HStack(() => {
// ProfileButton()
// .zIndex(1)
// .cursor("default")
let selected = document.documentElement.className
console.log(selected)
select(() => {
option("")
option("Light").attr({value: "light"})
option("Dark").attr({value: "dark"})
option("Red").attr({value: "red"})
$(`option[value=${selected}]`).selected = "true"
})
.outline("none")
.background("transparent")
.height(2, em)
.color("var(--accent)")
.border("1px solid var(--accent)")
.attr({value: "dark"})
.onChange((e) => {
console.log("onchange")
document.documentElement.className = e.target.value
localStorage.setItem("theme", e.target.value);
const event = new CustomEvent('themechange', {
detail: {}
});
window.dispatchEvent(event)
})
.onHover(function (hovering) {
if(hovering) {
this.style.background = "var(--green)"
} else {
this.style.background = "transparent"
}
})
a("/signout", "Sign Out")
.background("transparent")
.border(window.location.pathname === "/" ? "1px solid var(--tan)" : "0.5px solid #bb7c36")
.color(window.location.pathname === "/" ? "var(--tan)" : "var(--accent)")
.borderRadius(5, px)
.border("1px solid var(--accent")
.color("var(--accent)")
.onHover(function (hovering) {
if(hovering) {
this.style.background = "var(--green)"
@@ -53,15 +59,6 @@ class Home extends Shadow {
this.style.background = ""
}
})
.onNavigate(function () {
if(window.location.pathname === "/") {
this.style.border = "1px solid var(--tan)"
this.style.color = "var(--tan)"
} else {
this.style.border = "0.5px solid #bb7c36"
this.style.color = "var(--accent)"
}
})
})
.gap(1, em)
.xRight(2, em).y(2.3, em)

View File

@@ -0,0 +1,11 @@
class Dashboard extends Shadow {
render() {
VStack(() => {
})
.width(100, pct)
.height(100, pct)
}
}
register(Dashboard)

View File

@@ -1,17 +1,8 @@
css(`
app-menu img:hover {
opacity: 0.8;
}
`)
register(
class AppMenu extends Shadow {
selected;
constructor(selected) {
super()
this.selected = selected
images = {
"Dashboard": {src: "house-src", size: "1.5em"},
"People": {src: "people-src", size: "1.7em"}
}
render() {
@@ -22,76 +13,49 @@ class AppMenu extends Shadow {
.getPropertyValue("--" + value)
.trim();
}
HStack(() => {
img(cssVariable("house-src"), "1.5em")
img(cssVariable("people-src"), "1.7em")
let currentNetwork = window.currentNetwork
if(!currentNetwork) return
let currentApp = window.currentApp
for(let i = 0; i < currentNetwork.apps.length; i++) {
let app = currentNetwork.apps[i]
img(cssVariable(this.images[app].src), this.images[app].size)
.attr({app: app})
.padding(0.3, em)
.paddingBottom(currentApp === app ? 4 : 5, px)
.borderBottom(currentApp === app ? "1px solid var(--accent)" : "")
.onClick((done) => {
if(done) window.openApp(app)
})
.onHover(function (hovering) {
if(hovering) {
this.style.opacity = 0.8
} else {
this.style.opacity = ""
}
})
}
})
.justifyContent("center")
.gap(3.5, em)
.paddingRight(2, em)
})
.onEvent("themechange", () => {
this.rerender()
})
.onEvent("appchanged", () => {
console.log("event firing successfully")
this.rerender()
})
.position("fixed")
.x(0).yBottom(0)
.width(100, vw)
.paddingVertical(1, em)
.borderTop("0.5px solid var(--accent)")
.onNavigate(() => {
if(window.location.pathname === "/") {
this.styleMaximized()
$("app-window").close()
} else {
this.styleMinimized()
$("app-window").open(this.selected)
}
})
.onAppear(() => {
Array.from(this.querySelectorAll("img")).forEach((el) => {
el.addEventListener("mousedown", (e) => {
el.classList.add("touched")
})
})
window.addEventListener("mouseup", (e) => {
let target = e.target
if(!target.matches("app-menu img")) {
return
}
target.classList.remove("touched")
if(target.classList.contains("selected")) {
this.selected = ""
window.navigateTo("/")
} else {
this.selected = target.innerText
window.navigateTo("/app/" + target.innerText.toLowerCase())
}
})
})
if(this.selected) {
this.styleMinimized()
}
}
styleMaximized() {
$$("app-menu p").forEach((el) => {
el.classList.remove("selected")
})
this.classList.remove("minimized")
$("#divider").style.display = ""
}
styleMinimized() {
$$("app-menu p").forEach((el) => {
if(el.innerText !== this.selected) {
el.classList.remove("selected")
} else {
el.classList.add("selected")
}
})
this.classList.add("minimized")
$("#divider").style.display = "none"
.height(2.5, em)
.paddingVertical(0.7, em)
.borderTop("1px solid var(--accent)")
}
}
, "app-menu")
register(AppMenu, "app-menu")

View File

@@ -1,3 +1,4 @@
import "../apps/Dashboard/Dashboard.js"
import "../apps/Forum/Forum.js"
import "../apps/Tasks/Tasks.js"
import "../apps/Messages/Messages.js"
@@ -5,16 +6,25 @@ import "../apps/Market/Market.js"
import "../apps/Jobs/Jobs.js"
class AppWindow extends Shadow {
app;
constructor(app) {
super()
this.app = app
calculateWidth() {
let sidebar = $("sidebar-").getBoundingClientRect()
let w = sidebar.width
return w
}
calculateHeight() {
let appmenu = $("app-menu").getBoundingClientRect()
let h = appmenu.height
return h
}
render() {
ZStack(() => {
switch(this.app) {
switch(window.currentApp) {
case "Dashboard":
Dashboard()
break;
case "Forum":
Forum()
break;
@@ -30,25 +40,13 @@ class AppWindow extends Shadow {
}
})
.position("fixed")
.display(this.app ? 'block' : 'none')
.width(100, "vw")
.height(100, "vh")
.background("#591d10")
.x(0)
.y(0)
// .backgroundImage("/_/images/fabric.png")
// .backgroundSize("33vw auto")
.width(window.innerWidth - this.calculateWidth(), px)
.height(window.innerHeight - this.calculateHeight(), px)
.background("var(--app)")
.x(this.calculateWidth(), px)
.yBottom(this.calculateHeight(), px)
.onEvent("appchange", () => this.rerender())
}
open(app) {
this.app = app
this.rerender()
}
close() {
this.style.display = "none"
}
}
register(AppWindow, "app-window")

View File

@@ -1,47 +1,45 @@
class Sidebar extends Shadow {
currentNetwork = null
render() {
VStack(() => {
img(document.documentElement.classList.contains("red") ? "/_/icons/quillblack.svg" : "/_/icons/quill.svg", "2.25em")
.paddingLeft(3, em)
.paddingTop(5, vh)
.onClick(() => {
window.navigateTo("/")
img(document.documentElement.classList.contains("red") ? "/_/icons/quillblack.svg" : "/_/icons/quill.svg", "2.5em", "2.5em")
.marginTop(6, vh)
.marginBottom(2, vh)
let networks = window.profile.networks
for(let i=0; i<networks.length; i++) {
let selected = window.location.pathname.startsWith("/" + networks[i].abbreviation)
img(`/db/images/${networks[i].logo}`, "2.25em", "2.25em")
.marginTop(3, vh)
.paddingRight(0.5, em)
.paddingLeft(selected ? 9 : 10, px)
.borderLeft(selected ? "1px solid var(--accent)" : "0")
.onHover(function (hovering) {
if(hovering) {
this.style.opacity = 0.8
} else {
this.style.opacity = ""
}
})
.onClick(function (finished) {
if(finished) {
this.setAttribute("selected", "")
this.style.borderLeft = "1px solid var(--accent)"
this.style.paddingLeft = "9px"
}
})
.paddingRight(2, em)
.cursor("default")
}
})
.paddingLeft(1.5, em)
.paddingRight(1, em)
.position("fixed")
.x(0).y(0)
.height(100, vh)
.borderRight("0.5px solid var(--accent)")
.borderRight("1px solid var(--accent)")
.zIndex(3)
.onAppear(async () => {
if(!window.profile) {
window.profile = await this.fetchProfile()
if(profile) {
this.rerender()
}
}
})
}
async fetchProfile() {
try {
const res = await fetch("/profile", {
method: "GET",
credentials: "include",
headers: {
"Content-Type": "application/json"
}
});
if (!res.ok) throw new Error("Failed to fetch profile");
const profile = await res.json();
console.log(profile);
return profile
} catch (err) {
console.error(err);
}
}
}

View File

@@ -5,6 +5,15 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" href="/_/icons/quill.svg">
<link rel="stylesheet" href="/_/code/shared.css">
<script>
if(localStorage.getItem("theme")) {
document.documentElement.className = localStorage.getItem("theme")
} else {
if(window.matchMedia('(prefers-color-scheme: dark)').matches) {
document.documentElement.className = "dark"
}
}
</script>
<script src="/_/code/quill.js"></script>
<script src="/_/code/zod.js"></script>
<script type="module" src="75820185/index.js"></script>

View File

@@ -5,4 +5,96 @@ import util from "./util.js"
window.util = util
window.Socket = new Socket()
Home()
window.currentNetwork = ""
window.currentApp = ""
window.addEventListener("navigate", () => {
if(window.currentNetwork !== selectedNetwork()) {
window.currentNetwork = selectedNetwork()
const event = new CustomEvent('networkchanged', {
detail: { name: currentNetwork }
});
window.dispatchEvent(event)
}
if(window.currentApp !== selectedApp()) {
window.currentApp = selectedApp()
const event = new CustomEvent('appchanged', {
detail: { name: window.currentApp }
});
window.dispatchEvent(event)
}
document.title = `${window.currentNetwork.abbreviation} | Parchment`
})
window.selectedNetwork = function () {
const pathname = window.location.pathname;
const firstSegment = pathname.split('/').filter(Boolean)[0] || '';
let networks = window.profile?.networks
for(let i = 0; i < networks.length; i++) {
let network = networks[i]
if(network.abbreviation === firstSegment) {
return network
}
}
}
window.selectedApp = function() {
const pathname = window.location.pathname;
const segments = pathname.split('/').filter(Boolean);
const secondSegment = segments[1] || "";
const capitalized = secondSegment.charAt(0).toUpperCase() + secondSegment.slice(1);
return capitalized
}
window.openApp = function(appName) {
const appUrl = appName.charAt(0).toLowerCase() + appName.slice(1);
let parts = window.location.pathname.split('/').filter(Boolean);
let newPath = "/" + parts[0] + "/" + appUrl
console.log(newPath)
window.navigateTo(newPath)
// window.history.replaceState({}, '', newPath);
const event = new CustomEvent('appchanged', {
detail: { name: appName }
});
window.dispatchEvent(event)
}
async function getProfile() {
try {
const res = await fetch("/profile", {
method: "GET",
credentials: "include",
headers: {
"Content-Type": "application/json"
}
});
if (!res.ok) throw new Error("Failed to fetch profile");
const profile = await res.json();
console.log(profile);
window.profile = profile
} catch (err) {
console.error(err);
}
}
getProfile().then(() => {
let path = "";
let defaultNetwork = window.profile.networks[0]
if(!selectedNetwork()) {
path += (defaultNetwork.abbreviation + "/")
}
if(!selectedApp()) {
let defaultApp = defaultNetwork.apps[0]
path += defaultApp.toLowerCase()
}
window.navigateTo(path)
Home()
})

View File

@@ -1,5 +1,5 @@
<!DOCTYPE html>
<html lang="en">
<html lang="en" class="public">
<head>
<title>Parchment</title>
<meta name="viewport" content="width=device-width, initial-scale=1">

View File

@@ -14,7 +14,7 @@ class Home extends Shadow {
.fontFamily("Nabla")
.fontSize(6.5, em)
.marginLeft(1, rem)
.color("var(--accent2)")
.color("var(--accent)")
})
.marginBottom(1, rem)
@@ -24,7 +24,7 @@ class Home extends Shadow {
HStack(() => {
span("The Community OS")
.fontFamily("Canterbury")
.color("var(--accent2)")
.color("var(--accent)")
.fontSize(2.5, em)
.paddingBottom(1, rem)
})