An HTML-only Bluesky frontend

deno task clean and add viewport meta tag

+13 -5
+9 -3
actor.ts
··· 34 return ` 35 <head> 36 <meta name="color-scheme" content="light dark"> 37 <title>${actor.username} (@${actor.handle}) &#8212; HTMLsky</title> 38 </head> 39 <table> ··· 48 </h1> 49 </td> 50 </tr> 51 - ${actor.description ? `<tr> 52 <td colspan="2"> 53 - <p>${await getDescriptionFacets(actor.description).then(res => res.replaceAll("\n", "<br>"))}</p> 54 </td> 55 </tr> 56 <tr> 57 <td colspan="2">&nbsp;</td> 58 </tr>` 59 - : ``} 60 <tr> 61 <td colspan="2"> 62 <b>${actor.followersCount}</b> followers
··· 34 return ` 35 <head> 36 <meta name="color-scheme" content="light dark"> 37 + <meta name="viewport" content="width=device-width, initial-scale=1"> 38 <title>${actor.username} (@${actor.handle}) &#8212; HTMLsky</title> 39 </head> 40 <table> ··· 49 </h1> 50 </td> 51 </tr> 52 + ${ 53 + actor.description 54 + ? `<tr> 55 <td colspan="2"> 56 + <p>${await getDescriptionFacets(actor.description).then((res) => 57 + res.replaceAll("\n", "<br>") 58 + )}</p> 59 </td> 60 </tr> 61 <tr> 62 <td colspan="2">&nbsp;</td> 63 </tr>` 64 + : `` 65 + } 66 <tr> 67 <td colspan="2"> 68 <b>${actor.followersCount}</b> followers
+1 -1
facets.ts
··· 1 - import { AtpAgent, RichText } from "npm:@atproto/api"; 2 import { agent } from "./main.ts"; 3 4 export async function getDescriptionFacets(
··· 1 + import { RichText } from "npm:@atproto/api"; 2 import { agent } from "./main.ts"; 3 4 export async function getDescriptionFacets(
+3 -1
main.ts
··· 31 } 32 33 // RAW PROFILE 34 - const rawProfilePattern = new URLPattern({ pathname: "/raw/profile/:actor/" }); 35 if (rawProfilePattern.test(url)) { 36 const actorName = rawProfilePattern.exec(url)?.pathname.groups.actor; 37 const actor = new Actor(actorName);
··· 31 } 32 33 // RAW PROFILE 34 + const rawProfilePattern = new URLPattern({ 35 + pathname: "/raw/profile/:actor/", 36 + }); 37 if (rawProfilePattern.test(url)) { 38 const actorName = rawProfilePattern.exec(url)?.pathname.groups.actor; 39 const actor = new Actor(actorName);