An HTML-only Bluesky frontend
1{{define "post_embed"}}
2{{if .Post.Embed}}
3{{if eq .Post.Embed.Type "app.bsky.embed.recordWithMedia#view"}}
4<article style="max-width:600px;padding:10px; border: 1px solid;" class="recordWithMedia-view">
5 <div>
6 <a href="/profile/{{.Post.Embed.Record.Record.Author.Handle}}/post/{{.Post.Embed.Record.Record.RKey}}"
7 style="color:inherit;text-decoration:none;">
8 <img src="{{.Post.Embed.Record.Record.Author.Avatar}}"
9 alt="{{.Post.Embed.Record.Record.Author.DisplayName}}'s avatar"
10 style="width:50px;border-radius:50%;float:left;margin-right:10px;padding:0;">
11 <p style="margin:0;">
12 <b>{{.Post.Embed.Record.Record.Author.DisplayName}}</b>
13 <span class="handle">@{{.Post.Embed.Record.Record.Author.Handle}}</span>
14 ·
15 <time datetime="{{.Post.Embed.Record.Record.Value.CreatedAt}}" style="margin-top: 10px;"
16 class="date">{{.Post.Embed.Record.Record.Value.CreatedAt.Format "1/2/2006 15:04 UTC" }}</time>
17 </p>
18 </div>
19 <div style="margin-left:60px;">
20 <p style="margin-top:5px;">{{.Post.Embed.Record.Record.Value.HTML}}</p>
21 </div>
22 </a>
23</article>
24{{else if eq .Post.Embed.Type "app.bsky.embed.record#view"}}
25{{if eq .Post.Embed.Record.Type "app.bsky.embed.record#viewNotFound"}}
26<article style="max-width:600px;border: 1px solid;" class="record-viewNotFound">
27 <p>Not found</p>
28</article>
29{{else}}
30<article style="max-width:600px;padding:10px; border: 1px solid;">
31 <div>
32 <a href="/profile/{{.Post.Embed.Record.Author.Handle}}/post/{{.Post.Embed.Record.RKey}}"
33 style="color:inherit;text-decoration:none;">
34 <img src="{{.Post.Embed.Record.Author.Avatar}}" alt="{{.Post.Embed.Record.Author.DisplayName}}'s avatar"
35 style="width:50px;border-radius:50%;float:left;margin-right:10px;padding:0;">
36 <p style="margin:0;">
37 <b>{{.Post.Embed.Record.Author.DisplayName}}</b>
38 <span class="handle">@{{.Post.Embed.Record.Author.Handle}}</span>
39 ·
40 <time datetime="{{.Post.Embed.Record.Value.CreatedAt}}" style="margin-top: 10px;"
41 class="date">{{.Post.Embed.Record.Value.CreatedAt.Format "1/2/2006 15:04 UTC" }}</time>
42 </p>
43 </div>
44 <div style="margin-left:60px;">
45 <p style="margin-top:5px;">{{.Post.Embed.Record.Value.HTML}}</p>
46 </div>
47 </a>
48</article>
49{{end}}
50{{end}}
51{{end}}
52{{end}}