feat: style upgrades

This commit is contained in:
2024-05-20 16:45:10 +01:00
parent 6250456435
commit 21919e1e3b
78 changed files with 1168 additions and 898 deletions

View File

@ -7,7 +7,7 @@ export const onRequest: PagesFunction<Env> = async context => {
const prefixes = ["npub1", "nprofile1", "naddr1", "nevent1", "note1"];
const isEntityPath = prefixes.some(
a => u.pathname.startsWith(`/${a}`) || u.pathname.startsWith(`/e/${a}`) || u.pathname.startsWith(`/p/${a}`)
a => u.pathname.startsWith(`/${a}`) || u.pathname.startsWith(`/e/${a}`) || u.pathname.startsWith(`/p/${a}`),
);
const nostrAddress = u.pathname.match(/^\/([a-zA-Z0-9_]+)$/i);
const next = await context.next();
@ -19,7 +19,7 @@ export const onRequest: PagesFunction<Env> = async context => {
id = `${id}@${HOST}`;
}
const fetchApi = `https://nostr.api.v0l.io/api/v1/opengraph/${id}?canonical=${encodeURIComponent(
`https://${HOST}/%s`
`https://${HOST}/%s`,
)}`;
console.log("Fetching tags from: ", fetchApi);
const reqBuf = await next.arrayBuffer();