tangled
alpha
login
or
join now
jordanreger.com
/
htmlsky
0
fork
atom
An HTML-only Bluesky frontend
0
fork
atom
overview
issues
pulls
pipelines
remove css, move to html tables and such
jordanreger.com
2 years ago
730c6c72
d4803b3f
+130
-131
7 changed files
expand all
collapse all
unified
split
public
actor.html
external_embed.html
head.html
header.html
list.html
post.html
thread.html
+23
-19
public/actor.html
···
1
1
{{define "actor"}}
2
2
<!DOCTYPE html>
3
3
-
<html lang="en">
3
3
+
<html>
4
4
{{template "actor_head" .}}
5
5
6
6
<body>
7
7
{{template "actor_header" .}}
8
8
9
9
<!-- user profile -->
10
10
-
<article style="max-width:800px;">
11
11
-
<div style="position:relative;margin-bottom:50px;">
12
12
-
<img src="{{.Banner}}" alt="{{.DisplayName}}'s banner" style="position:relative;aspect-ratio:3/1;max-width:100%;">
13
13
-
<img src="{{.Avatar}}" alt="{{.DisplayName}}'s avatar"
14
14
-
style="width:100px;height:100px;border-radius:50%;position:absolute;left:10px;bottom:-45px;">
15
15
-
</div>
16
16
-
<h1 style="margin-bottom:0;">{{.DisplayName}}</h1>
17
17
-
<p style="margin:auto 0;" class="handle">@{{.Handle}}</p>
18
18
-
<p style="margin:10px 0;" class="counts"><b>{{.FollowersCount}}</b> followers <b>{{.FollowsCount}}</b> following
19
19
-
<b>{{.PostsCount}}</b> posts
20
20
-
</p>
21
21
-
<p style="white-space:pre-line">{{.DescriptionHTML}}</p>
22
22
-
</article>
10
10
+
<table>
11
11
+
<tr>
12
12
+
<td>
13
13
+
<img src="{{.Avatar}}" alt="{{.DisplayName}}'s avatar" width="65" height="65">
14
14
+
</td>
15
15
+
<td>
16
16
+
<h1 style="margin:0;">{{.DisplayName}}</h1>
17
17
+
<span>@{{.Handle}}</span>
18
18
+
</td>
19
19
+
</tr>
20
20
+
</table>
21
21
+
22
22
+
<p>
23
23
+
<b>{{.FollowersCount}}</b> followers
24
24
+
<b>{{.FollowsCount}}</b> following
25
25
+
<b>{{.PostsCount}}</b> posts
26
26
+
</p>
27
27
+
<p>{{.DescriptionHTML}}</p>
23
28
24
29
<hr>
25
30
26
31
<div id="feed">
27
32
{{range .Feed}}
28
33
{{if ne .Post.Author.DID $.DID}}
29
29
-
<p style="margin:0;margin-left:60px;margin-bottom:5px;" class="repost"><b>Reposted by <a
30
30
-
href="/profile/{{$.Handle}}">{{$.DisplayName}}</a></b></p>
31
31
-
{{end}}
32
32
-
{{template "feed_post" .}}
33
33
-
{{end}}
34
34
+
<span><b>Reposted by <a href="/profile/{{$.Handle}}">{{$.DisplayName}}</a></b></p>
35
35
+
{{end}}
36
36
+
{{template "feed_post" .}}
37
37
+
{{end}}
34
38
</div>
35
39
</body>
36
40
+12
-11
public/external_embed.html
···
1
1
{{define "external_embed"}}
2
2
{{if .Post.Embed}}
3
3
{{if eq .Post.Embed.Type "app.bsky.embed.external#view"}}
4
4
-
<a href="{{.Post.Embed.External.URI}}" style="color:inherit;text-decoration:none;">
5
5
-
<article style="max-width:600px;padding:10px;border:1px solid;text-overflow:ellipsis;">
6
6
-
{{if .Post.Embed.External.Thumb}}<img src="{{.Post.Embed.External.Thumb}}" alt="External Embed image">{{end}}
7
7
-
{{if .Post.Embed.External.Title}}
8
8
-
<h3 style="text-overflow: ellipsis;">{{.Post.Embed.External.Title}}</h3>
9
9
-
<p style="word-wrap:break-word;text-overflow:ellipsis;">{{.Post.Embed.External.Description}}</p>
10
10
-
{{else}}
11
11
-
<h3>{{.Post.Embed.External.URI}}</h3>
12
12
-
{{end}}
13
13
-
</article>
14
14
-
</a>
4
4
+
<article>
5
5
+
{{if .Post.Embed.External.Title}}
6
6
+
<h3>
7
7
+
<a href="{{.Post.Embed.External.URI}}">{{.Post.Embed.External.Title}}</a>
8
8
+
</h3>
9
9
+
<p style="word-wrap:break-word;text-overflow:ellipsis;">{{.Post.Embed.External.Description}}</p>
10
10
+
{{else}}
11
11
+
<h3>
12
12
+
<a href="{{.Post.Embed.External.URI}}">{{.Post.Embed.External.URI}}</a>
13
13
+
</h3>
14
14
+
{{end}}
15
15
+
</article>
15
16
{{end}}
16
17
{{end}}
17
18
{{end}}
+3
-4
public/head.html
···
3
3
<head>
4
4
<meta charset="utf-8">
5
5
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=5, shrink-to-fit=no" />
6
6
-
<meta name='color-scheme' content='dark light'>
6
6
+
<meta name="color-scheme" content="light dark">
7
7
<title>{{.DisplayName}} (@{{.Handle}})</title>
8
8
<meta property="og:title" content="{{.DisplayName}} (@{{.Handle}})" />
9
9
<meta property="og:type" content="website" />
10
10
<meta property="og:url" content="/profile/{{.Handle}}" />
11
11
<meta property="og:image" content="{{.Avatar}}" />
12
12
<meta property="og:description" content="{{.Description}}" />
13
13
-
<link rel="stylesheet" href="/style.css">
14
13
</head>
15
14
{{end}}
16
15
···
19
18
<head>
20
19
<meta charset="utf-8">
21
20
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=5, shrink-to-fit=no" />
21
21
+
<meta name="color-scheme" content="light dark">
22
22
<title>{{.Post.Author.DisplayName}}{{if .Post.Record.Text}}: "{{.Post.Record.Text}}"{{end}}</title>
23
23
<meta property="og:type" content="website" />
24
24
<meta property="og:url" content="/profile/{{.Post.Author.Handle}}/post/{{.Post.RKey}}" />
25
25
<meta property="og:description" content="{{.Post.Record.Text}}" />
26
26
-
<link rel="stylesheet" href="/style.css">
27
26
</head>
28
27
{{end}}
29
28
···
32
31
<head>
33
32
<meta charset="utf-8">
34
33
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=5, shrink-to-fit=no" />
34
34
+
<meta name="color-scheme" content="light dark">
35
35
<title>{{.Name}}</title>
36
36
<meta property="og:type" content="website" />
37
37
<meta property="og:url" content="/profile/{{.Creator.Handle}}/lists/{{.RKey}}" />
38
38
<meta property="og:description" content="{{.Description}}" />
39
39
-
<link rel="stylesheet" href="/style.css">
40
39
</head>
41
40
{{end}}
42
41
+21
-11
public/header.html
···
1
1
{{define "actor_header"}}
2
2
<header>
3
3
-
<a href="https://bsky.app/profile/{{.DID}}"><span style="float:right;">View on Bluesky</span></a>
4
4
-
<a href="/"><span style="float:left;">HTMLsky</span></a>
5
5
-
<hr style="clear:both;">
3
3
+
<nav>
4
4
+
<b><i>HTMLsky</i></b>
5
5
+
[ <a href="/">Home</a> ]
6
6
+
[ <a href="https://sr.ht/~jordanreger/htmlsky">Source</a> ]
7
7
+
[ <a href="https://bsky.app/profile/{{.DID}}">View on Bluesky</a> ]
8
8
+
</nav>
9
9
+
<hr>
6
10
</header>
7
11
{{end}}
8
12
9
13
{{define "thread_header"}}
10
14
<header>
11
11
-
<a href="https://bsky.app/profile/{{.Post.Author.DID}}/post/{{.Post.RKey}}/"><span style="float:right;">View on
12
12
-
Bluesky</span></a>
13
13
-
<a href="/"><span style="float:left;">HTMLsky</span></a>
14
14
-
<hr style="clear:both;">
15
15
+
<nav>
16
16
+
<b><i>HTMLsky</i></b>
17
17
+
[ <a href="/">Home</a> ]
18
18
+
[ <a href="https://sr.ht/~jordanreger/htmlsky">Source</a> ]
19
19
+
[ <a href="https://bsky.app/profile/{{.Post.Author.DID}}/post/{{.Post.RKey}}/">View on Bluesky</a> ]
20
20
+
</nav>
21
21
+
<hr>
15
22
</header>
16
23
{{end}}
17
24
18
25
{{define "list_header"}}
19
26
<header>
20
20
-
<a href="https://bsky.app/profile/{{.Creator.DID}}/lists/{{.RKey}}/"><span style="float:right;">View on
21
21
-
Bluesky</span></a>
22
22
-
<a href="/"><span style="float:left;">HTMLsky</span></a>
23
23
-
<hr style="clear:both;">
27
27
+
<nav>
28
28
+
<b><i>HTMLsky</i></b>
29
29
+
[ <a href="/">Home</a> ]
30
30
+
[ <a href="https://sr.ht/~jordanreger/htmlsky">Source</a> ]
31
31
+
[ <a href="https://bsky.app/profile/{{.Creator.DID}}/lists/{{.RKey}}/">View on Bluesky</a> ]
32
32
+
</nav>
33
33
+
<hr>
24
34
</header>
25
35
{{end}}
+5
-7
public/list.html
···
1
1
{{define "list"}}
2
2
<!DOCTYPE html>
3
3
-
<html lang="en">
3
3
+
<html>
4
4
{{template "list_head" .}}
5
5
6
6
<body>
7
7
{{template "list_header" .}}
8
8
9
9
<!-- list description -->
10
10
-
<article>
11
11
-
<h1 style="margin-bottom:0;">{{.Name}}</h1>
12
12
-
<p style="margin:auto 0;" class="handle">by <a href="/profile/{{.Creator.DID}}">@{{.Creator.Handle}}</a></p>
13
13
-
<p style="white-space:pre-line">{{.DescriptionHTML}}</p>
14
14
-
<hr>
15
15
-
</article>
10
10
+
<h1 style="margin-bottom:0;">{{.Name}}</h1>
11
11
+
<span>by <a href="/profile/{{.Creator.Handle}}">@{{.Creator.Handle}}</a></span>
12
12
+
<p>{{.DescriptionHTML}}</p>
13
13
+
<hr>
16
14
17
15
<span id="feed"></span>
18
16
{{range .Feed}}
+56
-71
public/post.html
···
1
1
{{define "post"}}
2
2
<article>
3
3
-
<div>
4
4
-
<img src="{{.Post.Author.Avatar}}" alt="{{.Post.Author.DisplayName}}'s avatar"
5
5
-
style="width:50px;border-radius:50%;float:left;margin-right:10px;padding:0;">
6
6
-
<a href="/profile/{{.Post.Author.Handle}}" style="color:inherit;text-decoration:none;">
7
7
-
<h1 style="margin-bottom:0;margin-top:10px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;">
8
8
-
{{.Post.Author.DisplayName}}</h1>
9
9
-
<p style="margin-top:0;" class="handle">@{{.Post.Author.Handle}}</p>
10
10
-
</a>
11
11
-
</div>
12
12
-
<p style="clear:both;">
13
13
-
{{.Post.Record.HTML}}
14
14
-
</p>
15
15
-
<section>
3
3
+
<table>
4
4
+
<tr>
5
5
+
<td>
6
6
+
<img src="{{.Post.Author.Avatar}}" alt="{{.Post.Author.DisplayName}}'s avatar" width="50" height="50">
7
7
+
</td>
8
8
+
<td>
9
9
+
<h1 style="margin:0;">{{.Post.Author.DisplayName}}</h1>
10
10
+
<span><a href="/profile/{{.Post.Author.Handle}}">@{{.Post.Author.Handle}}</a></span>
11
11
+
</td>
12
12
+
</tr>
13
13
+
</table>
14
14
+
15
15
+
<p>{{.Post.Record.HTML}}</p>
16
16
+
17
17
+
<!--<section>
16
18
{{template "image_embed" .}}
17
19
{{template "post_embed" .}}
18
20
{{template "external_embed" .}}
19
19
-
</section>
20
20
-
<time datetime="{{.Post.Record.CreatedAt}}" class="date">{{.Post.Record.CreatedAt.Format "Jan 02, 2006 at 15:04 UTC"
21
21
-
}}</time>
21
21
+
</section>-->
22
22
+
23
23
+
<time datetime="{{.Post.Record.CreatedAt}}" class="date">
24
24
+
<i>{{.Post.Record.CreatedAt.Format "Jan 02, 2006 at 15:04 UTC"}}</i>
25
25
+
</time>
22
26
23
27
<p class="counts">
24
24
-
<b>{{.Post.ReplyCount}}</b> replies · <b>{{.Post.RepostCount}}</b> reposts ·
28
28
+
<b>{{.Post.ReplyCount}}</b> replies
29
29
+
<b>{{.Post.RepostCount}}</b> reposts
25
30
<b>{{.Post.LikeCount}}</b> likes
26
31
</p>
27
32
···
31
36
32
37
{{define "post_reply"}}
33
38
<article>
34
34
-
<div>
35
35
-
<a href="/profile/{{.Post.Author.Handle}}/post/{{.Post.RKey}}" style="color:inherit;text-decoration:none;">
36
36
-
<img src="{{.Post.Author.Avatar}}" alt="{{.Post.Author.DisplayName}}'s avatar"
37
37
-
style="width:50px;border-radius:50%;float:left;margin-right:10px;padding:0;">
38
38
-
<p style="margin:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;">
39
39
-
<b>{{.Post.Author.DisplayName}}</b>
40
40
-
<span class="handle">@{{.Post.Author.Handle}}</span>
41
41
-
·
42
42
-
<time datetime="{{.Post.Record.CreatedAt}}" style="margin-top: 10px;"
43
43
-
class="date">{{.Post.Record.CreatedAt.Format "1/2/2006 15:04 UTC" }}</time>
44
44
-
</p>
45
45
-
</div>
46
46
-
<div style="margin-left:60px;">
47
47
-
<p style="margin-top:5px;">{{.Post.Record.HTML}}</p>
48
48
-
<section>
49
49
-
{{template "image_embed" .}}
50
50
-
{{template "post_embed" .}}
51
51
-
{{template "external_embed" .}}
52
52
-
</section>
53
53
-
<p style="margin-bottom:5px;" class="counts">
54
54
-
<a href="#replies" style="color:inherit;text-decoration:none;"><b>{{.Post.ReplyCount}}</b> replies</a> ·
55
55
-
<b>{{.Post.RepostCount}}</b> reposts · <b>{{.Post.LikeCount}}</b> likes
56
56
-
</p>
57
57
-
</div>
58
58
-
</a>
39
39
+
<table>
40
40
+
<tr>
41
41
+
<td>
42
42
+
<img src="{{.Post.Author.Avatar}}" alt="{{.Post.Author.DisplayName}}'s avatar" width="40" height="40">
43
43
+
</td>
44
44
+
<td>
45
45
+
<span>
46
46
+
<b>{{.Post.Author.DisplayName}}</b>
47
47
+
<a href="/profile/{{.Post.Author.Handle}}">@{{.Post.Author.Handle}}</a>
48
48
+
</span>
49
49
+
<br>
50
50
+
[ <a href="/profile/{{.Post.Author.Handle}}/post/{{.Post.RKey}}">View</a> ]
51
51
+
<time datetime="{{.Post.Record.CreatedAt}}" class="date">
52
52
+
<i>{{.Post.Record.CreatedAt.Format "Jan 02, 2006 at 15:04 UTC"}}</i>
53
53
+
</time>
54
54
+
</td>
55
55
+
</tr>
56
56
+
</table>
57
57
+
58
58
+
<p>{{.Post.Record.HTML}}</p>
59
59
+
<!--<section>
60
60
+
{{template "image_embed" .}}
61
61
+
{{template "post_embed" .}}
62
62
+
{{template "external_embed" .}}
63
63
+
</section>-->
64
64
+
65
65
+
<p class="counts">
66
66
+
<b>{{.Post.ReplyCount}}</b> replies
67
67
+
<b>{{.Post.RepostCount}}</b> reposts
68
68
+
<b>{{.Post.LikeCount}}</b> likes
69
69
+
</p>
70
70
+
59
71
<hr>
60
72
</article>
61
73
{{end}}
62
74
63
75
{{define "feed_post"}}
64
64
-
<article>
65
65
-
<a href="/profile/{{.Post.Author.Handle}}/post/{{.Post.RKey}}" style="color:inherit;text-decoration:none;">
66
66
-
<div>
67
67
-
<img src="{{.Post.Author.Avatar}}" alt="{{.Post.Author.DisplayName}}'s avatar"
68
68
-
style="width:50px;border-radius:50%;float:left;margin-right:10px;padding:0;">
69
69
-
<p style="margin:0;">
70
70
-
<b>{{.Post.Author.DisplayName}}</b>
71
71
-
<span class="handle">@{{.Post.Author.Handle}}</span>
72
72
-
·
73
73
-
<time datetime="{{.Post.Record.CreatedAt}}" style="margin-top: 10px;"
74
74
-
class="date">{{.Post.Record.CreatedAt.Format "1/2/2006 15:04 UTC" }}</time>
75
75
-
</p>
76
76
-
</div>
77
77
-
<div style="margin-left:60px;">
78
78
-
<p style="margin-top:5px;">{{.Post.Record.HTML}}</p>
79
79
-
<section>
80
80
-
{{template "image_embed" .}}
81
81
-
{{template "post_embed" .}}
82
82
-
{{template "external_embed" .}}
83
83
-
</section>
84
84
-
<p class="counts">
85
85
-
<b>{{.Post.ReplyCount}}</b> replies · <b>{{.Post.RepostCount}}</b> reposts ·
86
86
-
<b>{{.Post.LikeCount}}</b> likes
87
87
-
</p>
88
88
-
</div>
89
89
-
</a>
90
90
-
<hr>
91
91
-
</article>
92
92
-
{{end}}
76
76
+
{{template "post_reply" .}}
77
77
+
{{end}}
+10
-8
public/thread.html
···
1
1
{{define "thread"}}
2
2
<!DOCTYPE html>
3
3
-
<html lang="en">
3
3
+
<html>
4
4
{{template "thread_head" .}}
5
5
+
5
6
<body>
6
6
-
{{template "thread_header" .}}
7
7
+
{{template "thread_header" .}}
7
8
8
8
-
<!-- main post -->
9
9
-
{{template "post" .}}
9
9
+
<!-- main post -->
10
10
+
{{template "post" .}}
10
11
11
11
-
<span id="replies"></span>
12
12
-
{{range .Replies}}
13
13
-
{{template "post_reply" .}}
14
14
-
{{end}}
12
12
+
<span id="replies"></span>
13
13
+
{{range .Replies}}
14
14
+
{{template "post_reply" .}}
15
15
+
{{end}}
15
16
</body>
17
17
+
16
18
</html>
17
19
{{end}}
18
20