From 011c123f8fc597d88d92f64b9171ad96e4cd8745 Mon Sep 17 00:00:00 2001 From: zoop Date: Tue, 8 Sep 2026 21:37:02 -0400 Subject: [PATCH] tons o changes --- .dev.vars.example | 3 + astro.config.mjs | 2 + package-lock.json | 116 ++++++++++ package.json | 4 + public/badges/kevadesu.gif | Bin 0 -> 961 bytes public/badges/ro-er.gif | Bin 0 -> 1144 bytes src/components/Buttons.astro | 9 +- src/components/Clock.astro | 91 ++++++++ src/components/CopyText.astro | 11 +- src/components/Music.astro | 109 +++++++--- src/components/Reading.astro | 383 ++++++++++++++++++++++++++++++++++ src/components/Webrings.astro | 20 +- src/data/site.ts | 4 +- src/icons/README.md | 1 + src/layouts/Base.astro | 2 + src/pages/api/reading.json.ts | 130 ++++++++++++ src/pages/index.astro | 14 +- src/scripts/hash-dialog.ts | 46 ++++ src/scripts/music.ts | 16 +- src/scripts/reading.ts | 112 ++++++++++ src/styles/global.css | 53 ++++- 21 files changed, 1061 insertions(+), 65 deletions(-) create mode 100644 public/badges/kevadesu.gif create mode 100644 public/badges/ro-er.gif create mode 100644 src/components/Clock.astro create mode 100644 src/components/Reading.astro create mode 100644 src/icons/README.md create mode 100644 src/pages/api/reading.json.ts create mode 100644 src/scripts/hash-dialog.ts create mode 100644 src/scripts/reading.ts diff --git a/.dev.vars.example b/.dev.vars.example index b320bfe..d5e8a1f 100644 --- a/.dev.vars.example +++ b/.dev.vars.example @@ -12,3 +12,6 @@ SESSION_SECRET= SPOTIFY_CLIENT_ID= SPOTIFY_CLIENT_SECRET= SPOTIFY_REFRESH_TOKEN= + +# currently-reading widget — personal token from https://hardcover.app/account/api +HARDCOVER_TOKEN= diff --git a/astro.config.mjs b/astro.config.mjs index 87eea06..8ff9479 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -1,9 +1,11 @@ import { defineConfig } from 'astro/config'; import cloudflare from '@astrojs/cloudflare'; +import icon from 'astro-icon'; export default defineConfig({ output: 'server', + integrations: [icon()], adapter: cloudflare({ platformProxy: { enabled: true }, }), diff --git a/package-lock.json b/package-lock.json index 16f3394..94cd699 100644 --- a/package-lock.json +++ b/package-lock.json @@ -15,10 +15,28 @@ "astro": "^7.3.1", "wrangler": "^4.129.0" }, + "devDependencies": { + "@iconify-json/ph": "^1.2.2", + "astro-icon": "^1.2.0" + }, "engines": { "node": ">=22.12.0" } }, + "node_modules/@antfu/install-pkg": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@antfu/install-pkg/-/install-pkg-2.0.1.tgz", + "integrity": "sha512-iCKVQcIC0e3oDxEfs3SHQGW+ovhBMZmS1TE+bTk50rVyMCBmCfClv7Qi3HQKlumYwvjb/iIMeWCW2i67q6kFfQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "package-manager-detector": "^1.7.0", + "tinyexec": "^1.2.4" + }, + "funding": { + "url": "https://github.com/sponsors/antfu" + } + }, "node_modules/@astrojs/cloudflare": { "version": "14.3.0", "resolved": "https://registry.npmjs.org/@astrojs/cloudflare/-/cloudflare-14.3.0.tgz", @@ -673,6 +691,16 @@ "node": ">=12" } }, + "node_modules/@cyberalien/svg-utils": { + "version": "1.2.19", + "resolved": "https://registry.npmjs.org/@cyberalien/svg-utils/-/svg-utils-1.2.19.tgz", + "integrity": "sha512-paDJoDu+LhuH5Ma1q0BDqBpg6d16Xk22cZZrlg/s/J9oB8KgnnpU/snaEETJu2G1pwYcWQINUz6WUqu0Wm9k6A==", + "dev": true, + "license": "MIT", + "dependencies": { + "@iconify/types": "^2.0.0" + } + }, "node_modules/@emnapi/core": { "version": "1.11.3", "resolved": "https://registry.npmjs.org/@emnapi/core/-/core-1.11.3.tgz", @@ -1149,6 +1177,51 @@ "url": "https://github.com/sponsors/ayuhito" } }, + "node_modules/@iconify-json/ph": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/@iconify-json/ph/-/ph-1.2.2.tgz", + "integrity": "sha512-PgkEZNtqa8hBGjHXQa4pMwZa93hmfu8FUSjs/nv4oUU6yLsgv+gh9nu28Kqi8Fz9CCVu4hj1MZs9/60J57IzFw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@iconify/types": "*" + } + }, + "node_modules/@iconify/tools": { + "version": "5.0.14", + "resolved": "https://registry.npmjs.org/@iconify/tools/-/tools-5.0.14.tgz", + "integrity": "sha512-wJ4ZE3/HZh2iBqLwG+8FOMHe7CMJAJqwSXZSpPwMdj1gZM3Z4t2hbQMVw4Vm45oQ985qn0g89PUIcDEdKTheBA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@cyberalien/svg-utils": "^1.2.19", + "@iconify/types": "^2.0.0", + "@iconify/utils": "^3.1.4", + "fflate": "^0.8.3", + "modern-tar": "^0.8.4", + "pathe": "^2.0.3", + "svgo": "^4.1.0" + } + }, + "node_modules/@iconify/types": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@iconify/types/-/types-2.0.0.tgz", + "integrity": "sha512-+wluvCrRhXrhyOmRDJ3q8mux9JkKy5SJ/v8ol2tu4FVjyYvtEzkc/3pK15ET6RKg4b4w4BmTk1+gsCUhf21Ykg==", + "dev": true, + "license": "MIT" + }, + "node_modules/@iconify/utils": { + "version": "3.1.7", + "resolved": "https://registry.npmjs.org/@iconify/utils/-/utils-3.1.7.tgz", + "integrity": "sha512-JZHlwdID+dy+lTgbYC8NEC4zeugqeYsc6jewvzb4c58kHauJn+X7rNwQjxz5p2qSjqaEeQoLkCIQ9v/H4PK0/w==", + "dev": true, + "license": "MIT", + "dependencies": { + "@antfu/install-pkg": "^2.0.1", + "@iconify/types": "^2.0.0", + "import-meta-resolve": "^4.2.0" + } + }, "node_modules/@img/colour": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/@img/colour/-/colour-1.1.0.tgz", @@ -2366,6 +2439,21 @@ } } }, + "node_modules/astro-icon": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/astro-icon/-/astro-icon-1.2.0.tgz", + "integrity": "sha512-0848V2WZuTPhqGSqLeZimLJZ5wmamMtWYzvA2kvg8s2DrUPZ3/nrTcHJWN0eJHt62jy7uvNxgTNiUJGIr7JNxg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@iconify/tools": "^5.0.12", + "@iconify/types": "^2.0.0", + "@iconify/utils": "^3.1.4" + }, + "engines": { + "node": ">=22.12.0" + } + }, "node_modules/axobject-query": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/axobject-query/-/axobject-query-4.1.0.tgz", @@ -2839,6 +2927,13 @@ } } }, + "node_modules/fflate": { + "version": "0.8.3", + "resolved": "https://registry.npmjs.org/fflate/-/fflate-0.8.3.tgz", + "integrity": "sha512-tbZNuJrLwGUp3zshBtdy4W+ORxZuIh8a5ilyIEQDC5rY1f3U20JMry0Ll3WBzU58EZKsEuJFXhb5gwv8CsPvgA==", + "dev": true, + "license": "MIT" + }, "node_modules/find-proc": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/find-proc/-/find-proc-0.1.0.tgz", @@ -2988,6 +3083,17 @@ "integrity": "sha512-dTxcvPXqPvXBQpq5dUr6mEMJX4oIEFv6bwom3FDwKRDsuIjjJGANqhBuoAn9c1RQJIdAKav33ED65E2ys+87QQ==", "license": "BSD-2-Clause" }, + "node_modules/import-meta-resolve": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/import-meta-resolve/-/import-meta-resolve-4.2.0.tgz", + "integrity": "sha512-Iqv2fzaTQN28s/FwZAoFq0ZSs/7hMAHJVX+w8PZl3cY19Pxk6jFFalxQoIfW2826i/fDLXv8IiEZRIT0lDuWcg==", + "dev": true, + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, "node_modules/iron-webcrypto": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/iron-webcrypto/-/iron-webcrypto-1.2.1.tgz", @@ -4076,6 +4182,16 @@ "node": ">=20.18.1" } }, + "node_modules/modern-tar": { + "version": "0.8.5", + "resolved": "https://registry.npmjs.org/modern-tar/-/modern-tar-0.8.5.tgz", + "integrity": "sha512-snEhs+6G5Tjd4I7tLCDOaoln2RgE0bD19RzEKgvgK2hZ5VKy3MpLhLTZ2fWpXSTg4K2cyPwp+VHATFJhxfnOeA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18.0.0" + } + }, "node_modules/mrmime": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/mrmime/-/mrmime-2.0.1.tgz", diff --git a/package.json b/package.json index 3008dec..5f75058 100644 --- a/package.json +++ b/package.json @@ -24,5 +24,9 @@ "allowScripts": { "esbuild": true, "workerd@1.20260903.1": true + }, + "devDependencies": { + "@iconify-json/ph": "^1.2.2", + "astro-icon": "^1.2.0" } } diff --git a/public/badges/kevadesu.gif b/public/badges/kevadesu.gif new file mode 100644 index 0000000000000000000000000000000000000000..045aee57ecd8aa6ae6db9012abe69997f50bead4 GIT binary patch literal 961 zcmZ?wbh9u|j9`#wC}&_${Lk&@8WQa67~pE8XTZ$J02KPk!pQ}sb%2-wq^uE0|NsBr zAfXA!U^?E@zw-23{`oVu-0I$ZZ%_K;)<+&i37yNd%GSNp-uA&Kx~TVX`MKrQ{5`Bq zE|=CDiKwW1$6WroM`iZK$g5SUSrhlZd3|Dm&T{sTGc>jPPoEGAExu#7Jo;&5b^P_a zk9G;Yb3I%({`R!L@mXvji0&67arfJ9AGP56thUBF6@XXj_bLP#PUwdT4@4EW%miF4rjoo~< iS5#2X&W|q;w?FOeOGbo0Jyoklgg^6?HV-R*S_1%o3%(2h literal 0 HcmV?d00001 diff --git a/public/badges/ro-er.gif b/public/badges/ro-er.gif new file mode 100644 index 0000000000000000000000000000000000000000..9f0181f119ec43040a042aa87969bcdd5df1aa90 GIT binary patch literal 1144 zcmex=`aVI?0j5YeBz_xYigD=Qfk2eLkxl(4Dt*S%#2D5OoEKe zf{g!$;z%Do3Mqy(lkp60k?{Eq{q zOI{EdWGsxV2)lt63JNI(Dj6CjHUf?0U}R!sv}ZWJB$q2eXWM$F;?fA3Nlc#2}uAb}nZo`z7tF?bmc*M7M`<}IbLz54@ zwVLaexh1}9@iG6d;0UG@aR>j;7>RY zbeFaOFesT=SXkj+1bfg>(J?TQSwKNaSlPfRsc_#Y zB32zOc`nrOx#zFbBkxw-Yrph)_v@cnpcr_|!Q6i9ts4@&yFAz)1v1?6cV(7P@x728 zoxlWir-}g3YG!6;R(LXC6l73zG)!z12%M;3Q262FMsNUv9H_W`(`tsaHpg!r$N2oO zdL35QxfEc63ibbb|8#`C08`)_cJ@m%iK|rPOld*T}venKe$;!N& z!tFHfrp*vz*f^&+N+hI&e}Z**>5Zf*p()J`ahj=y7c=7LY8St_*K^Qj_21Q^F<~WB zA9eGdHL3VApT%6Qze#$s0|N_t^eIP$^LJMj{k+iybiR@RF#R%t04)AN&Nl=GvOuH4 zM1#VGaK{T6UR$HHq~DzQV1btOlWw#?1d{fUhK+Kf8* z{M?s(D@w?VxNE|p^mwwey3o|v6>E}G-!iA%w6u6^e(}!6`bCDn3Y=8l&MJT8EPVdx zl8&Rh@82qPJK7lA@5HzH+@qjnH~zS@nQ+AKk&(EdSoZ;#_Y~MqRZr59zj6GI diff --git a/src/components/CopyText.astro b/src/components/CopyText.astro index d072bd4..76381a1 100644 --- a/src/components/CopyText.astro +++ b/src/components/CopyText.astro @@ -6,6 +6,8 @@ interface Props { event?: string; } const { value, display = value, label = `copy ${value}`, event } = Astro.props; + +import { Icon } from "astro-icon/components"; --- diff --git a/src/components/Music.astro b/src/components/Music.astro index 327e7f0..f47a838 100644 --- a/src/components/Music.astro +++ b/src/components/Music.astro @@ -1,8 +1,8 @@ --- +import { Icon } from "astro-icon/components"; +--- ---- - -
+
@@ -47,24 +51,14 @@
@@ -88,6 +82,7 @@ margin-top: var(--gap); } .music__trigger { + position: relative; display: inline-flex; align-items: center; gap: 0.6rem; @@ -96,29 +91,41 @@ border: 1px solid var(--line); border-radius: 7px; cursor: pointer; + overflow: hidden; font-family: var(--mono); font-size: 0.76rem; letter-spacing: 0.02em; color: var(--muted); transition: border-color 0.18s ease, - color 0.18s ease; + color 0.18s ease, + padding 0.22s ease; } - .music__trigger:hover { + .music__trigger:hover, + .music__trigger:focus-visible { border-color: var(--faint); color: var(--ink); + padding-bottom: 0.45rem; } .music__trigger:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; } .music__art { - width: 30px; - height: 30px; + width: 26px; + height: 26px; flex: none; object-fit: cover; border: 1px solid var(--line); border-radius: 3px; + transition: + width 0.22s cubic-bezier(0.16, 1, 0.3, 1), + height 0.22s cubic-bezier(0.16, 1, 0.3, 1); + } + .music__trigger:hover .music__art, + .music__trigger:focus-visible .music__art { + width: 42px; + height: 42px; } .music__eq { display: inline-flex; @@ -134,6 +141,49 @@ background: var(--accent); border-radius: 1px; } + .music__main { + display: flex; + flex-direction: column; + gap: 0.05rem; + min-width: 0; + } + .music__sub { + font-size: 0.66rem; + color: var(--faint); + max-height: 0; + opacity: 0; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; + transition: + max-height 0.22s ease, + opacity 0.18s ease; + } + .music__trigger:hover .music__sub, + .music__trigger:focus-visible .music__sub { + max-height: 1.4em; + opacity: 1; + } + .music__bar { + position: absolute; + left: 0; + right: 0; + bottom: 0; + height: 2px; + background: #2b2825; + opacity: 0; + transition: opacity 0.2s ease; + } + .music__bar > i { + display: block; + height: 100%; + width: var(--p, 0%); + background: linear-gradient(90deg, rgb(255, 224, 138), rgb(255, 171, 94), rgb(255, 95, 109)); + } + .music__trigger:hover .music__bar, + .music__trigger:focus-visible .music__bar { + opacity: 1; + } .music__trigger--live .music__eq i { animation: music-eq 0.95s ease-in-out infinite alternate; } @@ -316,7 +366,7 @@ .np__logo { width: 0.95em; height: 0.95em; - fill: #1ed760; + color: #1ed760; flex-shrink: 0; display: block; } @@ -444,12 +494,19 @@ diff --git a/src/components/Webrings.astro b/src/components/Webrings.astro index a586bfe..ad42c7d 100644 --- a/src/components/Webrings.astro +++ b/src/components/Webrings.astro @@ -37,6 +37,8 @@ const aria: Record = { next: "next site", random: "random site", }; + +import { Icon } from "astro-icon/components"; ---
@@ -69,23 +71,7 @@ const aria: Record = { data-umami-event-ring={r.key} data-umami-event-dir={dir} > - {dir === "random" && ( - - )} + {dir === "random" &&