This commit is contained in:
2026-08-28 23:02:38 -05:00
parent d8a9d74912
commit d27792b813
9 changed files with 1570 additions and 1 deletions
+1
View File
@@ -0,0 +1 @@
share-server/node_modules
+39
View File
@@ -0,0 +1,39 @@
{
"profile": {
"name": "miles wolf allen",
"handle": "@mileswa · software engineer",
"meta": "he/him · MN, USA",
"bio": "Developer and 3D artist interested in coding, games, and web technology. Currently learning Rust.",
"avatar": "https://avatars.githubusercontent.com/u/115095719?v=4",
"website": "https://milesallen.site"
},
"timezone": {
"id": "America/Chicago",
"label": "Central Time (MN, USA)"
},
"now": [
["Learning", "Rust"],
["Building", "Vanilla music app"],
["Playing", "Geometry Dash"]
],
"posts": [
{
"title": "Shipped Vanilla v2.0",
"body": "Rewrote the audio engine and added a custom queue. Huge QoL update.",
"date": "2026-08-24",
"link": "https://github.com/mileswolfallen2"
},
{
"title": "Porting a classic to desktop",
"body": "Working on a native PC port of a retro game. Almost playable.",
"date": "2026-08-15",
"link": ""
},
{
"title": "Learning Rust",
"body": "Picked up Rust for a systems project. Rotating on lifetimes right now.",
"date": "2026-07-30",
"link": ""
}
]
}
+831
View File
@@ -0,0 +1,831 @@
{
"name": "miles-share-server",
"version": "1.0.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "miles-share-server",
"version": "1.0.0",
"dependencies": {
"express": "^4.22.2"
},
"engines": {
"node": ">=18"
}
},
"node_modules/accepts": {
"version": "1.3.8",
"resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz",
"integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==",
"license": "MIT",
"dependencies": {
"mime-types": "~2.1.34",
"negotiator": "0.6.3"
},
"engines": {
"node": ">= 0.6"
}
},
"node_modules/array-flatten": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz",
"integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==",
"license": "MIT"
},
"node_modules/body-parser": {
"version": "1.20.6",
"resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.6.tgz",
"integrity": "sha512-p5tAzS57i5MV9fZFDj9LeIiTZEufbSe2eDozP+ElheSUq1m74CRq1jI4mYNDdVs9vQztXFLuk/Gd6BWTdwRJ5g==",
"license": "MIT",
"dependencies": {
"bytes": "~3.1.2",
"content-type": "~1.0.5",
"debug": "2.6.9",
"depd": "2.0.0",
"destroy": "~1.2.0",
"http-errors": "~2.0.1",
"iconv-lite": "~0.4.24",
"on-finished": "~2.4.1",
"qs": "~6.15.1",
"raw-body": "~2.5.3",
"type-is": "~1.6.18",
"unpipe": "~1.0.0"
},
"engines": {
"node": ">= 0.8",
"npm": "1.2.8000 || >= 1.4.16"
}
},
"node_modules/bytes": {
"version": "3.1.2",
"resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz",
"integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==",
"license": "MIT",
"engines": {
"node": ">= 0.8"
}
},
"node_modules/call-bind-apply-helpers": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz",
"integrity": "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==",
"license": "MIT",
"dependencies": {
"es-errors": "^1.3.0",
"function-bind": "^1.1.2"
},
"engines": {
"node": ">= 0.4"
}
},
"node_modules/call-bound": {
"version": "1.0.4",
"resolved": "https://registry.npmjs.org/call-bound/-/call-bound-1.0.4.tgz",
"integrity": "sha512-+ys997U96po4Kx/ABpBCqhA9EuxJaQWDQg7295H4hBphv3IZg0boBKuwYpt4YXp6MZ5AmZQnU/tyMTlRpaSejg==",
"license": "MIT",
"dependencies": {
"call-bind-apply-helpers": "^1.0.2",
"get-intrinsic": "^1.3.0"
},
"engines": {
"node": ">= 0.4"
},
"funding": {
"url": "https://github.com/sponsors/ljharb"
}
},
"node_modules/content-disposition": {
"version": "0.5.4",
"resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz",
"integrity": "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==",
"license": "MIT",
"dependencies": {
"safe-buffer": "5.2.1"
},
"engines": {
"node": ">= 0.6"
}
},
"node_modules/content-type": {
"version": "1.0.5",
"resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz",
"integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==",
"license": "MIT",
"engines": {
"node": ">= 0.6"
}
},
"node_modules/cookie": {
"version": "0.7.2",
"resolved": "https://registry.npmjs.org/cookie/-/cookie-0.7.2.tgz",
"integrity": "sha512-yki5XnKuf750l50uGTllt6kKILY4nQ1eNIQatoXEByZ5dWgnKqbnqmTrBE5B4N7lrMJKQ2ytWMiTO2o0v6Ew/w==",
"license": "MIT",
"engines": {
"node": ">= 0.6"
}
},
"node_modules/cookie-signature": {
"version": "1.0.7",
"resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.7.tgz",
"integrity": "sha512-NXdYc3dLr47pBkpUCHtKSwIOQXLVn8dZEuywboCOJY/osA0wFSLlSawr3KN8qXJEyX66FcONTH8EIlVuK0yyFA==",
"license": "MIT"
},
"node_modules/debug": {
"version": "2.6.9",
"resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
"integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
"license": "MIT",
"dependencies": {
"ms": "2.0.0"
}
},
"node_modules/depd": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz",
"integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==",
"license": "MIT",
"engines": {
"node": ">= 0.8"
}
},
"node_modules/destroy": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz",
"integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==",
"license": "MIT",
"engines": {
"node": ">= 0.8",
"npm": "1.2.8000 || >= 1.4.16"
}
},
"node_modules/dunder-proto": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz",
"integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==",
"license": "MIT",
"dependencies": {
"call-bind-apply-helpers": "^1.0.1",
"es-errors": "^1.3.0",
"gopd": "^1.2.0"
},
"engines": {
"node": ">= 0.4"
}
},
"node_modules/ee-first": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz",
"integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==",
"license": "MIT"
},
"node_modules/encodeurl": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-2.0.0.tgz",
"integrity": "sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg==",
"license": "MIT",
"engines": {
"node": ">= 0.8"
}
},
"node_modules/es-define-property": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz",
"integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==",
"license": "MIT",
"engines": {
"node": ">= 0.4"
}
},
"node_modules/es-errors": {
"version": "1.3.0",
"resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz",
"integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==",
"license": "MIT",
"engines": {
"node": ">= 0.4"
}
},
"node_modules/es-object-atoms": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.2.tgz",
"integrity": "sha512-HWcBoN6NileqtSydK2FqHbS/LoDd2pqrnQHLyJzBj4kOp/ky2MWMN694xOfkK8/SnUsW2DH7EfyVlydKCsm1Zw==",
"license": "MIT",
"dependencies": {
"es-errors": "^1.3.0"
},
"engines": {
"node": ">= 0.4"
}
},
"node_modules/escape-html": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz",
"integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==",
"license": "MIT"
},
"node_modules/etag": {
"version": "1.8.1",
"resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz",
"integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==",
"license": "MIT",
"engines": {
"node": ">= 0.6"
}
},
"node_modules/express": {
"version": "4.22.2",
"resolved": "https://registry.npmjs.org/express/-/express-4.22.2.tgz",
"integrity": "sha512-IuL+Elrou2ZvCFHs18/CIzy2Nzvo25nZ1/D2eIZlz7c+QUayAcYoiM2BthCjs+EBHVpjYjcuLDAiCWgeIX3X1Q==",
"license": "MIT",
"dependencies": {
"accepts": "~1.3.8",
"array-flatten": "1.1.1",
"body-parser": "~1.20.5",
"content-disposition": "~0.5.4",
"content-type": "~1.0.4",
"cookie": "~0.7.1",
"cookie-signature": "~1.0.6",
"debug": "2.6.9",
"depd": "2.0.0",
"encodeurl": "~2.0.0",
"escape-html": "~1.0.3",
"etag": "~1.8.1",
"finalhandler": "~1.3.1",
"fresh": "~0.5.2",
"http-errors": "~2.0.0",
"merge-descriptors": "1.0.3",
"methods": "~1.1.2",
"on-finished": "~2.4.1",
"parseurl": "~1.3.3",
"path-to-regexp": "~0.1.12",
"proxy-addr": "~2.0.7",
"qs": "~6.15.1",
"range-parser": "~1.2.1",
"safe-buffer": "5.2.1",
"send": "~0.19.0",
"serve-static": "~1.16.2",
"setprototypeof": "1.2.0",
"statuses": "~2.0.1",
"type-is": "~1.6.18",
"utils-merge": "1.0.1",
"vary": "~1.1.2"
},
"engines": {
"node": ">= 0.10.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/express"
}
},
"node_modules/finalhandler": {
"version": "1.3.2",
"resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.3.2.tgz",
"integrity": "sha512-aA4RyPcd3badbdABGDuTXCMTtOneUCAYH/gxoYRTZlIJdF0YPWuGqiAsIrhNnnqdXGswYk6dGujem4w80UJFhg==",
"license": "MIT",
"dependencies": {
"debug": "2.6.9",
"encodeurl": "~2.0.0",
"escape-html": "~1.0.3",
"on-finished": "~2.4.1",
"parseurl": "~1.3.3",
"statuses": "~2.0.2",
"unpipe": "~1.0.0"
},
"engines": {
"node": ">= 0.8"
}
},
"node_modules/forwarded": {
"version": "0.2.0",
"resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz",
"integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==",
"license": "MIT",
"engines": {
"node": ">= 0.6"
}
},
"node_modules/fresh": {
"version": "0.5.2",
"resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz",
"integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==",
"license": "MIT",
"engines": {
"node": ">= 0.6"
}
},
"node_modules/function-bind": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz",
"integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==",
"license": "MIT",
"funding": {
"url": "https://github.com/sponsors/ljharb"
}
},
"node_modules/get-intrinsic": {
"version": "1.3.0",
"resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz",
"integrity": "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==",
"license": "MIT",
"dependencies": {
"call-bind-apply-helpers": "^1.0.2",
"es-define-property": "^1.0.1",
"es-errors": "^1.3.0",
"es-object-atoms": "^1.1.1",
"function-bind": "^1.1.2",
"get-proto": "^1.0.1",
"gopd": "^1.2.0",
"has-symbols": "^1.1.0",
"hasown": "^2.0.2",
"math-intrinsics": "^1.1.0"
},
"engines": {
"node": ">= 0.4"
},
"funding": {
"url": "https://github.com/sponsors/ljharb"
}
},
"node_modules/get-proto": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz",
"integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==",
"license": "MIT",
"dependencies": {
"dunder-proto": "^1.0.1",
"es-object-atoms": "^1.0.0"
},
"engines": {
"node": ">= 0.4"
}
},
"node_modules/gopd": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz",
"integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==",
"license": "MIT",
"engines": {
"node": ">= 0.4"
},
"funding": {
"url": "https://github.com/sponsors/ljharb"
}
},
"node_modules/has-symbols": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz",
"integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==",
"license": "MIT",
"engines": {
"node": ">= 0.4"
},
"funding": {
"url": "https://github.com/sponsors/ljharb"
}
},
"node_modules/hasown": {
"version": "2.0.4",
"resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.4.tgz",
"integrity": "sha512-T2UbfbBEF32wiepXIsMlTW9+dDYC6wMh/t/vYA4tuOMKqWz/n3vr1NFSxQiyP+zk2mXsoMA/i/7qV6LKut1t1A==",
"license": "MIT",
"dependencies": {
"function-bind": "^1.1.2"
},
"engines": {
"node": ">= 0.4"
}
},
"node_modules/http-errors": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.1.tgz",
"integrity": "sha512-4FbRdAX+bSdmo4AUFuS0WNiPz8NgFt+r8ThgNWmlrjQjt1Q7ZR9+zTlce2859x4KSXrwIsaeTqDoKQmtP8pLmQ==",
"license": "MIT",
"dependencies": {
"depd": "~2.0.0",
"inherits": "~2.0.4",
"setprototypeof": "~1.2.0",
"statuses": "~2.0.2",
"toidentifier": "~1.0.1"
},
"engines": {
"node": ">= 0.8"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/express"
}
},
"node_modules/iconv-lite": {
"version": "0.4.24",
"resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz",
"integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==",
"license": "MIT",
"dependencies": {
"safer-buffer": ">= 2.1.2 < 3"
},
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/inherits": {
"version": "2.0.4",
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
"integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==",
"license": "ISC"
},
"node_modules/ipaddr.js": {
"version": "1.9.1",
"resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz",
"integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==",
"license": "MIT",
"engines": {
"node": ">= 0.10"
}
},
"node_modules/math-intrinsics": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz",
"integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==",
"license": "MIT",
"engines": {
"node": ">= 0.4"
}
},
"node_modules/media-typer": {
"version": "0.3.0",
"resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz",
"integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==",
"license": "MIT",
"engines": {
"node": ">= 0.6"
}
},
"node_modules/merge-descriptors": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.3.tgz",
"integrity": "sha512-gaNvAS7TZ897/rVaZ0nMtAyxNyi/pdbjbAwUpFQpN70GqnVfOiXpeUUMKRBmzXaSQ8DdTX4/0ms62r2K+hE6mQ==",
"license": "MIT",
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/methods": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz",
"integrity": "sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==",
"license": "MIT",
"engines": {
"node": ">= 0.6"
}
},
"node_modules/mime": {
"version": "1.6.0",
"resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz",
"integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==",
"license": "MIT",
"bin": {
"mime": "cli.js"
},
"engines": {
"node": ">=4"
}
},
"node_modules/mime-db": {
"version": "1.52.0",
"resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz",
"integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==",
"license": "MIT",
"engines": {
"node": ">= 0.6"
}
},
"node_modules/mime-types": {
"version": "2.1.35",
"resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz",
"integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==",
"license": "MIT",
"dependencies": {
"mime-db": "1.52.0"
},
"engines": {
"node": ">= 0.6"
}
},
"node_modules/ms": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
"integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==",
"license": "MIT"
},
"node_modules/negotiator": {
"version": "0.6.3",
"resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz",
"integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==",
"license": "MIT",
"engines": {
"node": ">= 0.6"
}
},
"node_modules/object-inspect": {
"version": "1.13.4",
"resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.4.tgz",
"integrity": "sha512-W67iLl4J2EXEGTbfeHCffrjDfitvLANg0UlX3wFUUSTx92KXRFegMHUVgSqE+wvhAbi4WqjGg9czysTV2Epbew==",
"license": "MIT",
"engines": {
"node": ">= 0.4"
},
"funding": {
"url": "https://github.com/sponsors/ljharb"
}
},
"node_modules/on-finished": {
"version": "2.4.1",
"resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz",
"integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==",
"license": "MIT",
"dependencies": {
"ee-first": "1.1.1"
},
"engines": {
"node": ">= 0.8"
}
},
"node_modules/parseurl": {
"version": "1.3.3",
"resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz",
"integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==",
"license": "MIT",
"engines": {
"node": ">= 0.8"
}
},
"node_modules/path-to-regexp": {
"version": "0.1.13",
"resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.13.tgz",
"integrity": "sha512-A/AGNMFN3c8bOlvV9RreMdrv7jsmF9XIfDeCd87+I8RNg6s78BhJxMu69NEMHBSJFxKidViTEdruRwEk/WIKqA==",
"license": "MIT"
},
"node_modules/proxy-addr": {
"version": "2.0.7",
"resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz",
"integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==",
"license": "MIT",
"dependencies": {
"forwarded": "0.2.0",
"ipaddr.js": "1.9.1"
},
"engines": {
"node": ">= 0.10"
}
},
"node_modules/qs": {
"version": "6.15.3",
"resolved": "https://registry.npmjs.org/qs/-/qs-6.15.3.tgz",
"integrity": "sha512-O9gl3zCl5h5blw1KGUzQKhA5oUXSl8rwUIM5o0S3nCXMliSvy5Dzx7/DJcI+SwgICv+IneSZwhBh1oSyEHA71A==",
"license": "BSD-3-Clause",
"dependencies": {
"es-define-property": "^1.0.1",
"side-channel": "^1.1.1"
},
"engines": {
"node": ">=0.6"
},
"funding": {
"url": "https://github.com/sponsors/ljharb"
}
},
"node_modules/range-parser": {
"version": "1.2.1",
"resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz",
"integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==",
"license": "MIT",
"engines": {
"node": ">= 0.6"
}
},
"node_modules/raw-body": {
"version": "2.5.3",
"resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.3.tgz",
"integrity": "sha512-s4VSOf6yN0rvbRZGxs8Om5CWj6seneMwK3oDb4lWDH0UPhWcxwOWw5+qk24bxq87szX1ydrwylIOp2uG1ojUpA==",
"license": "MIT",
"dependencies": {
"bytes": "~3.1.2",
"http-errors": "~2.0.1",
"iconv-lite": "~0.4.24",
"unpipe": "~1.0.0"
},
"engines": {
"node": ">= 0.8"
}
},
"node_modules/safe-buffer": {
"version": "5.2.1",
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz",
"integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==",
"funding": [
{
"type": "github",
"url": "https://github.com/sponsors/feross"
},
{
"type": "patreon",
"url": "https://www.patreon.com/feross"
},
{
"type": "consulting",
"url": "https://feross.org/support"
}
],
"license": "MIT"
},
"node_modules/safer-buffer": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",
"integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==",
"license": "MIT"
},
"node_modules/send": {
"version": "0.19.2",
"resolved": "https://registry.npmjs.org/send/-/send-0.19.2.tgz",
"integrity": "sha512-VMbMxbDeehAxpOtWJXlcUS5E8iXh6QmN+BkRX1GARS3wRaXEEgzCcB10gTQazO42tpNIya8xIyNx8fll1OFPrg==",
"license": "MIT",
"dependencies": {
"debug": "2.6.9",
"depd": "2.0.0",
"destroy": "1.2.0",
"encodeurl": "~2.0.0",
"escape-html": "~1.0.3",
"etag": "~1.8.1",
"fresh": "~0.5.2",
"http-errors": "~2.0.1",
"mime": "1.6.0",
"ms": "2.1.3",
"on-finished": "~2.4.1",
"range-parser": "~1.2.1",
"statuses": "~2.0.2"
},
"engines": {
"node": ">= 0.8.0"
}
},
"node_modules/send/node_modules/ms": {
"version": "2.1.3",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
"integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
"license": "MIT"
},
"node_modules/serve-static": {
"version": "1.16.3",
"resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.16.3.tgz",
"integrity": "sha512-x0RTqQel6g5SY7Lg6ZreMmsOzncHFU7nhnRWkKgWuMTu5NN0DR5oruckMqRvacAN9d5w6ARnRBXl9xhDCgfMeA==",
"license": "MIT",
"dependencies": {
"encodeurl": "~2.0.0",
"escape-html": "~1.0.3",
"parseurl": "~1.3.3",
"send": "~0.19.1"
},
"engines": {
"node": ">= 0.8.0"
}
},
"node_modules/setprototypeof": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz",
"integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==",
"license": "ISC"
},
"node_modules/side-channel": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.1.1.tgz",
"integrity": "sha512-6x6dK6zJdpTzF4sQeNYxwtvBzf6Eg4GtlesS94HOvTudUeyK2WXAaIfmDgsyslYrRBeFIlsi54AYsFGUuhmvrQ==",
"license": "MIT",
"dependencies": {
"es-errors": "^1.3.0",
"object-inspect": "^1.13.4",
"side-channel-list": "^1.0.1",
"side-channel-map": "^1.0.1",
"side-channel-weakmap": "^1.0.2"
},
"engines": {
"node": ">= 0.4"
},
"funding": {
"url": "https://github.com/sponsors/ljharb"
}
},
"node_modules/side-channel-list": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/side-channel-list/-/side-channel-list-1.0.1.tgz",
"integrity": "sha512-mjn/0bi/oUURjc5Xl7IaWi/OJJJumuoJFQJfDDyO46+hBWsfaVM65TBHq2eoZBhzl9EchxOijpkbRC8SVBQU0w==",
"license": "MIT",
"dependencies": {
"es-errors": "^1.3.0",
"object-inspect": "^1.13.4"
},
"engines": {
"node": ">= 0.4"
},
"funding": {
"url": "https://github.com/sponsors/ljharb"
}
},
"node_modules/side-channel-map": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/side-channel-map/-/side-channel-map-1.0.1.tgz",
"integrity": "sha512-VCjCNfgMsby3tTdo02nbjtM/ewra6jPHmpThenkTYh8pG9ucZ/1P8So4u4FGBek/BjpOVsDCMoLA/iuBKIFXRA==",
"license": "MIT",
"dependencies": {
"call-bound": "^1.0.2",
"es-errors": "^1.3.0",
"get-intrinsic": "^1.2.5",
"object-inspect": "^1.13.3"
},
"engines": {
"node": ">= 0.4"
},
"funding": {
"url": "https://github.com/sponsors/ljharb"
}
},
"node_modules/side-channel-weakmap": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/side-channel-weakmap/-/side-channel-weakmap-1.0.2.tgz",
"integrity": "sha512-WPS/HvHQTYnHisLo9McqBHOJk2FkHO/tlpvldyrnem4aeQp4hai3gythswg6p01oSoTl58rcpiFAjF2br2Ak2A==",
"license": "MIT",
"dependencies": {
"call-bound": "^1.0.2",
"es-errors": "^1.3.0",
"get-intrinsic": "^1.2.5",
"object-inspect": "^1.13.3",
"side-channel-map": "^1.0.1"
},
"engines": {
"node": ">= 0.4"
},
"funding": {
"url": "https://github.com/sponsors/ljharb"
}
},
"node_modules/statuses": {
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.2.tgz",
"integrity": "sha512-DvEy55V3DB7uknRo+4iOGT5fP1slR8wQohVdknigZPMpMstaKJQWhwiYBACJE3Ul2pTnATihhBYnRhZQHGBiRw==",
"license": "MIT",
"engines": {
"node": ">= 0.8"
}
},
"node_modules/toidentifier": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz",
"integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==",
"license": "MIT",
"engines": {
"node": ">=0.6"
}
},
"node_modules/type-is": {
"version": "1.6.18",
"resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz",
"integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==",
"license": "MIT",
"dependencies": {
"media-typer": "0.3.0",
"mime-types": "~2.1.24"
},
"engines": {
"node": ">= 0.6"
}
},
"node_modules/unpipe": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz",
"integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==",
"license": "MIT",
"engines": {
"node": ">= 0.8"
}
},
"node_modules/utils-merge": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz",
"integrity": "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==",
"license": "MIT",
"engines": {
"node": ">= 0.4.0"
}
},
"node_modules/vary": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz",
"integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==",
"license": "MIT",
"engines": {
"node": ">= 0.8"
}
}
}
}
+16
View File
@@ -0,0 +1,16 @@
{
"name": "miles-share-server",
"version": "1.0.0",
"description": "Node server for miles' share page — editable now status, latest posts, timezone, dark mode.",
"main": "server.js",
"type": "commonjs",
"scripts": {
"start": "node server.js"
},
"engines": {
"node": ">=18"
},
"dependencies": {
"express": "^4.22.2"
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

+127
View File
@@ -0,0 +1,127 @@
const express = require('express');
const fs = require('fs');
const path = require('path');
const crypto = require('crypto');
const app = express();
const PORT = process.env.PORT || 3000;
// NOTE: set ADMIN_TOKEN to a secret in your environment before running in production.
// Example: ADMIN_TOKEN="s3cret" node server.js
const ADMIN_TOKEN = process.env.ADMIN_TOKEN || 'change-me';
const DATA_DIR = path.join(__dirname, 'data');
const DATA_FILE = path.join(DATA_DIR, 'data.json');
let DB = loadData();
function loadData() {
try {
const raw = fs.readFileSync(DATA_FILE, 'utf8');
return JSON.parse(raw);
} catch (e) {
const defaults = {
profile: {},
timezone: { id: 'America/Chicago', label: 'Central Time (MN, USA)' },
now: [],
posts: []
};
saveData(defaults);
return defaults;
}
}
function saveData(db) {
fs.mkdirSync(DATA_DIR, { recursive: true });
fs.writeFileSync(DATA_FILE, JSON.stringify(db, null, 2), 'utf8');
}
function mustAuth(req) {
const header = (req.headers.authorization || '').replace(/^Bearer\s+/i, '');
return header && safeEqual(header, ADMIN_TOKEN);
}
function safeEqual(a, b) {
const ha = crypto.createHash('sha256').update(String(a)).digest();
const hb = crypto.createHash('sha256').update(String(b)).digest();
return ha.length === hb.length && crypto.timingSafeEqual(ha, hb);
}
app.use(express.json({ limit: '256kb' }));
app.use('/static', express.static(path.join(__dirname, 'public')));
app.get('/api/data', (req, res) => {
res.json(DB);
});
app.post('/api/data', (req, res) => {
if (!mustAuth(req)) return res.status(401).json({ error: 'unauthorized' });
const body = req.body || {};
const next = {};
if (body.profile) next.profile = sanitizeProfile(body.profile);
if (body.timezone) next.timezone = sanitizeTimezone(body.timezone);
if (body.now !== undefined) next.now = sanitizeNow(body.now);
if (body.posts !== undefined) next.posts = sanitizePosts(body.posts);
if (Object.keys(next).length === 0) return res.status(400).json({ error: 'nothing to update' });
DB = { ...DB, ...next };
saveData(DB);
res.json({ ok: true, data: DB });
});
function sanitizeProfile(p) {
return {
name: str(p.name, ''),
handle: str(p.handle, ''),
meta: str(p.meta, ''),
bio: str(p.bio, ''),
avatar: str(p.avatar, ''),
website: str(p.website, '')
};
}
function sanitizeTimezone(t) {
return { id: str(t.id, 'America/Chicago'), label: str(t.label, '') };
}
function sanitizeNow(n) {
if (!Array.isArray(n)) return [];
return n
.filter((x) => Array.isArray(x) && x.length >= 2)
.map((x) => [str(x[0], ''),
str(x[1], '')])
.filter((x) => x[0] || x[1]);
}
function sanitizePosts(ps) {
if (!Array.isArray(ps)) return [];
return ps
.filter((x) => x && typeof x === 'object')
.map((x) => ({
title: str(x.title, ''),
body: str(x.body, ''),
date: str(x.date, ''),
link: str(x.link, '')
}))
.filter((x) => x.title);
}
function str(v, dflt) {
return typeof v === 'string' ? v.slice(0, 2000) : dflt;
}
app.get('/admin', (req, res) => {
const html = fs.readFileSync(path.join(__dirname, 'views', 'admin.html'), 'utf8');
res.set('Content-Type', 'text/html');
res.send(html.replace('{{DATA}}', JSON.stringify(DB)));
});
app.get('/', (req, res) => {
const html = fs.readFileSync(path.join(__dirname, 'views', 'share.html'), 'utf8');
res.set('Content-Type', 'text/html');
res.send(html.replace('{{DATA}}', JSON.stringify(DB)));
});
app.listen(PORT, () => {
console.log(`share server running on http://localhost:${PORT}`);
console.log(`admin page: http://localhost:${PORT}/admin`);
console.log(`api: http://localhost:${PORT}/api/data`);
});
+224
View File
@@ -0,0 +1,224 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Edit — share page</title>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap" rel="stylesheet">
<script>window.__DATA__ = {{DATA}};</script>
<style>
:root{--page:#0f1116;--card:#1a1d24;--card2:#22262f;--border:#2a2f3a;--text:#e8eaee;--muted:#9aa3b2;--accent:#1d9bf0;--danger:#ef4444;--ok:#22c55e;}
*{box-sizing:border-box;}
body{margin:0;padding:40px 16px 80px;background:var(--page);color:var(--text);font-family:'Inter',system-ui,sans-serif;-webkit-font-smoothing:antialiased;line-height:1.5;}
.wrap{max-width:680px;margin:0 auto;}
h1{font-size:24px;margin:0 0 4px;}
.sub{color:var(--muted);font-size:13px;margin-bottom:28px;}
.card{background:var(--card);border:1px solid var(--border);border-radius:14px;padding:20px;margin-bottom:20px;}
.card h2{font-size:14px;text-transform:uppercase;letter-spacing:.08em;color:var(--muted);margin:0 0 16px;}
label{display:block;font-size:12px;font-weight:600;color:var(--muted);margin:12px 0 4px;}
input[type=text],textarea,select{width:100%;padding:9px 11px;background:var(--card2);border:1px solid var(--border);border-radius:8px;color:var(--text);font-family:inherit;font-size:14px;}
textarea{resize:vertical;min-height:64px;}
.hint{font-size:11px;color:var(--muted);margin:4px 0 0;}
.row-item{display:grid;grid-template-columns:1fr 1fr auto;gap:8px;margin-bottom:8px;align-items:center;}
.row-item input{width:100%;}
.del{width:34px;height:34px;border-radius:8px;border:1px solid var(--border);background:var(--card2);color:var(--danger);cursor:pointer;font-size:16px;line-height:1;}
.add{width:100%;padding:9px;border-radius:8px;border:1px dashed var(--border);background:transparent;color:var(--accent);cursor:pointer;font-size:13px;font-weight:600;}
.post-item{border:1px solid var(--border);border-radius:10px;padding:12px;margin-bottom:10px;background:var(--card2);}
.post-item .p-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px;}
.post-item .p-head b{font-size:13px;color:var(--muted);}
.bar{display:flex;gap:10px;align-items:center;justify-content:space-between;flex-wrap:wrap;}
.bar .token{display:flex;gap:8px;flex:1;min-width:200px;}
.bar input{flex:1;}
.btn{font-family:inherit;font-size:13px;font-weight:700;padding:10px 18px;border-radius:10px;cursor:pointer;border:1px solid var(--border);background:var(--card2);color:var(--text);}
.btn.primary{background:var(--accent);border-color:var(--accent);color:#fff;}
.status{font-size:13px;font-weight:600;}
.status.ok{color:var(--ok);} .status.err{color:var(--danger);}
.top-link{color:var(--accent);font-size:13px;text-decoration:none;margin-bottom:20px;display:inline-block;}
.top-link:hover{text-decoration:underline;}
</style>
</head>
<body>
<div class="wrap">
<a class="top-link" href="/">← View page</a>
<h1>Edit share page</h1>
<p class="sub">Changes save to the server's data file. Keep this link private.</p>
<div class="card">
<h2>Profile</h2>
<label>Name</label><input type="text" id="f-name">
<label>Handle</label><input type="text" id="f-handle">
<label>Meta (pronouns · location)</label><input type="text" id="f-meta">
<label>Bio</label><textarea id="f-bio"></textarea>
<label>Avatar URL</label><input type="text" id="f-avatar">
<label>Website</label><input type="text" id="f-website">
</div>
<div class="card">
<h2>Now (current status)</h2>
<div id="now-list"></div>
<button class="add" id="add-now" type="button">+ Add a "now" line</button>
</div>
<div class="card">
<h2>Timezone</h2>
<label>IANA timezone id</label><input type="text" id="f-tzid">
<p class="hint">e.g. America/Chicago, America/Los_Angeles, Europe/London</p>
<label>Label shown</label><input type="text" id="f-tzlabel">
</div>
<div class="card">
<h2>Latest posts</h2>
<div id="post-list"></div>
<button class="add" id="add-post" type="button">+ Add a post</button>
</div>
<div class="bar">
<div class="token">
<input type="password" id="f-token" placeholder="Admin token">
<button class="btn primary" id="save" type="button">Save</button>
</div>
<span class="status" id="status"></span>
</div>
</div>
<script>
(function () {
var data = JSON.parse(JSON.stringify(window.__DATA__ || {}));
data.profile = data.profile || {};
data.timezone = data.timezone || {};
data.now = data.now || [];
data.posts = data.posts || [];
var nowList = document.getElementById('now-list');
var postList = document.getElementById('post-list');
function oneNow(item) {
var div = document.createElement('div');
div.className = 'row-item';
div.innerHTML = '<input type="text" placeholder="Label (Learning/Building/Playing)">' +
'<input type="text" placeholder="Value">' +
'<button class="del" type="button" aria-label="Remove">×</button>';
div.children[0].value = item[0] || '';
div.children[1].value = item[1] || '';
div.children[2].addEventListener('click', function () { div.remove(); });
return div;
}
function renderNow() {
nowList.innerHTML = '';
(data.now.length ? data.now : [['', '']]).forEach(function (item) {
nowList.appendChild(oneNow(item));
});
}
document.getElementById('add-now').addEventListener('click', function () {
nowList.appendChild(oneNow(['', '']));
});
function onePost(p) {
var div = document.createElement('div');
div.className = 'post-item';
div.innerHTML =
'<div class="p-head"><b>Post</b><button class="del" type="button" aria-label="Remove post">×</button></div>' +
'<label>Title</label><input type="text" class="p-title">' +
'<label>Body</label><textarea class="p-body"></textarea>' +
'<label>Date (YYYY-MM-DD)</label><input type="text" class="p-date" placeholder="2026-08-24">' +
'<label>Link (optional)</label><input type="text" class="p-link" placeholder="https://...">';
div.querySelector('.p-title').value = p.title || '';
div.querySelector('.p-body').value = p.body || '';
div.querySelector('.p-date').value = p.date || '';
div.querySelector('.p-link').value = p.link || '';
div.querySelector('.del').addEventListener('click', function () { div.remove(); });
return div;
}
function renderPosts() {
postList.innerHTML = '';
(data.posts.length ? data.posts : [{}]).forEach(function (p) {
postList.appendChild(onePost(p));
});
}
document.getElementById('add-post').addEventListener('click', function () {
postList.appendChild(onePost({}));
});
function fill() {
var p = data.profile;
document.getElementById('f-name').value = p.name || '';
document.getElementById('f-handle').value = p.handle || '';
document.getElementById('f-meta').value = p.meta || '';
document.getElementById('f-bio').value = p.bio || '';
document.getElementById('f-avatar').value = p.avatar || '';
document.getElementById('f-website').value = p.website || '';
document.getElementById('f-tzid').value = data.timezone.id || 'America/Chicago';
document.getElementById('f-tzlabel').value = data.timezone.label || '';
renderNow();
renderPosts();
}
function collect() {
var now = [];
nowList.querySelectorAll('.row-item').forEach(function (r) {
var k = r.children[0].value.trim();
var v = r.children[1].value.trim();
if (v) now.push([k, v]);
});
var posts = [];
postList.querySelectorAll('.post-item').forEach(function (d) {
var title = d.querySelector('.p-title').value.trim();
if (title) posts.push({
title: title,
body: d.querySelector('.p-body').value.trim(),
date: d.querySelector('.p-date').value.trim(),
link: d.querySelector('.p-link').value.trim()
});
});
return {
profile: {
name: document.getElementById('f-name').value.trim(),
handle: document.getElementById('f-handle').value.trim(),
meta: document.getElementById('f-meta').value.trim(),
bio: document.getElementById('f-bio').value.trim(),
avatar: document.getElementById('f-avatar').value.trim(),
website: document.getElementById('f-website').value.trim()
},
timezone: {
id: document.getElementById('f-tzid').value.trim(),
label: document.getElementById('f-tzlabel').value.trim()
},
now: now,
posts: posts
};
}
var statusEl = document.getElementById('status');
document.getElementById('save').addEventListener('click', function () {
var token = document.getElementById('f-token').value.trim();
if (!token) { setStatus('Enter the admin token', 'err'); return; }
var body = collect();
setStatus('Saving…', '');
fetch('/api/data', {
method: 'POST',
headers: { 'Content-Type': 'application/json', 'Authorization': 'Bearer ' + token },
body: JSON.stringify(body)
}).then(function (r) {
if (r.status === 401) { setStatus('Wrong token', 'err'); throw new Error('unauthorized'); }
if (!r.ok) { setStatus('Save failed (' + r.status + ')', 'err'); throw new Error('bad'); }
return r.json();
}).then(function (r) {
data = r.data;
setStatus('Saved ✓', 'ok');
}).catch(function (e) {
if (e && e.message === 'unauthorized') return;
if (e && e.message !== 'bad') setStatus('Network error', 'err');
});
});
function setStatus(txt, cls) {
statusEl.textContent = txt;
statusEl.className = 'status ' + cls;
}
fill();
})();
</script>
</body>
</html>
+320
View File
@@ -0,0 +1,320 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>miles wolf allen</title>
<meta name="description" content="miles wolf allen — Software engineer. Developer and 3D artist interested in coding, games, and web technology. Currently learning Rust.">
<meta name="author" content="Miles Wolf Allen">
<link rel="canonical" href="https://milesallen.site/share.html">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap" rel="stylesheet">
<script>window.__DATA__ = {{DATA}};</script>
<style>
:root{
--page:#111318;
--card:#1a1d24;
--card2:#20242d;
--border:#2a2f3a;
--text:#e8eaee;
--muted:#9aa3b2;
--accent:#1d9bf0;
--chip:#2a3140;
--danger:#ef4444;
--ok:#22c55e;
color-scheme:dark;
}
html.light{
--page:#eef1f5;--card:#ffffff;--card2:#f7f9fb;--border:#e3e8ee;
--text:#14161a;--muted:#647182;--accent:#1d9bf0;--chip:#e9eef5;
--danger:#dc2626;--ok:#16a34a;
color-scheme:light;
}
*{margin:0;padding:0;box-sizing:border-box;}
body{
background:var(--page);color:var(--text);
font-family:'Inter',system-ui,-apple-system,Segoe UI,Roboto,sans-serif;
-webkit-font-smoothing:antialiased;line-height:1.5;
display:flex;flex-direction:column;align-items:center;
min-height:100vh;padding:40px 20px 64px;overflow-x:hidden;
}
a{color:inherit;text-decoration:none;}
.card{width:100%;max-width:600px;background:var(--card);border:1px solid var(--border);border-radius:16px;overflow:hidden;box-shadow:0 1px 2px rgba(0,0,0,.2),0 10px 30px rgba(0,0,0,.3);}
.banner{height:160px;overflow:hidden;background:#14161b;}
.banner img{width:100%;height:100%;object-fit:cover;object-position:top center;display:block;}
.profile{padding:0 24px 12px;}
.avatar{display:block;width:120px;height:120px;border-radius:50%;border:4px solid var(--card);background:#1f232b;box-shadow:0 2px 10px rgba(0,0,0,.4);object-fit:cover;margin-top:-56px;}
.name{font-size:22px;font-weight:800;letter-spacing:-.01em;margin-top:14px;line-height:1.2;}
.handle{font-size:14px;color:var(--muted);margin-top:3px;}
.meta{font-size:13px;color:var(--muted);margin-top:8px;}
.meta b{color:var(--text);font-weight:600;}
.bio{font-size:15px;margin-top:14px;}
.bio a{color:var(--accent);}
.bio a:hover{text-decoration:underline;}
.socials{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;margin-top:18px;}
.soc{display:flex;align-items:center;justify-content:center;height:44px;border:1px solid var(--border);border-radius:12px;color:var(--muted);transition:all .15s;}
.soc svg{width:22px;height:22px;fill:currentColor;}
.soc:hover{color:var(--accent);border-color:var(--accent);background:var(--card2);transform:translateY(-2px);}
.section{border-top:1px solid var(--border);padding:20px 24px;}
.sec-title{font-size:11px;font-weight:700;letter-spacing:.09em;text-transform:uppercase;color:var(--muted);margin-bottom:12px;}
.now-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px;}
.now-item{display:flex;gap:10px;align-items:flex-start;background:var(--card2);border:1px solid var(--border);border-radius:12px;padding:12px 14px;}
.now-item .nk{font-size:10px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--accent);}
.now-item .nv{font-size:14px;font-weight:600;margin-top:3px;}
.row{display:flex;align-items:center;gap:12px;padding:13px 10px;border-radius:10px;border-bottom:1px solid var(--border);transition:background .15s;}
.section .row:last-child{border-bottom:none;}
.row:hover{background:var(--card2);}
.row .ico{width:36px;height:36px;border-radius:10px;flex-shrink:0;background:var(--chip);display:flex;align-items:center;justify-content:center;}
.row .ico svg{width:19px;height:19px;fill:var(--muted);}
.row .r-body{flex:1;min-width:0;}
.row .r-title{font-size:14px;font-weight:600;}
.row .r-right{font-size:13px;color:var(--muted);flex-shrink:0;}
.post{display:block;padding:14px 10px;border-radius:10px;border-bottom:1px solid var(--border);transition:background .15s;}
.post:hover{background:var(--card2);}
.post .p-top{display:flex;align-items:baseline;justify-content:space-between;gap:10px;}
.post .p-title{font-size:14px;font-weight:700;}
.post .p-date{font-size:12px;color:var(--muted);flex-shrink:0;}
.post .p-body{font-size:13px;color:var(--muted);margin-top:4px;}
.contact-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px;}
.cell{border:1px solid var(--border);border-radius:12px;padding:16px;transition:border-color .15s,background .15s;}
.cell:hover{border-color:var(--accent);background:var(--card2);}
.cell .ck{font-size:11px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--muted);}
.cell .cv{font-size:14px;font-weight:600;margin-top:6px;word-break:break-all;}
.cell a.cv{color:var(--accent);}
.tz{display:flex;align-items:center;justify-content:space-between;gap:12px;}
.tz .tk{font-size:11px;letter-spacing:.04em;color:var(--muted);}
.tz .tt{font-size:20px;font-weight:800;font-variant-numeric:tabular-nums;}
.tz .ts{font-size:12px;color:var(--muted);}
.share-row{display:flex;gap:10px;flex-wrap:wrap;margin-top:14px;}
.btn{font-family:inherit;font-size:13px;font-weight:700;padding:8px 16px;border-radius:999px;cursor:pointer;border:1px solid var(--border);background:var(--card);color:var(--text);transition:background .15s,border-color .15s;}
.btn:hover{background:var(--card2);}
.btn-solid{background:var(--accent);border-color:var(--accent);color:#fff;}
.btn-solid:hover{background:#1a89d8;}
.no-grav{margin-top:22px;font-size:13px;color:var(--muted);text-align:center;}
.no-grav a{color:var(--accent);font-weight:600;}
.no-grav a:hover{text-decoration:underline;}
.theme-btn{position:fixed;top:18px;right:18px;z-index:50;width:40px;height:40px;border-radius:50%;border:1px solid var(--border);background:var(--card);color:var(--text);cursor:pointer;font-size:18px;display:flex;align-items:center;justify-content:center;}
.theme-btn:hover{background:var(--card2);}
@media(max-width:520px){
body{padding:0 0 40px;}
.banner{height:120px;}
.profile{padding:0 16px 10px;}
.section{padding:18px 16px;}
.avatar{width:92px;height:92px;margin-top:-44px;}
.contact-grid{grid-template-columns:1fr;}
.now-grid{grid-template-columns:1fr 1fr;}
}
</style>
</head>
<body>
<button class="theme-btn" id="themeBtn" aria-label="Toggle theme"></button>
<div class="card">
<div class="banner">
<img src="/static/back.jpg" alt="" aria-hidden="true">
</div>
<div class="profile">
<img class="avatar" id="avatar" src="" alt="miles wolf allen" width="120" height="120">
<div class="name" id="name"></div>
<div class="handle" id="handle"></div>
<div class="meta"><span id="meta"></span> · <b id="tzLabel"></b></div>
<p class="bio" id="bio"></p>
<div class="socials">
<a class="soc" id="socBluesky" href="#" target="_blank" rel="noopener" aria-label="Bluesky">
<svg viewBox="0 0 24 24"><path d="M5.202 2.857C7.954 4.922 10.913 9.11 12 11.358c1.087-2.247 4.046-6.436 6.798-8.501C20.783 1.366 24 .213 24 3.883c0 .732-.42 6.156-.667 7.037-.856 3.061-3.978 3.842-6.755 3.37 4.854.826 6.089 3.562 3.422 6.299-5.065 5.196-7.28-1.304-7.847-2.97-.104-.305-.152-.448-.153-.327 0-.121-.05.022-.153.327-.568 1.666-2.782 8.166-7.847 2.97-2.667-2.737-1.432-5.473 3.422-6.3-2.777.473-5.899-.308-6.755-3.369C.42 10.04 0 4.615 0 3.883c0-3.67 3.217-2.517 5.202-1.026"/></svg>
</a>
<a class="soc" id="socGithub" href="#" target="_blank" rel="noopener" aria-label="GitHub">
<svg viewBox="0 0 24 24"><path d="M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12"/></svg>
</a>
<a class="soc" id="socX" href="#" target="_blank" rel="noopener" aria-label="X">
<svg viewBox="0 0 24 24"><path d="M14.234 10.162 22.977 0h-2.072l-7.591 8.824L7.251 0H.258l9.168 13.343L.258 24H2.33l8.016-9.318L16.749 24h6.993zm-2.837 3.299-.929-1.329L3.076 1.56h3.182l5.965 8.532.929 1.329 7.754 11.09h-3.182z"/></svg>
</a>
<a class="soc" id="socDiscord" href="#" target="_blank" rel="noopener" aria-label="Discord">
<svg viewBox="0 0 24 24"><path d="M20.317 4.3698a19.7913 19.7913 0 00-4.8851-1.5152.0741.0741 0 00-.0785.0371c-.211.3753-.4447.8648-.6083 1.2495-1.8447-.2762-3.68-.2762-5.4868 0-.1636-.3933-.4058-.8742-.6177-1.2495a.077.077 0 00-.0785-.037 19.7363 19.7363 0 00-4.8852 1.515.0699.0699 0 00-.0321.0277C.5334 9.0458-.319 13.5799.0992 18.0578a.0824.0824 0 00.0312.0561c2.0528 1.5076 4.0413 2.4228 5.9929 3.0294a.0777.0777 0 00.0842-.0276c.4616-.6304.8731-1.2952 1.226-1.9942a.076.076 0 00-.0416-.1057c-.6528-.2476-1.2743-.5495-1.8722-.8923a.077.077 0 01-.0076-.1277c.1258-.0943.2517-.1923.3718-.2914a.0743.0743 0 01.0776-.0105c3.9278 1.7933 8.18 1.7933 12.0614 0a.0739.0739 0 01.0785.0095c.1202.099.246.1981.3728.2924a.077.077 0 01-.0066.1276 12.2986 12.2986 0 01-1.873.8914.0766.0766 0 00-.0407.1067c.3604.698.7719 1.3628 1.225 1.9932a.076.076 0 00.0842.0286c1.961-.6067 3.9495-1.5219 6.0023-3.0294a.077.077 0 00.0313-.0552c.5004-5.177-.8382-9.6739-3.5485-13.6604a.061.061 0 00-.0312-.0286zM8.02 15.3312c-1.1825 0-2.1569-1.0857-2.1569-2.419 0-1.3332.9555-2.4189 2.157-2.4189 1.2108 0 2.1757 1.0952 2.1568 2.419 0 1.3332-.9555 2.4189-2.1569 2.4189zm7.9748 0c-1.1825 0-2.1569-1.0857-2.1569-2.419 0-1.3332.9554-2.4189 2.1569-2.4189 1.2108 0 2.1757 1.0952 2.1568 2.419 0 1.3332-.946 2.4189-2.1568 2.4189z"/></svg>
</a>
</div>
</div>
<div class="section" id="nowSection">
<div class="sec-title">Now</div>
<div class="now-grid" id="nowGrid"></div>
</div>
<div class="section" id="postsSection">
<div class="sec-title">Latest posts</div>
<div id="postsList"></div>
</div>
<div class="section">
<div class="sec-title">Contact</div>
<div class="contact-grid">
<a class="cell" href="mailto:[email protected]">
<div class="ck">Email</div>
<div class="cv">[email protected]</div>
</a>
<a class="cell" href="tel:+17633121150">
<div class="ck">Phone</div>
<div class="cv">763-312-1150</div>
</a>
</div>
<div class="section tz" style="border-top:none;padding:14px 0 0;">
<div class="tk" id="tzName">MN, USA</div>
<div>
<div class="tt" id="tzClock">--:--</div>
<div class="ts" id="tzDate"></div>
</div>
</div>
<div class="share-row">
<a class="btn" id="shareEmailBtn" href="#">Share via email</a>
<button class="btn btn-solid" id="copyBtn" type="button">Copy link</button>
</div>
</div>
</div>
<div class="no-grav">made by <a id="webLink" href="#">miles</a></div>
<script>
(function () {
var data = window.__DATA__ || {};
var themeBtn = document.getElementById('themeBtn');
// Dark mode by default, but respect an explicit saved preference.
var saved = null;
try { saved = localStorage.getItem('miles-theme'); } catch (e) {}
var theme = saved || 'dark';
applyTheme(theme);
function applyTheme(t) {
document.documentElement.classList.toggle('light', t === 'light');
themeBtn.textContent = t === 'light' ? '☀' : '☾';
}
themeBtn.addEventListener('click', function () {
var cur = document.documentElement.classList.contains('light') ? 'light' : 'dark';
var next = cur === 'light' ? 'dark' : 'light';
applyTheme(next);
try { localStorage.setItem('miles-theme', next); } catch (e) {}
});
function render(db) {
var p = db.profile || {};
var nameEl = document.getElementById('name');
nameEl.textContent = p.name || 'miles wolf allen';
document.title = (p.name || 'miles wolf allen') + ' — profile';
document.getElementById('avatar').src = p.avatar || 'https://avatars.githubusercontent.com/u/115095719?v=4';
document.getElementById('handle').textContent = p.handle || '@mileswa · software engineer';
document.getElementById('bio').textContent = p.bio || '';
var web = p.website || 'https://milesallen.site';
document.getElementById('webLink').href = web;
document.querySelector('.bio a') && document.querySelector('.bio a').setAttribute('href', web);
var tz = db.timezone || {};
document.getElementById('tzName').textContent = tz.label || 'MN, USA';
var tzId = tz.id || 'America/Chicago';
var now = document.getElementById('nowGrid');
now.innerHTML = '';
(db.now || []).forEach(function (item) {
if (!item || !item[1]) return;
var el = document.createElement('div');
el.className = 'now-item';
el.innerHTML = '<div><div class="nk">' + esc(item[0] || 'Now') + '</div><div class="nv">' + esc(item[1]) + '</div></div>';
now.appendChild(el);
});
var ns = document.getElementById('nowSection');
if ((db.now || []).length === 0) ns.style.display = 'none';
var posts = db.posts || [];
var list = document.getElementById('postsList');
list.innerHTML = '';
posts.slice(0, 6).forEach(function (post) {
var a = document.createElement('a');
a.className = 'post';
if (post.link) { a.href = post.link; a.target = '_blank'; a.rel = 'noopener'; }
var d = post.date ? esc(fmtDate(post.date)) : '';
a.innerHTML = '<div class="p-top"><span class="p-title">' + esc(post.title) + '</span><span class="p-date">' + d + '</span></div><div class="p-body">' + esc(post.body || '') + '</div>';
list.appendChild(a);
});
var ps = document.getElementById('postsSection');
if (posts.length === 0) ps.style.display = 'none';
// Share email link
document.getElementById('shareEmailBtn').href =
'mailto:?subject=' + encodeURIComponent((p.name || '').trim()) +
'&body=' + encodeURIComponent('Check out ' + (p.name || 'miles wolf allen').trim() + ': ' + location.href);
// clock
clock(tzId);
setInterval(function () { clock(tzId); }, 1000);
}
function clock(tzId) {
var d = new Date();
try {
var tf = new Intl.DateTimeFormat('en-US', { timeZone: tzId, hour: '2-digit', minute: '2-digit', second: '2-digit', hour12: true });
var df = new Intl.DateTimeFormat('en-US', { timeZone: tzId, weekday: 'short', month: 'short', day: 'numeric', year: 'numeric' });
document.getElementById('tzClock').textContent = tf.format(d);
document.getElementById('tzDate').textContent = df.format(d);
} catch (e) {
document.getElementById('tzClock').textContent = '--:--:--';
}
}
function fmtDate(s) {
try {
var d = new Date(s + (s.indexOf('T') === -1 ? 'T12:00:00' : ''));
if (isNaN(d)) return s;
return d.toLocaleDateString('en-US', { month: 'short', day: 'numeric', year: 'numeric' });
} catch (e) { return s; }
}
function esc(s) {
return String(s).replace(/[&<>"']/g, function (c) {
return { '&': '&amp;', '<': '&lt;', '>': '&gt;', '"': '&quot;', "'": '&#39;' }[c];
});
}
function refresh() {
fetch('/api/data').then(function (r) { return r.json(); }).then(render).catch(function () { render(data); });
}
render(data);
refresh();
var copyBtn = document.getElementById('copyBtn');
copyBtn.addEventListener('click', function () {
copyText(location.href, function () { flash(copyBtn, 'Copied!'); });
});
function copyText(txt, done) {
var ok = function () { done(); };
var fail = function () {
var ta = document.createElement('textarea');
ta.value = txt; ta.style.position = 'fixed'; ta.style.opacity = '0';
document.body.appendChild(ta); ta.select();
try { document.execCommand('copy'); ok(); } catch (e) { done(); }
document.body.removeChild(ta);
};
if (navigator.clipboard && window.isSecureContext) navigator.clipboard.writeText(txt).then(ok, fail);
else fail();
}
function flash(btn, txt) {
var old = btn.textContent; btn.textContent = txt; btn.disabled = true;
setTimeout(function () { btn.textContent = old; btn.disabled = false; }, 1400);
}
})();
</script>
</body>
</html>
+12 -1
View File
@@ -167,7 +167,7 @@
<img class="avatar" src="https://avatars.githubusercontent.com/u/115095719?v=4" alt="miles wolf allen" width="120" height="120"> <img class="avatar" src="https://avatars.githubusercontent.com/u/115095719?v=4" alt="miles wolf allen" width="120" height="120">
<div class="name">miles wolf allen</div> <div class="name">miles wolf allen</div>
<div class="handle">@wolf_reaper90 · software engineer</div> <div class="handle">@wolf_reaper90 · software engineer</div>
<div class="meta">he/him · <b>MN, USA</b></div> <div class="meta">he/him · <b>MN, USA</b> · <span id="tzWatch">local time --:--:--</span></div>
<p class="bio">Developer and 3D artist interested in coding, games, and web technology. Currently learning Rust. <a href="https://milesallen.site">↗ milesallen.site</a></p> <p class="bio">Developer and 3D artist interested in coding, games, and web technology. Currently learning Rust. <a href="https://milesallen.site">↗ milesallen.site</a></p>
@@ -274,6 +274,17 @@
flash(vcBtn, 'Saved!'); flash(vcBtn, 'Saved!');
}); });
function tzClock(){
var d = new Date(), tf;
try {
tf = new Intl.DateTimeFormat('en-US', { timeZone:'America/Chicago', hour:'2-digit', minute:'2-digit', hour12:true });
} catch(e){ return; }
var w = document.getElementById('tzWatch');
if(w) w.textContent = 'local time ' + tf.format(d);
}
tzClock();
setInterval(tzClock, 30000);
function copyText(txt, btn, done){ function copyText(txt, btn, done){
var ok = function(){ if(done) done(); }; var ok = function(){ if(done) done(); };
var fail = function(){ var fail = function(){