alpha
Login
or
Join now
dunkirk.sh
/
core
forked from
tangled.org/core
Star
0
Fork
0
Atom
Configure Feed
Issues
Pull Requests
Commits
Tags
Feed URL
Select the types of activity you want to include in your feed.
This repository has no description
Star
0
Fork
0
Atom
Configure Feed
Issues
Pull Requests
Commits
Tags
Feed URL
Select the types of activity you want to include in your feed.
Overview
Issues
Pulls
Pipelines
profile page styles
author
Akshay
date
1 year ago
(Feb 15, 2025, 9:09 AM UTC)
commit
750a4764
750a4764838f0859af8ebc311be3857f9a49d9bc
parent
fe8cc7f5
fe8cc7f52d48c396e7ead19625c8c9168fc21fdb
+64
-55
3 changed files
Expand all
Collapse all
Unified
Split
appview
pages
pages.go
templates
layouts
topbar.html
user
profile.html
+7
appview/pages/pages.go
Reviewed
···
31
31
"add": func(a, b int) int {
32
32
return a + b
33
33
},
34
34
+
"didOrHandle": func(did, handle string) string {
35
35
+
if handle != "" {
36
36
+
return fmt.Sprintf("@%s", handle)
37
37
+
} else {
38
38
+
return did
39
39
+
}
40
40
+
},
34
41
}
35
42
}
36
43
+45
-46
appview/pages/templates/layouts/topbar.html
Reviewed
···
1
1
{{ define "layouts/topbar" }}
2
2
-
{{ with .LoggedInUser }}
3
3
-
<nav class="flex items-center space-x-4">
4
4
-
<a
5
5
-
href="/"
6
6
-
hx-boost="true"
7
7
-
class="text-gray-600 hover:text-gray-900"
8
8
-
>timeline</a
9
9
-
>
10
10
-
<a
11
11
-
href="/settings"
12
12
-
hx-boost="true"
13
13
-
class="text-gray-600 hover:text-gray-900"
14
14
-
>settings</a
15
15
-
>
16
16
-
<a
17
17
-
href="/knots"
18
18
-
hx-boost="true"
19
19
-
class="text-gray-600 hover:text-gray-900"
20
20
-
>knots</a
21
21
-
>
22
22
-
<a
23
23
-
href="/repo/new"
24
24
-
hx-boost="true"
25
25
-
class="text-gray-600 hover:text-gray-900"
26
26
-
>add repos</a
27
27
-
>
28
28
-
{{ if .Handle }}
29
29
-
<a
30
30
-
href="/@{{ .Handle }}"
31
31
-
hx-boost="true"
32
32
-
class="text-gray-600 hover:text-gray-900"
33
33
-
>my profile</a
34
34
-
>
35
35
-
{{ else }}
36
36
-
<a
37
37
-
href="/{{ .Did }}"
38
38
-
hx-boost="true"
39
39
-
class="text-gray-600 hover:text-gray-900"
40
40
-
>my profile</a
41
41
-
>
42
42
-
{{ end }}
43
43
-
</nav>
44
44
-
{{ else }}
45
45
-
<a href="/login" class="btn my-2">login</a>
46
46
-
{{ end }}
47
47
-
2
2
+
<nav class="flex items-center space-x-4">
3
3
+
<a
4
4
+
href="/"
5
5
+
hx-boost="true"
6
6
+
class="text-gray-600 hover:text-gray-900"
7
7
+
>timeline</a
8
8
+
>
9
9
+
{{ with .LoggedInUser }}
10
10
+
<a
11
11
+
href="/settings"
12
12
+
hx-boost="true"
13
13
+
class="text-gray-600 hover:text-gray-900"
14
14
+
>settings</a
15
15
+
>
16
16
+
<a
17
17
+
href="/knots"
18
18
+
hx-boost="true"
19
19
+
class="text-gray-600 hover:text-gray-900"
20
20
+
>knots</a
21
21
+
>
22
22
+
<a
23
23
+
href="/repo/new"
24
24
+
hx-boost="true"
25
25
+
class="text-gray-600 hover:text-gray-900"
26
26
+
>add repos</a
27
27
+
>
28
28
+
{{ if .Handle }}
29
29
+
<a
30
30
+
href="/@{{ .Handle }}"
31
31
+
hx-boost="true"
32
32
+
class="text-gray-600 hover:text-gray-900"
33
33
+
>my profile</a
34
34
+
>
35
35
+
{{ else }}
36
36
+
<a
37
37
+
href="/{{ .Did }}"
38
38
+
hx-boost="true"
39
39
+
class="text-gray-600 hover:text-gray-900"
40
40
+
>my profile</a
41
41
+
>
42
42
+
{{ end }}
43
43
+
{{ else }}
44
44
+
<a href="/login" class="btn my-2">login</a>
45
45
+
{{ end }}
46
46
+
</nav>
48
47
{{ end }}
+12
-9
appview/pages/templates/user/profile.html
Reviewed
···
1
1
{{define "title"}}{{ or .UserHandle .UserDid }}{{end}}
2
2
3
3
{{define "content"}}
4
4
-
<h1>{{ or .UserHandle .UserDid }} profile</h1>
4
4
+
<h1>{{ didOrHandle .UserDid .UserHandle }}</h1>
5
5
6
6
-
<h3>repos</h3>
7
7
-
<ul id="my-knots">
6
6
+
<div id="my-repos" class="grid grid-cols-1 md:grid-cols-2 gap-4">
8
7
{{range .Repos}}
9
9
-
<li>
10
10
-
<code>name: <a href="/@{{or $.UserHandle $.UserDid }}/{{.Name}}">{{.Name}}</a></code><br>
11
11
-
<code>knot: {{.Knot}}</code><br>
12
12
-
</li>
8
8
+
<div id="repo-card" class="border border-black p-4 shadow-sm bg-white">
9
9
+
<div id="repo-card-name" class="font-medium">
10
10
+
<a href="/@{{or $.UserHandle $.UserDid }}/{{.Name}}">{{.Name}}</a>
11
11
+
</div>
12
12
+
<div id="repo-knot-name" class="text-gray-600 text-sm font-mono">
13
13
+
{{.Knot}}
14
14
+
</div>
15
15
+
</div>
13
16
{{else}}
14
14
-
<p>does not have any repos yet</p>
17
17
+
<p>This user does not have any repos yet.</p>
15
18
{{end}}
16
16
-
</ul>
19
19
+
</div>
17
20
{{end}}