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
style commit view
author
Akshay
date
1 year ago
(Feb 18, 2025, 10:27 PM UTC)
commit
f124604f
f124604f62f438704888e3f8f2a5bdef2b843a2d
parent
c3a68445
c3a68445577eeb38faa66c874b35760419176f17
+213
-180
5 changed files
Expand all
Collapse all
Unified
Split
appview
pages
templates
layouts
base.html
repobase.html
topbar.html
repo
commit.html
index.html
+3
-1
appview/pages/templates/layouts/base.html
Reviewed
···
11
11
<link href="/static/tw.css" rel="stylesheet" type="text/css" />
12
12
<title>{{ block "title" . }}tangled{{ end }}</title>
13
13
</head>
14
14
-
<body class="container mx-auto px-10">
14
14
+
<body>
15
15
<header>
16
16
{{ block "topbar" . }}
17
17
{{ template "layouts/topbar" . }}
18
18
{{ end }}
19
19
</header>
20
20
+
<div class="container mx-auto px-10">
20
21
<main class="content">{{ block "content" . }}{{ end }}</main>
21
22
<script src="/static/lucide.min.js"></script>
22
23
<script>
23
24
lucide.createIcons();
24
25
</script>
26
26
+
</div>
25
27
</body>
26
28
</html>
27
29
{{ end }}
+2
-2
appview/pages/templates/layouts/repobase.html
Reviewed
···
39
39
</div>
40
40
</nav>
41
41
<section
42
42
-
class="bg-white p-6 min-h-[200px] border-l border-r border-b border-black relative z-20 w-full mx-auto"
43
43
-
>
42
42
+
class="bg-white p-6 min-h-[200px] border-l border-r border-b border-black relative z-20 w-full mx-auto">
44
43
{{ block "repoContent" . }}{{ end }}
45
44
</section>
45
45
+
{{ block "repoAfter" . }} {{ end }}
46
46
</section>
47
47
{{ end }}
48
48
+1
-1
appview/pages/templates/layouts/topbar.html
Reviewed
···
1
1
{{ define "layouts/topbar" }}
2
2
{{ with .LoggedInUser }}
3
3
-
<nav class="flex items-center justify-center space-x-4 text-sm mb-4 border-b border-l border-r border-black">
3
3
+
<nav class="flex items-center justify-center space-x-4 mb-4 py-2 border-b border-l border-r border-black">
4
4
<a
5
5
href="/"
6
6
hx-boost="true"
+75
-44
appview/pages/templates/repo/commit.html
Reviewed
···
43
43
<strong>jump to</strong>
44
44
{{ range $diff }}
45
45
<ul>
46
46
-
<li><a href="#{{ .Name.New }}">{{ .Name.New }}</a></li>
46
46
+
<li><a href="#file-{{ .Name.New }}">{{ .Name.New }}</a></li>
47
47
</ul>
48
48
{{ end }}
49
49
</div>
50
50
</section>
51
51
-
<section>
51
51
+
52
52
+
{{end}}
53
53
+
54
54
+
{{ define "repoAfter" }}
55
55
+
56
56
+
{{ $repo := .RepoInfo.FullName }}
57
57
+
{{ $commit := .Diff.Commit }}
58
58
+
{{ $stat := .Diff.Stat }}
59
59
+
{{ $diff := .Diff.Diff }}
60
60
+
52
61
{{ $this := $commit.This }}
53
62
{{ $parent := $commit.Parent }}
63
63
+
54
64
{{ range $diff }}
55
55
-
<div id="{{ .Name.New }}">
56
56
-
<div class="diff">
57
57
-
{{ if .IsNew }}
58
58
-
<span class="diff-type">A</span>
59
59
-
{{ end }}
60
60
-
{{ if .IsDelete }}
61
61
-
<span class="diff-type">D</span>
62
62
-
{{ end }}
63
63
-
{{ if not (or .IsNew .IsDelete) }}
64
64
-
<span class="diff-type">M</span>
65
65
-
{{ end }}
66
66
-
{{ if .Name.Old }}
67
67
-
<a href="/{{ $repo }}/blob/{{ $parent }}/{{ .Name.Old }}">{{ .Name.Old }}</a>
68
68
-
{{ if .Name.New }}
69
69
-
→
70
70
-
<a href="/{{ $repo }}/blob/{{ $this }}/{{ .Name.New }}">{{ .Name.New }}</a>
71
71
-
{{ end }}
72
72
-
{{ else }}
73
73
-
<a href="/{{ $repo }}/blob/{{ $this }}/{{ .Name.New }}">{{ .Name.New }}</a>
74
74
-
{{- end -}}
75
75
-
{{ if .IsBinary }}
76
76
-
<p>Not showing binary file.</p>
77
77
-
{{ else }}
78
78
-
<pre class="overflow-auto">
79
79
-
{{- range .TextFragments -}}
80
80
-
<p>{{- .Header -}}</p>
81
81
-
{{- range .Lines -}}
82
82
-
{{- if eq .Op.String "+" -}}
83
83
-
<span class="diff-add">{{ .String }}</span>
84
84
-
{{- end -}}
85
85
-
{{- if eq .Op.String "-" -}}
86
86
-
<span class="diff-del">{{ .String }}</span>
87
87
-
{{- end -}}
88
88
-
{{- if eq .Op.String " " -}}
89
89
-
<span class="diff-noop">{{ .String }}</span>
90
90
-
{{- end -}}
91
91
-
{{- end -}}
92
92
-
{{- end -}}
93
93
-
{{- end -}}
94
94
-
</pre>
65
65
+
<section class="mt-4 border border-black w-full mx-auto">
66
66
+
<div id="file-{{ .Name.New }}">
67
67
+
<div id="diff-file">
68
68
+
<details open>
69
69
+
<summary class="list-none cursor-pointer sticky top-0">
70
70
+
<div id="diff-file-header" class="border-b cursor-pointer bg-white border-black flex justify-between">
71
71
+
<div id="left-side-items" class="p-2">
72
72
+
{{ if .IsNew }}
73
73
+
<span class="diff-type">A</span>
74
74
+
{{ end }}
75
75
+
{{ if .IsDelete }}
76
76
+
<span class="diff-type">D</span>
77
77
+
{{ end }}
78
78
+
{{ if not (or .IsNew .IsDelete) }}
79
79
+
<span class="diff-type">M</span>
80
80
+
{{ end }}
81
81
+
82
82
+
{{ if .Name.Old }}
83
83
+
<a href="/{{ $repo }}/blob/{{ $parent }}/{{ .Name.Old }}" class="no-underline hover:underline">{{ .Name.Old }}</a>
84
84
+
{{ if .Name.New }}
85
85
+
→
86
86
+
<a href="/{{ $repo }}/blob/{{ $this }}/{{ .Name.New }}" class="no-underline hover:underline">{{ .Name.New }}</a>
87
87
+
{{ end }}
88
88
+
{{ else }}
89
89
+
<a href="/{{ $repo }}/blob/{{ $this }}/{{ .Name.New }}" class="no-underline hover:underline">{{ .Name.New }}</a>
90
90
+
{{- end -}}
91
91
+
</div>
92
92
+
93
93
+
<div id="right-side-items" class="p-2">
94
94
+
<a href="#file-{{ .Name.New }}" class="no-underline hover:underline">to top of file</a>
95
95
+
</div>
96
96
+
97
97
+
</div>
98
98
+
</summary>
99
99
+
100
100
+
{{ if .IsBinary }}
101
101
+
<p>Not showing binary file.</p>
102
102
+
{{ else }}
103
103
+
<pre class="overflow-auto">
104
104
+
{{- range .TextFragments -}}
105
105
+
<div class="bg-gray-100 text-gray-500">{{ .Header }}</div>
106
106
+
{{- range .Lines -}}
107
107
+
{{- if eq .Op.String "+" -}}
108
108
+
<div class="bg-green-100 text-green-700">{{ .String }}</div>
109
109
+
{{- end -}}
110
110
+
111
111
+
{{- if eq .Op.String "-" -}}
112
112
+
<div class="bg-red-100 text-red-700">{{ .String }}</div>
113
113
+
{{- end -}}
114
114
+
115
115
+
{{- if eq .Op.String " " -}}
116
116
+
<div class="text-gray-500">{{ .String }}</div>
117
117
+
{{- end -}}
118
118
+
119
119
+
{{- end -}}
120
120
+
{{- end -}}
121
121
+
</pre>
122
122
+
{{- end -}}
123
123
+
124
124
+
</details>
125
125
+
126
126
+
</div>
95
127
</div>
96
96
-
</div>
128
128
+
</section>
97
129
{{ end }}
98
98
-
</section>
99
130
100
131
{{end}}
+132
-132
appview/pages/templates/repo/index.html
Reviewed
···
1
1
{{ define "repoContent" }}
2
2
-
<main>
3
3
-
{{- if .IsEmpty }}
4
4
-
this repo is empty
5
5
-
{{ else }}
6
6
-
<div class="flex gap-4">
7
7
-
<div id="file-tree" class="w-1/2">
8
8
-
{{ $containerstyle := "py-1" }}
9
9
-
{{ $linkstyle := "no-underline hover:underline" }}
2
2
+
<main>
3
3
+
{{- if .IsEmpty }}
4
4
+
this repo is empty
5
5
+
{{ else }}
6
6
+
<div class="flex gap-4">
7
7
+
<div id="file-tree" class="w-1/2">
8
8
+
{{ $containerstyle := "py-1" }}
9
9
+
{{ $linkstyle := "no-underline hover:underline" }}
10
10
11
11
-
<div class="flex justify-end">
12
12
-
<select
13
13
-
onchange="window.location.href = '/{{ .RepoInfo.FullName }}/tree/' + this.value"
14
14
-
class="p-1 border border-gray-500 bg-white"
15
15
-
>
16
16
-
<optgroup label="branches" class="uppercase bold text-sm">
17
17
-
{{ range .Branches }}
18
18
-
<option
19
19
-
value="{{ .Reference.Name }}"
20
20
-
class="py-1"
21
21
-
{{if eq .Reference.Name $.Ref}}selected{{end}}
22
22
-
>
23
23
-
{{ .Reference.Name }}
24
24
-
</option>
25
25
-
{{ end }}
26
26
-
</optgroup>
27
27
-
<optgroup label="tags" class="uppercase bold text-sm">
28
28
-
{{ range .Tags }}
29
29
-
<option
30
30
-
value="{{ .Reference.Name }}"
31
31
-
class="py-1"
32
32
-
{{if eq .Reference.Name $.Ref}}selected{{end}}
33
33
-
>
34
34
-
{{ .Reference.Name }}
35
35
-
</option>
36
36
-
{{ end }}
37
37
-
</optgroup>
38
38
-
</select>
39
39
-
</div>
11
11
+
<div class="flex justify-end">
12
12
+
<select
13
13
+
onchange="window.location.href = '/{{ .RepoInfo.FullName }}/tree/' + this.value"
14
14
+
class="p-1 border border-gray-500 bg-white"
15
15
+
>
16
16
+
<optgroup label="branches" class="uppercase bold text-sm">
17
17
+
{{ range .Branches }}
18
18
+
<option
19
19
+
value="{{ .Reference.Name }}"
20
20
+
class="py-1"
21
21
+
{{if eq .Reference.Name $.Ref}}selected{{end}}
22
22
+
>
23
23
+
{{ .Reference.Name }}
24
24
+
</option>
25
25
+
{{ end }}
26
26
+
</optgroup>
27
27
+
<optgroup label="tags" class="uppercase bold text-sm">
28
28
+
{{ range .Tags }}
29
29
+
<option
30
30
+
value="{{ .Reference.Name }}"
31
31
+
class="py-1"
32
32
+
{{if eq .Reference.Name $.Ref}}selected{{end}}
33
33
+
>
34
34
+
{{ .Reference.Name }}
35
35
+
</option>
36
36
+
{{ end }}
37
37
+
</optgroup>
38
38
+
</select>
39
39
+
</div>
40
40
41
41
-
<section id="repo-content">
42
42
-
{{ range .Files }}
43
43
-
{{ if not .IsFile }}
44
44
-
<div class="{{ $containerstyle }}">
45
45
-
<a
46
46
-
href="/{{ $.RepoInfo.FullName }}/tree/{{ $.Ref }}/{{ .Name }}"
47
47
-
class="{{ $linkstyle }}"
48
48
-
>
49
49
-
<div class="flex items-center gap-2">
50
50
-
<i
51
51
-
class="w-3 h-3 fill-current"
52
52
-
data-lucide="folder"
53
53
-
></i
54
54
-
>{{ .Name }}/
55
55
-
</div>
56
56
-
</a>
57
57
-
</div>
58
58
-
{{ end }}
59
59
-
{{ end }}
41
41
+
{{ range .Files }}
42
42
+
{{ if not .IsFile }}
43
43
+
<div class="{{ $containerstyle }}">
44
44
+
<a
45
45
+
href="/{{ $.RepoInfo.FullName }}/tree/{{ $.Ref }}/{{ .Name }}"
46
46
+
class="{{ $linkstyle }}"
47
47
+
>
48
48
+
<div class="flex items-center gap-2">
49
49
+
<i
50
50
+
class="w-3 h-3 fill-current"
51
51
+
data-lucide="folder"
52
52
+
></i
53
53
+
>{{ .Name }}/
54
54
+
</div>
55
55
+
</a>
56
56
+
</div>
57
57
+
{{ end }}
58
58
+
{{ end }}
60
59
61
61
-
{{ range .Files }}
62
62
-
{{ if .IsFile }}
63
63
-
<div class="{{ $containerstyle }}">
64
64
-
<a
65
65
-
href="/{{ $.RepoInfo.FullName }}/blob/{{ $.Ref }}/{{ .Name }}"
66
66
-
class="{{ $linkstyle }}"
67
67
-
>
68
68
-
<div class="flex items-center gap-2">
69
69
-
<i
70
70
-
class="w-3 h-3"
71
71
-
data-lucide="file"
72
72
-
></i
73
73
-
>{{ .Name }}
74
74
-
</div>
75
75
-
</a>
76
76
-
</div>
77
77
-
{{ end }}
78
78
-
{{ end }}
79
79
-
</div>
80
80
-
<div id="commit-log" class="flex-1">
81
81
-
{{ range .Commits }}
82
82
-
<div
83
83
-
class="relative
84
84
-
px-4
85
85
-
py-4
86
86
-
border-l
87
87
-
border-black
88
88
-
before:content-['']
89
89
-
before:absolute
90
90
-
before:w-1
91
91
-
before:h-1
92
92
-
before:bg-black
93
93
-
before:rounded-full
94
94
-
before:left-[-2.2px]
95
95
-
before:top-1/2
96
96
-
before:-translate-y-1/2
97
97
-
">
60
60
+
{{ range .Files }}
61
61
+
{{ if .IsFile }}
62
62
+
<div class="{{ $containerstyle }}">
63
63
+
<a
64
64
+
href="/{{ $.RepoInfo.FullName }}/blob/{{ $.Ref }}/{{ .Name }}"
65
65
+
class="{{ $linkstyle }}"
66
66
+
>
67
67
+
<div class="flex items-center gap-2">
68
68
+
<i
69
69
+
class="w-3 h-3"
70
70
+
data-lucide="file"
71
71
+
></i
72
72
+
>{{ .Name }}
73
73
+
</div>
74
74
+
</a>
75
75
+
</div>
76
76
+
{{ end }}
77
77
+
{{ end }}
78
78
+
</div>
79
79
+
<div id="commit-log" class="flex-1">
80
80
+
{{ range .Commits }}
81
81
+
<div
82
82
+
class="relative
83
83
+
px-4
84
84
+
py-4
85
85
+
border-l
86
86
+
border-black
87
87
+
before:content-['']
88
88
+
before:absolute
89
89
+
before:w-1
90
90
+
before:h-1
91
91
+
before:bg-black
92
92
+
before:rounded-full
93
93
+
before:left-[-2.2px]
94
94
+
before:top-1/2
95
95
+
before:-translate-y-1/2
96
96
+
">
98
97
99
98
<div id="commit-message">
100
99
{{ $messageParts := splitN .Message "\n\n" 2 }}
···
104
103
<a href="/{{ $.RepoInfo.FullName }}/commit/{{ .Hash.String }}" class="inline no-underline hover:underline">{{ index $messageParts 0 }}</a>
105
104
{{ if gt (len $messageParts) 1 }}
106
105
<button class="text-sm inline rounded-sm bg-gray-300 text-gray-700 px-1 w-fit hover:bg-gray-400"
107
107
-
hx-on:click="this.parentElement.nextElementSibling.classList.toggle('hidden')">…</button>
106
106
+
hx-on:click="this.parentElement.nextElementSibling.classList.toggle('hidden')">…</button>
108
107
{{ end }}
109
108
</div>
110
109
{{ if gt (len $messageParts) 1 }}
···
114
113
</div>
115
114
</div>
116
115
117
117
-
<div class="text-xs text-gray-500">
118
118
-
<span class="font-mono">
119
119
-
<a
120
120
-
href="/{{ $.RepoInfo.FullName }}/commit/{{ .Hash.String }}"
121
121
-
class="text-gray-500 no-underline hover:underline"
122
122
-
>{{ slice .Hash.String 0 8 }}</a
123
123
-
>
124
124
-
</span>
125
125
-
·
126
126
-
<span>
127
127
-
<a
128
128
-
href="mailto:{{ .Author.Email }}"
129
129
-
class="text-gray-500 no-underline hover:underline"
130
130
-
>{{ .Author.Name }}</a
131
131
-
>
132
132
-
</span>
133
133
-
·
134
134
-
<span>{{ timeFmt .Author.When }}</span>
135
135
-
</div>
136
136
-
</div>
137
137
-
{{ end }}
138
138
-
</div>
139
139
-
</div>
140
140
-
</section>
141
141
-
{{- if .Readme }}
142
142
-
<article class="readme">
143
143
-
{{- .Readme -}}
144
144
-
</article>
145
145
-
{{- end -}}
146
146
-
{{- end -}}
116
116
+
<div class="text-xs text-gray-500">
117
117
+
<span class="font-mono">
118
118
+
<a
119
119
+
href="/{{ $.RepoInfo.FullName }}/commit/{{ .Hash.String }}"
120
120
+
class="text-gray-500 no-underline hover:underline"
121
121
+
>{{ slice .Hash.String 0 8 }}</a
122
122
+
>
123
123
+
</span>
124
124
+
·
125
125
+
<span>
126
126
+
<a
127
127
+
href="mailto:{{ .Author.Email }}"
128
128
+
class="text-gray-500 no-underline hover:underline"
129
129
+
>{{ .Author.Name }}</a
130
130
+
>
131
131
+
</span>
132
132
+
·
133
133
+
<span>{{ timeFmt .Author.When }}</span>
134
134
+
</div>
135
135
+
</div>
136
136
+
{{ end }}
137
137
+
</div>
138
138
+
</div>
139
139
+
{{- end -}}
147
140
141
141
+
</main>
142
142
+
{{ end }}
148
143
149
149
-
<div class="clone-url">
150
150
-
<strong>clone</strong>
151
151
-
<pre>
152
152
-
git clone https://tangled.sh/{{ .RepoInfo.OwnerWithAt }}/{{ .RepoInfo.Name }}
153
153
-
</pre
154
154
-
>
155
155
-
</div>
156
156
-
</main>
144
144
+
{{ define "repoAfter" }}
145
145
+
{{- if .Readme }}
146
146
+
<section class="mt-4 p-6 border border-black w-full mx-auto">
147
147
+
<article class="readme">
148
148
+
{{- .Readme -}}
149
149
+
</article>
150
150
+
</section>
151
151
+
{{- end -}}
152
152
+
153
153
+
<section class="mt-4 p-6 border border-black w-full mx-auto">
154
154
+
<strong>clone</strong>
155
155
+
<pre> git clone https://tangled.sh/{{ .RepoInfo.OwnerWithAt }}/{{ .RepoInfo.Name }} </pre>
156
156
+
</section>
157
157
{{ end }}