Skip to content

Commit dfbefd1

Browse files
authored
Fix SVG close tag, improve commit graph page UI alignment (#23751)
Follow #23748 Thanks to @delvh ---- And, fix the UI alignment by the way (adding some `gt-mr-xx`) Before: ![image](https://user-images.githubusercontent.com/2114189/228034794-7a6ac8d6-01fa-4dd2-97d4-0df0368f8ee0.png) After: ![image](https://user-images.githubusercontent.com/2114189/228034938-64edeadf-7c99-4e74-b658-0ca62b72d596.png)
1 parent 31ab331 commit dfbefd1

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

templates/repo/graph/commits.tmpl

+6-6
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,10 @@
2828
{{- end -}}
2929
</a>
3030
</span>
31-
<span class="message gt-dib gt-ellipsis gt-mr-2">
31+
<span class="message gt-dib gt-ellipsis gt-mr-3">
3232
<span>{{RenderCommitMessage $.Context $commit.Subject $.RepoLink $.Repository.ComposeMetas}}</span>
3333
</span>
34-
<span class="tags gt-df gt-ac">
34+
<span class="tags gt-df gt-ac gt-mr-2">
3535
{{range $commit.Refs}}
3636
{{$refGroup := .RefGroup}}
3737
{{if eq $refGroup "pull"}}
@@ -54,20 +54,20 @@
5454
{{svg "octicon-git-branch" 16 "gt-mr-2"}}{{.ShortName}}
5555
</a>
5656
{{else}}
57-
<!-- Unknown ref type {{.Name}} -->
57+
<!-- Unknown ref type .Name -->
5858
{{end}}
5959
{{end}}
6060
</span>
61-
<span class="author gt-df gt-ac gt-mr-2">
61+
<span class="author gt-df gt-ac gt-mr-3">
6262
{{$userName := $commit.Commit.Author.Name}}
6363
{{if $commit.User}}
6464
{{if $commit.User.FullName}}
6565
{{$userName = $commit.User.FullName}}
6666
{{end}}
67-
{{avatar $.Context $commit.User}}
67+
<span class="gt-mr-2">{{avatar $.Context $commit.User}}</span>
6868
<a href="{{$commit.User.HomeLink}}">{{$userName}}</a>
6969
{{else}}
70-
{{avatarByEmail $.Context $commit.Commit.Author.Email $userName}}
70+
<span class="gt-mr-2">{{avatarByEmail $.Context $commit.Commit.Author.Email $userName}}</span>
7171
{{$userName}}
7272
{{end}}
7373
</span>

templates/repo/graph/svgcontainer.tmpl

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@
1414
{{- else if eq $glyph.Glyph '_' -}}
1515
M {{Add (Mul $glyph.Column 5) 0}} {{Add (Mul $glyph.Row 12) 12}} h 10 {{/* */ -}}
1616
{{- end -}}
17-
{{- end}}" stroke-width="1" fill="none" id="flow-{{$flow.ID}}-path" stroke-linecap="round">
17+
{{- end}}" stroke-width="1" fill="none" id="flow-{{$flow.ID}}-path" stroke-linecap="round"></path>
1818
{{range $flow.Commits}}
19-
<circle class="flow-commit" cx="{{Add (Mul .Column 5) 5}}" cy="{{Add (Mul .Row 12) 6}}" r="2.5" stroke="none" id="flow-commit-{{.Rev}}" data-rev="{{.Rev}}">
19+
<circle class="flow-commit" cx="{{Add (Mul .Column 5) 5}}" cy="{{Add (Mul .Row 12) 6}}" r="2.5" stroke="none" id="flow-commit-{{.Rev}}" data-rev="{{.Rev}}"></circle>
2020
{{end}}
2121
</g>
2222
{{end}}

0 commit comments

Comments
 (0)