tangled
alpha
login
or
join now
viruus.zip
/
core
forked from
tangled.org/core
0
fork
atom
Monorepo for Tangled
0
fork
atom
overview
issues
pulls
pipelines
appview: pages/templates: add opengraph tags
anirudh.fi
10 months ago
1e51cad2
6dbaf7f9
verified
This commit was signed with the committer's
known signature
.
anirudh.fi
SSH Key Fingerprint:
SHA256:cz35vdbiWEzCNEfuL9fMC2JVIhtXavXBHrRjv8gxpAk=
+303
-135
22 changed files
expand all
collapse all
unified
split
appview
pages
templates
index.html
repo
blob.html
branches.html
commit.html
empty.html
fragments
meta.html
og.html
index.html
issues
issue.html
issues.html
log.html
pulls
interdiff.html
patch.html
pull.html
pulls.html
tags.html
tree.html
timeline.html
user
login.html
profile.html
repos.html
go.mod
-21
appview/pages/templates/index.html
···
1
1
-
<html>
2
2
-
{{ template "layouts/head" . }}
3
3
-
4
4
-
<header>
5
5
-
<h1>{{ .meta.Title }}</h1>
6
6
-
<h2>{{ .meta.Description }}</h2>
7
7
-
</header>
8
8
-
<body>
9
9
-
<main>
10
10
-
<div class="index">
11
11
-
{{ range .info }}
12
12
-
<div class="index-name">
13
13
-
<a href="/{{ .Name }}">{{ .DisplayName }}</a>
14
14
-
</div>
15
15
-
<div class="desc">{{ .Desc }}</div>
16
16
-
<div>{{ .Idle }}</div>
17
17
-
{{ end }}
18
18
-
</div>
19
19
-
</main>
20
20
-
</body>
21
21
-
</html>
+7
-8
appview/pages/templates/repo/blob.html
···
1
1
{{ define "title" }}{{ .Path }} at {{ .Ref }} · {{ .RepoInfo.FullName }}{{ end }}
2
2
3
3
-
4
3
{{ define "extrameta" }}
5
5
-
<meta name="vcs:clone" content="https://tangled.sh/{{ .RepoInfo.FullName }}"/>
6
6
-
<meta name="forge:summary" content="https://tangled.sh/{{ .RepoInfo.FullName }}">
7
7
-
<meta name="forge:dir" content="https://tangled.sh/{{ .RepoInfo.FullName }}/tree/{ref}/{path}">
8
8
-
<meta name="forge:file" content="https://tangled.sh/{{ .RepoInfo.FullName }}/blob/{ref}/{path}">
9
9
-
<meta name="forge:line" content="https://tangled.sh/{{ .RepoInfo.FullName }}/blob/{ref}/{path}#L{line}">
10
10
-
<meta name="go-import" content="tangled.sh/{{ .RepoInfo.FullNameWithoutAt }} git https://tangled.sh/{{ .RepoInfo.FullName }}">
4
4
+
{{ template "repo/fragments/meta" . }}
5
5
+
6
6
+
{{ $title := printf "%s at %s · %s" .Path .Ref .RepoInfo.FullName }}
7
7
+
{{ $url := printf "https://tangled.sh/%s/blob/%s/%s" .RepoInfo.FullName .Ref .Path }}
8
8
+
9
9
+
{{ template "repo/fragments/og" (dict "RepoInfo" .RepoInfo "Title" $title "Url" $url) }}
10
10
+
11
11
{{ end }}
12
12
-
13
12
14
13
{{ define "repoContent" }}
15
14
{{ $lines := split .Contents }}
+8
-1
appview/pages/templates/repo/branches.html
···
1
1
{{ define "title" }}
2
2
-
branches · {{ .RepoInfo.FullName }}
2
2
+
branches · {{ .RepoInfo.FullName }}
3
3
+
{{ end }}
4
4
+
5
5
+
{{ define "extrameta" }}
6
6
+
{{ $title := printf "branches · %s" .RepoInfo.FullName }}
7
7
+
{{ $url := printf "https://tangled.sh/%s/branches" .RepoInfo.FullName }}
8
8
+
9
9
+
{{ template "repo/fragments/og" (dict "RepoInfo" .RepoInfo "Title" $title "Url" $url) }}
3
10
{{ end }}
4
11
5
12
{{ define "repoContent" }}
+8
appview/pages/templates/repo/commit.html
···
1
1
{{ define "title" }} commit {{ .Diff.Commit.This }} · {{ .RepoInfo.FullName }} {{ end }}
2
2
3
3
+
{{ define "extrameta" }}
4
4
+
{{ $title := printf "commit %s · %s" .Diff.Commit.This .RepoInfo.FullName }}
5
5
+
{{ $url := printf "https://tangled.sh/%s/commit/%s" .RepoInfo.FullName .Diff.Commit.This }}
6
6
+
7
7
+
{{ template "repo/fragments/og" (dict "RepoInfo" .RepoInfo "Title" $title "Url" $url) }}
8
8
+
{{ end }}
9
9
+
10
10
+
3
11
{{ define "repoContent" }}
4
12
5
13
{{ $repo := .RepoInfo.FullName }}
+5
appview/pages/templates/repo/empty.html
···
1
1
{{ define "title" }}{{ .RepoInfo.FullName }}{{ end }}
2
2
3
3
+
{{ define "extrameta" }}
4
4
+
{{ template "repo/fragments/meta" . }}
5
5
+
{{ template "repo/fragments/og" (dict "RepoInfo" .RepoInfo) }}
6
6
+
{{ end }}
7
7
+
3
8
{{ define "repoContent" }}
4
9
<main>
5
10
<p class="text-center pt-5 text-gray-400 dark:text-gray-500">
+26
appview/pages/templates/repo/fragments/meta.html
···
1
1
+
{{ define "repo/fragments/meta" }}
2
2
+
<meta
3
3
+
name="vcs:clone"
4
4
+
content="https://tangled.sh/{{ .RepoInfo.FullName }}"
5
5
+
/>
6
6
+
<meta
7
7
+
name="forge:summary"
8
8
+
content="https://tangled.sh/{{ .RepoInfo.FullName }}"
9
9
+
/>
10
10
+
<meta
11
11
+
name="forge:dir"
12
12
+
content="https://tangled.sh/{{ .RepoInfo.FullName }}/tree/{ref}/{path}"
13
13
+
/>
14
14
+
<meta
15
15
+
name="forge:file"
16
16
+
content="https://tangled.sh/{{ .RepoInfo.FullName }}/blob/{ref}/{path}"
17
17
+
/>
18
18
+
<meta
19
19
+
name="forge:line"
20
20
+
content="https://tangled.sh/{{ .RepoInfo.FullName }}/blob/{ref}/{path}#L{line}"
21
21
+
/>
22
22
+
<meta
23
23
+
name="go-import"
24
24
+
content="tangled.sh/{{ .RepoInfo.FullNameWithoutAt }} git https://tangled.sh/{{ .RepoInfo.FullName }}"
25
25
+
/>
26
26
+
{{ end }}
+11
appview/pages/templates/repo/fragments/og.html
···
1
1
+
{{ define "repo/fragments/og" }}
2
2
+
{{ $title := or .Title .RepoInfo.FullName }}
3
3
+
{{ $description := or .Description .RepoInfo.Description }}
4
4
+
{{ $url := or .Url (printf "https://tangled.sh/%s" .RepoInfo.FullName) }}
5
5
+
6
6
+
7
7
+
<meta property="og:title" content="{{ unescapeHtml $title }}" />
8
8
+
<meta property="og:type" content="object" />
9
9
+
<meta property="og:url" content="{{ $url }}" />
10
10
+
<meta property="og:description" content="{{ $description }}" />
11
11
+
{{ end }}
+5
-24
appview/pages/templates/repo/index.html
···
1
1
{{ define "title" }}{{ .RepoInfo.FullName }} at {{ .Ref }}{{ end }}
2
2
3
3
+
3
4
{{ define "extrameta" }}
4
4
-
<meta
5
5
-
name="vcs:clone"
6
6
-
content="https://tangled.sh/{{ .RepoInfo.FullName }}"
7
7
-
/>
8
8
-
<meta
9
9
-
name="forge:summary"
10
10
-
content="https://tangled.sh/{{ .RepoInfo.FullName }}"
11
11
-
/>
12
12
-
<meta
13
13
-
name="forge:dir"
14
14
-
content="https://tangled.sh/{{ .RepoInfo.FullName }}/tree/{ref}/{path}"
15
15
-
/>
16
16
-
<meta
17
17
-
name="forge:file"
18
18
-
content="https://tangled.sh/{{ .RepoInfo.FullName }}/blob/{ref}/{path}"
19
19
-
/>
20
20
-
<meta
21
21
-
name="forge:line"
22
22
-
content="https://tangled.sh/{{ .RepoInfo.FullName }}/blob/{ref}/{path}#L{line}"
23
23
-
/>
24
24
-
<meta
25
25
-
name="go-import"
26
26
-
content="tangled.sh/{{ .RepoInfo.FullNameWithoutAt }} git https://tangled.sh/{{ .RepoInfo.FullName }}"
27
27
-
/>
5
5
+
{{ template "repo/fragments/meta" . }}
6
6
+
7
7
+
{{ template "repo/fragments/og" (dict "RepoInfo" .RepoInfo) }}
28
8
{{ end }}
9
9
+
29
10
30
11
{{ define "repoContent" }}
31
12
<main>
+8
appview/pages/templates/repo/issues/issue.html
···
1
1
{{ define "title" }}{{ .Issue.Title }} · issue #{{ .Issue.IssueId }} · {{ .RepoInfo.FullName }}{{ end }}
2
2
3
3
+
4
4
+
{{ define "extrameta" }}
5
5
+
{{ $title := printf "%s · issue #%d · %s" .Issue.Title .Issue.IssueId .RepoInfo.FullName }}
6
6
+
{{ $url := printf "https://tangled.sh/%s/issues/%d" .RepoInfo.FullName .Issue.IssueId }}
7
7
+
8
8
+
{{ template "repo/fragments/og" (dict "RepoInfo" .RepoInfo "Title" $title "Url" $url) }}
9
9
+
{{ end }}
10
10
+
3
11
{{ define "repoContent" }}
4
12
<header class="pb-4">
5
13
<h1 class="text-2xl">
+7
appview/pages/templates/repo/issues/issues.html
···
1
1
{{ define "title" }}issues · {{ .RepoInfo.FullName }}{{ end }}
2
2
3
3
+
{{ define "extrameta" }}
4
4
+
{{ $title := "issues"}}
5
5
+
{{ $url := printf "https://tangled.sh/%s/issues" .RepoInfo.FullName }}
6
6
+
7
7
+
{{ template "repo/fragments/og" (dict "RepoInfo" .RepoInfo "Title" $title "Url" $url) }}
8
8
+
{{ end }}
9
9
+
3
10
{{ define "repoContent" }}
4
11
<div class="flex justify-between items-center gap-4">
5
12
<div class="flex gap-4">
+7
appview/pages/templates/repo/log.html
···
1
1
{{ define "title" }}commits · {{ .RepoInfo.FullName }}{{ end }}
2
2
3
3
+
{{ define "extrameta" }}
4
4
+
{{ $title := printf "commits · %s" .RepoInfo.FullName }}
5
5
+
{{ $url := printf "https://tangled.sh/%s/commits" .RepoInfo.FullName }}
6
6
+
7
7
+
{{ template "repo/fragments/og" (dict "RepoInfo" .RepoInfo "Title" $title "Url" $url) }}
8
8
+
{{ end }}
9
9
+
3
10
{{ define "repoContent" }}
4
11
<section id="commit-table" class="overflow-x-auto">
5
12
<h2 class="font-bold text-sm mb-4 uppercase dark:text-white">
+9
-1
appview/pages/templates/repo/pulls/interdiff.html
···
1
1
{{ define "title" }}
2
2
-
interdiff of round #{{ .Round }} and #{{ sub .Round 1 }}; pull #{{ .Pull.PullId }} · {{ .RepoInfo.FullName }}
2
2
+
interdiff of round #{{ .Round }} and #{{ sub .Round 1 }} · pull #{{ .Pull.PullId }} · {{ .RepoInfo.FullName }}
3
3
+
{{ end }}
4
4
+
5
5
+
6
6
+
{{ define "extrameta" }}
7
7
+
{{ $title := printf "interdiff of %d and %d · %s · pull #%d · %s" .Round (sub .Round 1) .Pull.Title .Pull.PullId .RepoInfo.FullName }}
8
8
+
{{ $url := printf "https://tangled.sh/%s/pulls/%d/round/%d" .RepoInfo.FullName .Pull.PullId .Round }}
9
9
+
10
10
+
{{ template "repo/fragments/og" (dict "RepoInfo" .RepoInfo "Title" (unescapeHtml $title) "Url" $url) }}
3
11
{{ end }}
4
12
5
13
{{ define "content" }}
+9
appview/pages/templates/repo/pulls/patch.html
···
2
2
patch of {{ .Pull.Title }} · round #{{ .Round }} · pull #{{ .Pull.PullId }} · {{ .RepoInfo.FullName }}
3
3
{{ end }}
4
4
5
5
+
6
6
+
{{ define "extrameta" }}
7
7
+
{{ $title := printf "patch of %s · pull #%d · %s" .Pull.Title .Pull.PullId .RepoInfo.FullName }}
8
8
+
{{ $url := printf "https://tangled.sh/%s/pulls/%d/round/%d" .RepoInfo.FullName .Pull.PullId .Round }}
9
9
+
10
10
+
{{ template "repo/fragments/og" (dict "RepoInfo" .RepoInfo "Title" $title "Url" $url) }}
11
11
+
{{ end }}
12
12
+
13
13
+
5
14
{{ define "content" }}
6
15
<section>
7
16
<section
+8
appview/pages/templates/repo/pulls/pull.html
···
2
2
{{ .Pull.Title }} · pull #{{ .Pull.PullId }} · {{ .RepoInfo.FullName }}
3
3
{{ end }}
4
4
5
5
+
{{ define "extrameta" }}
6
6
+
{{ $title := printf "%s · pull #%d · %s" .Pull.Title .Pull.PullId .RepoInfo.FullName }}
7
7
+
{{ $url := printf "https://tangled.sh/%s/pulls/%d" .RepoInfo.FullName .Pull.PullId }}
8
8
+
9
9
+
{{ template "repo/fragments/og" (dict "RepoInfo" .RepoInfo "Title" $title "Url" $url) }}
10
10
+
{{ end }}
11
11
+
12
12
+
5
13
{{ define "repoContent" }}
6
14
{{ template "repo/pulls/fragments/pullHeader" . }}
7
15
{{ end }}
+7
appview/pages/templates/repo/pulls/pulls.html
···
1
1
{{ define "title" }}pulls · {{ .RepoInfo.FullName }}{{ end }}
2
2
3
3
+
{{ define "extrameta" }}
4
4
+
{{ $title := "pulls"}}
5
5
+
{{ $url := printf "https://tangled.sh/%s/pulls" .RepoInfo.FullName }}
6
6
+
7
7
+
{{ template "repo/fragments/og" (dict "RepoInfo" .RepoInfo "Title" $title "Url" $url) }}
8
8
+
{{ end }}
9
9
+
3
10
{{ define "repoContent" }}
4
11
<div class="flex justify-between items-center">
5
12
<div class="flex gap-4">
+7
appview/pages/templates/repo/tags.html
···
2
2
tags · {{ .RepoInfo.FullName }}
3
3
{{ end }}
4
4
5
5
+
{{ define "extrameta" }}
6
6
+
{{ $title := printf "tags · %s" .RepoInfo.FullName }}
7
7
+
{{ $url := printf "https://tangled.sh/%s/tags" .RepoInfo.FullName }}
8
8
+
9
9
+
{{ template "repo/fragments/og" (dict "RepoInfo" .RepoInfo "Title" $title "Url" $url) }}
10
10
+
{{ end }}
11
11
+
5
12
{{ define "repoContent" }}
6
13
<section>
7
14
<h2 class="mb-4 text-sm text-left text-gray-700 dark:text-gray-300 uppercase font-bold">tags</h2>
+11
-6
appview/pages/templates/repo/tree.html
···
2
2
3
3
4
4
{{ define "extrameta" }}
5
5
-
<meta name="vcs:clone" content="https://tangled.sh/{{ .RepoInfo.FullName }}"/>
6
6
-
<meta name="forge:summary" content="https://tangled.sh/{{ .RepoInfo.FullName }}">
7
7
-
<meta name="forge:dir" content="https://tangled.sh/{{ .RepoInfo.FullName }}/tree/{ref}/{path}">
8
8
-
<meta name="forge:file" content="https://tangled.sh/{{ .RepoInfo.FullName }}/blob/{ref}/{path}">
9
9
-
<meta name="forge:line" content="https://tangled.sh/{{ .RepoInfo.FullName }}/blob/{ref}/{path}#L{line}">
10
10
-
<meta name="go-import" content="tangled.sh/{{ .RepoInfo.FullNameWithoutAt }} git https://tangled.sh/{{ .RepoInfo.FullName }}">
5
5
+
6
6
+
{{ $path := "" }}
7
7
+
{{ range .BreadCrumbs }}
8
8
+
{{ $path = printf "%s/%s" $path (index . 0) }}
9
9
+
{{ end }}
10
10
+
11
11
+
{{ template "repo/fragments/meta" . }}
12
12
+
{{ $title := printf "%s at %s · %s" $path .Ref .RepoInfo.FullName }}
13
13
+
{{ $url := printf "https://tangled.sh/%s/tree/%s%s" .RepoInfo.FullName .Ref $path }}
14
14
+
15
15
+
{{ template "repo/fragments/og" (dict "RepoInfo" .RepoInfo "Title" $title "Url" $url) }}
11
16
{{ end }}
12
17
13
18
+132
-72
appview/pages/templates/timeline.html
···
1
1
{{ define "title" }}timeline{{ end }}
2
2
3
3
+
{{ define "extrameta" }}
4
4
+
<meta property="og:title" content="timeline · tangled" />
5
5
+
<meta property="og:type" content="object" />
6
6
+
<meta property="og:url" content="https://tangled.sh" />
7
7
+
<meta property="og:description" content="see what's tangling" />
8
8
+
{{ end }}
9
9
+
3
10
{{ define "topbar" }}
4
4
-
{{ with .LoggedInUser }}
5
5
-
{{ template "layouts/topbar" $ }}
6
6
-
{{ else }}
7
7
-
{{ end }}
11
11
+
{{ with .LoggedInUser }}
12
12
+
{{ template "layouts/topbar" $ }}
13
13
+
{{ else }}
14
14
+
{{ end }}
8
15
{{ end }}
9
16
10
17
{{ define "content" }}
11
11
-
{{ with .LoggedInUser }}
12
12
-
{{ block "timeline" $ }} {{ end }}
13
13
-
{{ else }}
14
14
-
{{ block "hero" $ }} {{ end }}
15
15
-
{{ block "timeline" $ }} {{ end }}
16
16
-
{{ end }}
18
18
+
{{ with .LoggedInUser }}
19
19
+
{{ block "timeline" $ }}{{ end }}
20
20
+
{{ else }}
21
21
+
{{ block "hero" $ }}{{ end }}
22
22
+
{{ block "timeline" $ }}{{ end }}
23
23
+
{{ end }}
17
24
{{ end }}
18
25
19
26
{{ define "hero" }}
20
20
-
<div class="flex flex-col items-center justify-center text-center rounded drop-shadow bg-white dark:bg-gray-800 text-black dark:text-white py-4 px-10">
21
21
-
<div class="font-bold italic text-4xl mb-4">
22
22
-
tangled
23
23
-
</div>
24
24
-
<div class="italic text-lg">
25
25
-
tightly-knit social coding, <a href="/login" class="underline inline-flex gap-1 items-center">join now {{ i "arrow-right" "w-4 h-4" }}</a>
26
26
-
<p class="pt-5 px-10 text-sm text-gray-500 dark:text-gray-400">Join our <a href="https://chat.tangled.sh">Discord</a> or IRC channel: <a href="https://web.libera.chat/#tangled"><code>#tangled</code> on Libera Chat</a>.
27
27
-
Read an introduction to Tangled <a href="https://blog.tangled.sh/intro">here</a>.</p>
28
28
-
</div>
29
29
-
</div>
27
27
+
<div
28
28
+
class="flex flex-col items-center justify-center text-center rounded drop-shadow bg-white dark:bg-gray-800 text-black dark:text-white py-4 px-10"
29
29
+
>
30
30
+
<div class="font-bold italic text-4xl mb-4">tangled</div>
31
31
+
<div class="italic text-lg">
32
32
+
tightly-knit social coding,
33
33
+
<a href="/login" class="underline inline-flex gap-1 items-center"
34
34
+
>join now {{ i "arrow-right" "w-4 h-4" }}</a
35
35
+
>
36
36
+
<p class="pt-5 px-10 text-sm text-gray-500 dark:text-gray-400">
37
37
+
Join our <a href="https://chat.tangled.sh">Discord</a> or IRC
38
38
+
channel:
39
39
+
<a href="https://web.libera.chat/#tangled"
40
40
+
><code>#tangled</code> on Libera Chat</a
41
41
+
>. Read an introduction to Tangled
42
42
+
<a href="https://blog.tangled.sh/intro">here</a>.
43
43
+
</p>
44
44
+
</div>
45
45
+
</div>
30
46
{{ end }}
31
47
32
48
{{ define "timeline" }}
33
33
-
<div>
34
34
-
<div class="p-6">
35
35
-
<p class="text-xl font-bold dark:text-white">Timeline</p>
36
36
-
</div>
37
37
-
38
38
-
<div class="flex flex-col gap-3 relative">
39
39
-
<div class="absolute left-8 top-0 bottom-0 w-px bg-gray-300 dark:bg-gray-600"></div>
40
40
-
{{ range .Timeline }}
41
41
-
<div class="px-6 py-2 bg-white dark:bg-gray-800 rounded drop-shadow-sm w-fit">
42
42
-
{{ if .Repo }}
43
43
-
{{ $userHandle := index $.DidHandleMap .Repo.Did }}
44
44
-
<div class="flex items-center">
45
45
-
<p class="text-gray-600 dark:text-gray-300">
46
46
-
<a href="/{{ $userHandle }}" class="no-underline hover:underline">{{ $userHandle | truncateAt30 }}</a>
47
47
-
{{ if .Source }}
48
48
-
forked
49
49
-
<a href="/{{ index $.DidHandleMap .Source.Did }}/{{ .Source.Name }}" class="no-underline hover:underline">
50
50
-
{{ index $.DidHandleMap .Source.Did }}/{{ .Source.Name }}
51
51
-
</a>
52
52
-
to
53
53
-
<a href="/{{ $userHandle }}/{{ .Repo.Name }}" class="no-underline hover:underline">{{ .Repo.Name }}</a>
54
54
-
{{ else }}
55
55
-
created
56
56
-
<a href="/{{ $userHandle }}/{{ .Repo.Name }}" class="no-underline hover:underline">{{ .Repo.Name }}</a>
57
57
-
{{ end }}
58
58
-
<time class="text-gray-700 dark:text-gray-400 text-xs">{{ .Repo.Created | timeFmt }}</time>
59
59
-
</p>
49
49
+
<div>
50
50
+
<div class="p-6">
51
51
+
<p class="text-xl font-bold dark:text-white">Timeline</p>
60
52
</div>
61
61
-
{{ else if .Follow }}
62
62
-
{{ $userHandle := index $.DidHandleMap .Follow.UserDid }}
63
63
-
{{ $subjectHandle := index $.DidHandleMap .Follow.SubjectDid }}
64
64
-
<div class="flex items-center">
65
65
-
<p class="text-gray-600 dark:text-gray-300">
66
66
-
<a href="/{{ $userHandle }}" class="no-underline hover:underline">{{ $userHandle | truncateAt30 }}</a>
67
67
-
followed
68
68
-
<a href="/{{ $subjectHandle }}" class="no-underline hover:underline">{{ $subjectHandle | truncateAt30 }}</a>
69
69
-
<time class="text-gray-700 dark:text-gray-400 text-xs">{{ .Follow.FollowedAt | timeFmt }}</time>
70
70
-
</p>
71
71
-
</div>
72
72
-
{{ else if .Star }}
73
73
-
{{ $starrerHandle := index $.DidHandleMap .Star.StarredByDid }}
74
74
-
{{ $repoOwnerHandle := index $.DidHandleMap .Star.Repo.Did }}
75
75
-
<div class="flex items-center">
76
76
-
<p class="text-gray-600 dark:text-gray-300">
77
77
-
<a href="/{{ $starrerHandle }}" class="no-underline hover:underline">{{ $starrerHandle | truncateAt30 }}</a>
78
78
-
starred
79
79
-
<a href="/{{ $repoOwnerHandle }}/{{ .Star.Repo.Name }}" class="no-underline hover:underline">{{ $repoOwnerHandle | truncateAt30 }}/{{ .Star.Repo.Name }}</a>
80
80
-
<time class="text-gray-700 dark:text-gray-400 text-xs">{{ .Star.Created | timeFmt }}</time>
81
81
-
</p>
53
53
+
54
54
+
<div class="flex flex-col gap-3 relative">
55
55
+
<div
56
56
+
class="absolute left-8 top-0 bottom-0 w-px bg-gray-300 dark:bg-gray-600"
57
57
+
></div>
58
58
+
{{ range .Timeline }}
59
59
+
<div
60
60
+
class="px-6 py-2 bg-white dark:bg-gray-800 rounded drop-shadow-sm w-fit"
61
61
+
>
62
62
+
{{ if .Repo }}
63
63
+
{{ $userHandle := index $.DidHandleMap .Repo.Did }}
64
64
+
<div class="flex items-center">
65
65
+
<p class="text-gray-600 dark:text-gray-300">
66
66
+
<a
67
67
+
href="/{{ $userHandle }}"
68
68
+
class="no-underline hover:underline"
69
69
+
>{{ $userHandle | truncateAt30 }}</a
70
70
+
>
71
71
+
{{ if .Source }}
72
72
+
forked
73
73
+
<a
74
74
+
href="/{{ index $.DidHandleMap .Source.Did }}/{{ .Source.Name }}"
75
75
+
class="no-underline hover:underline"
76
76
+
>
77
77
+
{{ index $.DidHandleMap .Source.Did }}/{{ .Source.Name }}
78
78
+
</a>
79
79
+
to
80
80
+
<a
81
81
+
href="/{{ $userHandle }}/{{ .Repo.Name }}"
82
82
+
class="no-underline hover:underline"
83
83
+
>{{ .Repo.Name }}</a
84
84
+
>
85
85
+
{{ else }}
86
86
+
created
87
87
+
<a
88
88
+
href="/{{ $userHandle }}/{{ .Repo.Name }}"
89
89
+
class="no-underline hover:underline"
90
90
+
>{{ .Repo.Name }}</a
91
91
+
>
92
92
+
{{ end }}
93
93
+
<time
94
94
+
class="text-gray-700 dark:text-gray-400 text-xs"
95
95
+
>{{ .Repo.Created | timeFmt }}</time
96
96
+
>
97
97
+
</p>
98
98
+
</div>
99
99
+
{{ else if .Follow }}
100
100
+
{{ $userHandle := index $.DidHandleMap .Follow.UserDid }}
101
101
+
{{ $subjectHandle := index $.DidHandleMap .Follow.SubjectDid }}
102
102
+
<div class="flex items-center">
103
103
+
<p class="text-gray-600 dark:text-gray-300">
104
104
+
<a
105
105
+
href="/{{ $userHandle }}"
106
106
+
class="no-underline hover:underline"
107
107
+
>{{ $userHandle | truncateAt30 }}</a
108
108
+
>
109
109
+
followed
110
110
+
<a
111
111
+
href="/{{ $subjectHandle }}"
112
112
+
class="no-underline hover:underline"
113
113
+
>{{ $subjectHandle | truncateAt30 }}</a
114
114
+
>
115
115
+
<time
116
116
+
class="text-gray-700 dark:text-gray-400 text-xs"
117
117
+
>{{ .Follow.FollowedAt | timeFmt }}</time
118
118
+
>
119
119
+
</p>
120
120
+
</div>
121
121
+
{{ else if .Star }}
122
122
+
{{ $starrerHandle := index $.DidHandleMap .Star.StarredByDid }}
123
123
+
{{ $repoOwnerHandle := index $.DidHandleMap .Star.Repo.Did }}
124
124
+
<div class="flex items-center">
125
125
+
<p class="text-gray-600 dark:text-gray-300">
126
126
+
<a
127
127
+
href="/{{ $starrerHandle }}"
128
128
+
class="no-underline hover:underline"
129
129
+
>{{ $starrerHandle | truncateAt30 }}</a
130
130
+
>
131
131
+
starred
132
132
+
<a
133
133
+
href="/{{ $repoOwnerHandle }}/{{ .Star.Repo.Name }}"
134
134
+
class="no-underline hover:underline"
135
135
+
>{{ $repoOwnerHandle | truncateAt30 }}/{{ .Star.Repo.Name }}</a
136
136
+
>
137
137
+
<time
138
138
+
class="text-gray-700 dark:text-gray-400 text-xs"
139
139
+
>{{ .Star.Created | timeFmt }}</time
140
140
+
>
141
141
+
</p>
142
142
+
</div>
143
143
+
{{ end }}
144
144
+
</div>
145
145
+
{{ end }}
82
146
</div>
83
83
-
{{ end }}
84
147
</div>
85
85
-
{{ end }}
86
86
-
</div>
87
87
-
</div>
88
148
{{ end }}
+13
-1
appview/pages/templates/user/login.html
···
7
7
name="viewport"
8
8
content="width=device-width, initial-scale=1.0"
9
9
/>
10
10
+
<meta
11
11
+
property="og:title"
12
12
+
content="login · tangled"
13
13
+
/>
14
14
+
<meta
15
15
+
property="og:url"
16
16
+
content="https://tangled.sh/login"
17
17
+
/>
18
18
+
<meta
19
19
+
property="og:description"
20
20
+
content="login to tangled"
21
21
+
/>
10
22
<script src="/static/htmx.min.js"></script>
11
23
<link
12
24
rel="stylesheet"
13
25
href="/static/tw.css?{{ cssContentHash }}"
14
26
type="text/css"
15
27
/>
16
16
-
<title>login</title>
28
28
+
<title>login · tangled</title>
17
29
</head>
18
30
<body class="flex items-center justify-center min-h-screen">
19
31
<main class="max-w-md px-6 -mt-4">
+7
appview/pages/templates/user/profile.html
···
1
1
{{ define "title" }}{{ or .Card.UserHandle .Card.UserDid }}{{ end }}
2
2
3
3
+
{{ define "extrameta" }}
4
4
+
<meta property="og:title" content="{{ or .Card.UserHandle .Card.UserDid }}" />
5
5
+
<meta property="og:type" content="profile" />
6
6
+
<meta property="og:url" content="https://tangled.sh/{{ or .Card.UserHandle .Card.UserDid }}" />
7
7
+
<meta property="og:description" content="{{ or .Card.Profile.Description .Card.UserHandle .Card.UserDid }}" />
8
8
+
{{ end }}
9
9
+
3
10
{{ define "content" }}
4
11
<div class="grid grid-cols-1 md:grid-cols-8 gap-6">
5
12
<div class="md:col-span-2 order-1 md:order-1">
+7
appview/pages/templates/user/repos.html
···
1
1
{{ define "title" }}{{ or .Card.UserHandle .Card.UserDid }} · repos {{ end }}
2
2
3
3
+
{{ define "extrameta" }}
4
4
+
<meta property="og:title" content="{{ or .Card.UserHandle .Card.UserDid }}'s repos" />
5
5
+
<meta property="og:type" content="object" />
6
6
+
<meta property="og:url" content="https://tangled.sh/{{ or .Card.UserHandle .Card.UserDid }}/repos" />
7
7
+
<meta property="og:description" content="{{ or .Card.Profile.Description .Card.UserHandle .Card.UserDid }}" />
8
8
+
{{ end }}
9
9
+
3
10
{{ define "content" }}
4
11
<div class="grid grid-cols-1 md:grid-cols-8 gap-6">
5
12
<div class="md:col-span-2 order-1 md:order-1">
+1
-1
go.mod
···
28
28
github.com/sethvargo/go-envconfig v1.1.0
29
29
github.com/whyrusleeping/cbor-gen v0.2.1-0.20241030202151-b7a6831be65e
30
30
github.com/yuin/goldmark v1.4.13
31
31
+
golang.org/x/net v0.39.0
31
32
golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028
32
33
)
33
34
···
114
115
go.uber.org/multierr v1.11.0 // indirect
115
116
go.uber.org/zap v1.26.0 // indirect
116
117
golang.org/x/crypto v0.37.0 // indirect
117
117
-
golang.org/x/net v0.39.0 // indirect
118
118
golang.org/x/sys v0.32.0 // indirect
119
119
golang.org/x/time v0.8.0 // indirect
120
120
google.golang.org/protobuf v1.34.2 // indirect