tangled
alpha
login
or
join now
jordanreger.com
/
htmlsky
0
fork
atom
An HTML-only Bluesky frontend
0
fork
atom
overview
issues
pulls
pipelines
deno task clean and add viewport meta tag
jordanreger.com
2 years ago
98ac4941
a0eed12d
+13
-5
3 changed files
expand all
collapse all
unified
split
actor.ts
facets.ts
main.ts
+9
-3
actor.ts
···
34
34
return `
35
35
<head>
36
36
<meta name="color-scheme" content="light dark">
37
37
+
<meta name="viewport" content="width=device-width, initial-scale=1">
37
38
<title>${actor.username} (@${actor.handle}) — HTMLsky</title>
38
39
</head>
39
40
<table>
···
48
49
</h1>
49
50
</td>
50
51
</tr>
51
51
-
${actor.description ? `<tr>
52
52
+
${
53
53
+
actor.description
54
54
+
? `<tr>
52
55
<td colspan="2">
53
53
-
<p>${await getDescriptionFacets(actor.description).then(res => res.replaceAll("\n", "<br>"))}</p>
56
56
+
<p>${await getDescriptionFacets(actor.description).then((res) =>
57
57
+
res.replaceAll("\n", "<br>")
58
58
+
)}</p>
54
59
</td>
55
60
</tr>
56
61
<tr>
57
62
<td colspan="2"> </td>
58
63
</tr>`
59
59
-
: ``}
64
64
+
: ``
65
65
+
}
60
66
<tr>
61
67
<td colspan="2">
62
68
<b>${actor.followersCount}</b> followers
+1
-1
facets.ts
···
1
1
-
import { AtpAgent, RichText } from "npm:@atproto/api";
1
1
+
import { RichText } from "npm:@atproto/api";
2
2
import { agent } from "./main.ts";
3
3
4
4
export async function getDescriptionFacets(
+3
-1
main.ts
···
31
31
}
32
32
33
33
// RAW PROFILE
34
34
-
const rawProfilePattern = new URLPattern({ pathname: "/raw/profile/:actor/" });
34
34
+
const rawProfilePattern = new URLPattern({
35
35
+
pathname: "/raw/profile/:actor/",
36
36
+
});
35
37
if (rawProfilePattern.test(url)) {
36
38
const actorName = rawProfilePattern.exec(url)?.pathname.groups.actor;
37
39
const actor = new Actor(actorName);