An HTML-only Bluesky frontend
1package main
2
3import (
4 "bytes"
5 "html/template"
6
7 "git.sr.ht/~jordanreger/bsky"
8)
9
10func GetActorPageEmbed(actor bsky.Actor) string {
11 t := template.Must(template.ParseFS(publicFiles, "public/*"))
12 var actor_page bytes.Buffer
13 t.ExecuteTemplate(&actor_page, "actor.embed.html", actor)
14 return actor_page.String()
15}
16
17func GetThreadPageEmbed(thread bsky.Thread) string {
18 t := template.Must(template.ParseFS(publicFiles, "public/*"))
19 var thread_page bytes.Buffer
20 t.ExecuteTemplate(&thread_page, "thread.embed.html", thread)
21 return thread_page.String()
22}
23
24func GetListPageEmbed(list bsky.List) string {
25 t := template.Must(template.ParseFS(publicFiles, "public/*"))
26 var list_page bytes.Buffer
27 t.ExecuteTemplate(&list_page, "list.embed.html", list)
28 return list_page.String()
29}